"$d_sysMaint""email programs/sendmail.txt www.BillHowell.ca 17Jan2020 initial remove empty lines at the start of each email attachment, and have the extension ".eml", not ".txt"! cannot have a comma "," in the body of the email sent! quotation marks are lost, and of course quotes will be problematic (need to put in co in/out IP port connSecurity authentication mail.billhowell.ca POP3 198.161.90.1: 995 SSL/TLS Normal password mail.billhowell.ca SMTP 198.161.90.21: 587 STARTTTLS Normal password mail.lexi.net SMTP 198.161.90.21: smtp.lexi.net SMTP 198.161.90.1: sendmail default 25 smtp.lexi.net = mail-c.lexi.net big screwup with /etc/mail/[sendmail.mc -> sendmail.cf] ******************************************* *********** 31Jan2020 Reject sendmail - use sSMTP? https://www.linux.com/news/ssmtp-simple-alternative-sendmail/ *************** 31Jan2020 11:58 re-do everything using documentation, which I just installed /usr/share/doc/sendmail-doc from doc : +-----+ +-------------------------------+ | NON-SMTP BASED CONFIGURATIONS | +-------------------------------+ These configuration files are designed primarily for use by SMTP-based sites. They may not be well tuned for UUCP-only or UUCP-primarily nodes (the latter is defined as a small local net connected to the rest of the world via UUCP). However, there is one hook to handle some special cases. You can define a ``smart host'' that understands a richer address syntax using: define(`SMART_HOST', `mailer:hostname') In this case, the ``mailer:'' defaults to "relay". Any messages that can't be handled using the usual UUCP rules are passed to this host. If you are on a local SMTP-based net that connects to the outside world via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules. For example: define(`SMART_HOST', `uucp-new:uunet') LOCAL_NET_CONFIG R$* < @ $* .$m. > $* $#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3 This will cause all names that end in your domain name ($m) to be sent via SMTP; anything else will be sent via uucp-new (smart UUCP) to uunet. If you have FEATURE(`nocanonify'), you may need to omit the dots after the $m. If you are running a local DNS inside your domain which is not otherwise connected to the outside world, you probably want to use: define(`SMART_HOST', `smtp:fire.wall.com') LOCAL_NET_CONFIG R$* < @ $* . > $* $#smtp $@ $2. $: $1 < @ $2. > $3 That is, send directly only to things you found in your DNS lookup; anything else goes through SMART_HOST. You may need to turn off the anti-spam rules in order to accept UUCP mail with FEATURE(`promiscuous_relay') and FEATURE(`accept_unresolvable_domains'). +-----+ ********** 30Jan2020 sendmail setup Big mess - rewritten for clarity How to configure Sendmail in Linux May 8, 2017 - by Siva +--+ +--+ 1] Install the sendmail packages and m4 packages. >> Howell - [sendmail, m4] already installed on Lenovo +--+ +--+ 2] Sendmail’s lengthy and detailed configuration file is /etc/mail/send mail.cf. Avoid editing the sendmail.cf file directly. To make configuration changes to Sendmail, edit the /etc/mail/sendmail.mc file, backup the original /etc/mail/sendmail.cf file, and use the following alternatives to generate a new configuration file: # cd /etc/mail/ Look for the line :26 and make the changes in the sendmail.mc as below: define(`SMART_HOST’, `smtpqf.com’)dnl Where: smtpqf.com is the name of my Mail Server Gateway # emacs /etc/mail/sendmail.mc Below I added : define(`SMART_HOST’, `smtp.lexi.net’)dnl define(`confSAFE_FILE_ENV', `/home/bill')dnl : +--+ dnl # dnl # SAFE_FILE_ENV: [undefined] If set, sendmail will do a chroot() dnl # into this directory before writing files. dnl # If *all* your user accounts are under /home then use that dnl # instead - it will prevent any writes outside of /home ! dnl # define(`confSAFE_FILE_ENV', `')dnl define(`confSAFE_FILE_ENV', `/home/bill')dnl dnl # define(`SMART_HOST’, `smtp.lexi.net’)dnl dnl # Daemon options - restrict to servicing LOCALHOST ONLY !!! dnl # Remove `, Addr=' clauses to receive from any interface +--+ +--+ +--+ 3] Compile with m4 Command: [root@quickfixlinux.com ~]# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf # m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf m4:/usr/share/sendmail/cf/mailer/smtp.m4:123: ERROR: end of file in argument list ????????????????????????? NUTS!!! - it chopped the file sendmail.cf after only a few lines!! ????????????????????????? # emacs /etc/mail/sendmail.mc Initially I added : define(`SMART_HOST’, `smtp.lexi.net’)dnl define(`confSAFE_FILE_ENV', `/home/bill')dnl : Now remove define(`confSAFE_FILE_ENV', `/home/bill')dnl ChangeTo : define(`SMART_HOST’, `mail.billhowell.ca’)dnl +--+ dnl # dnl # SAFE_FILE_ENV: [undefined] If set, sendmail will do a chroot() dnl # into this directory before writing files. dnl # If *all* your user accounts are under /home then use that dnl # instead - it will prevent any writes outside of /home ! dnl # define(`confSAFE_FILE_ENV', `')dnl dnl # define(`SMART_HOST’, `mail.billhowell.ca’)dnl dnl # Daemon options - restrict to servicing LOCALHOST ONLY !!! dnl # Remove `, Addr=' clauses to receive from any interface +--+ # diff "/etc/mail/sendmail original 30Jan2020.mc" /etc/mail/sendmail.mc # m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf >> same error! 31Jan2020 10:51 I removed entirely the line : define(`SMART_HOST’, `mail.billhowell.ca’)dnl # geany /etc/mail/sendmail.mc & Again : # m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf >> now it worked!! +--+ +--+ 4] Now, Start the Sendmail Service [root@quickfixlinux.com ~]# /etc/init.d/sendmail start # /etc/init.d/sendmail start [....] Starting Mail Transport Agent (MTA): sendmail451 4.0.0 /etc/mail/sendmail.cf: line 100: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory . ok >> still the same problem Check /etc/mail/sendmail.cf: line 100 # geany /etc/mail/sendmail.cf & +--+ Cwlocalhost # file containing names of hosts for which we receive email Fw/etc/mail/local-host-names %[^\#] +--+ Ok - seems to fit problem? maybe is need to change permissions to disallow [group, other] access? : fileclass: cannot open '/etc/mail/local-host-names': Group writable directory +--+ # /etc/init.d/sendmail start [....] Starting Mail Transport Agent (MTA): sendmail451 4.0.0 /etc/mail/sendmail.cf: line 100: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory . ok >> same problem!!! # geany /etc/hosts & +--+ +--+ Do step [6] before [5] !! 6] To put Entires in /etc/hosts file [root@quickfixlinux.com ~]# vi /etc/hosts This files has : +--+ 127.0.0.1 localhost 127.0.1.1 bill_lenovo 198.161.90.1 smtp.lexi.net # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts +--+ But I thought it had disappeared? change to : +--+ 127.0.0.1 localhost 127.0.1.1 bill_lenovo 198.161.90.21 mail.billhowell.ca # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts +--+ 31Jan2020 11:39 After removing IP addresses : +--+ localhost bill_lenovo mail.billhowell.ca # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts +--+ +--+ 5] Enable the Sendmail Service Permanently: [root@quickfixlinux.com ~]# chkconfig sendmail on # chkconfig sendmail on [5]- Done geany /etc/hosts >> Looks promising! I have feedback After closing geany use of file : # chkconfig sendmail on >> no return (as before having /etc/hosts open in geany) +--+ 7] Check for the Sendmail connectivity in the Server : # netstat -antupl >> Not in output : 198.161.90.21 Test the above with an active connection : # netstat -antupl | grep -i "2170/virtuoso-t" tcp 0 0 0.0.0.0:1111 0.0.0.0:* LISTEN 2170/virtuoso-t tcp 0 0 0.0.0.0:8890 0.0.0.0:* LISTEN 2170/virtuoso-t tcp 0 0 127.0.0.1:45586 127.0.0.1:1111 ESTABLISHED 2170/virtuoso-t tcp 0 0 127.0.0.1:1111 127.0.0.1:45586 ESTABLISHED 2170/virtuoso-t >> The web-page is wrong!! In any case mail.billhowell.ca does not show up >> back to the drawing board, maybe I should remove the IP address in /etc/hosts ?? >> close geany as it is giving a a false hit? >> go back to step [5] Didn't work, so take IPs out of /etc/hosts -> back to step [6] then [5] +--+ 8] Now, we can try to send mail out from the Server to other recipients: [root@quickfixlinux.com ~]# echo “This is message body” | mail -s “This is Subject” quickfixlinux@gmail.com +--+ 9] To Check and confirm with the logs under /var/log/maillog: ***************************** 30Jan2020 sendmail setup +-----+ http://www.yolinux.com/TUTORIALS/Sendmail.html Yolinux.com Tutorial Linux Sendmail Configuration: +-----+ https://www.linuxnix.com/how-to-configure-and-install-sendmail-in-linux/ How To Install And Configure Sendmail In Linux? Posted by Surendra Anne | Dec 13, 2010 >> much more detailed than Siva's below ... too hard +-----+ How to configure Sendmail in Linux May 8, 2017 - by Siva 1] Install the sendmail packages and m4 packages. >> Howell - sendmail and m4 were already installed on Lenovo >> I had already used LMDE's Software Manager for both +--+ 2] Sendmail’s lengthy and detailed configuration file is /etc/mail/send mail.cf. Avoid editing the sendmail.cf file directly. To make configuration changes to Sendmail, edit the /etc/mail/sendmail.mc file, backup the original /etc/mail/sendmail.cf file, and use the following alternatives to generate a new configuration file: # cd /etc/mail/ Look for the line :26 and make the changes in the sendmail.mc as below: define(`SMART_HOST’, `smtpqf.com’)dnl Where: smtpqf.com is the name of my Mail Server Gateway >> This does NOT appear in sendmail.mc >> I have NOT yet added a define(`SMART_HOST’, `smtpqf.com’)dnl line to /etc/mail/sendmail.mc at an arbitrary position. Let's just see what happens Go back & add SMART_HOST I put this "somewhere" : dnl # define(`confSAFE_FILE_ENV', `')dnl dnl define(`confSAFE_FILE_ENV', `/home/bill')dnl dnl # define(`SMART_HOST’,`mail.billhowell.net’)dnl dnl # Daemon options - restrict to servicing LOCALHOST ONLY !!! dnl # Remove `, Addr=' clauses to receive from any interface +--+ 3] Compile with m4 Command: [root@quickfixlinux.com ~]# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf >> seems good? root@bill_lenovo:~# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf root@bill_lenovo:~# +--+ 4] Now, Start the Sendmail Service (1st try before defining SAFE_FILE_ENV) : [root@quickfixlinux.com ~]# /etc/init.d/sendmail start # /etc/init.d/sendmail start [....] Starting Mail Transport Agent (MTA): sendmail >> seems stuck here for a while, then : 451 4.0.0 /etc/mail/sendmail.cf: line 100; fileclass: cannot open 'etc/mail/local-host-names': Group writable directory . ok >> file /etc/mail/local-host-names : localhost bill_lenovo >> so maybe this was created by the "endmail start" command 2nd try after defining SAFE_FILE_ENV : root@bill_lenovo:~# /etc/init.d/sendmail start [....] Starting Mail Transport Agent (MTA): sendmail >> This also seemed to work root@bill_lenovo:~# root@bill_lenovo:~# /etc/init.d/sendmail start root@bill_lenovo:~#: command not found root@bill_lenovo:~# [....] Starting Mail Transport Agent (MTA): sendmail451 4.0.0 /etc/mail/sendmail.cf: line 100: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory -bash: syntax error near unexpected token `(' root@bill_lenovo:~# . ok >> Oops, I screwed that up! but still may have worked? Make the file /etc/mail/local-host-names group writeable by smmsp, using nemo under root root@bill_lenovo:~# /etc/init.d/sendmail start [....] Starting Mail Transport Agent (MTA): sendmail451 4.0.0 /etc/mail/sendmail.cf: line 100: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory . ok >> same problem Make the file /etc/mail/local-host-names "others writeable", using nemo under root Rerun step [3] Compile with m4 Command : root@bill_lenovo:~# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf root@bill_lenovo:~# >> OK, looks good? >> but there is NO SMART_HOST entry in /etc/mail/sendmail.cf !!?? Rerun step [4] Now, Start the Sendmail Service : root@bill_lenovo:~# /etc/init.d/sendmail start [....] Starting Mail Transport Agent (MTA): sendmail451 4.0.0 /etc/mail/sendmail.cf: line 100: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory . ok +--+ 5] Enable the Sendmail Service Permanently: [root@quickfixlinux.com ~]# chkconfig sendmail on root@bill_lenovo:~# chkconfig sendmail on The program 'chkconfig' is currently not installed. You can install it by typing: apt-get install chkconfig chkconfig: command not found >> I installed it with LMDE Software Manager root@bill_lenovo:~# chkconfig sendmail on root@bill_lenovo:~# >> seems OK?? (no errors, but no feedback!!) +--+ 6] To put Entires in /etc/hosts file [root@quickfixlinux.com ~]# vi /etc/hosts >> what entries? [root@quickfixlinux.com ~]# vi /etc/hosts 10.10.10.10 smtpqf.com My starting hosts : +--+ 127.0.0.1 localhost 127.0.1.1 bill_lenovo # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts +--+ changed to : +--+ 127.0.0.1 localhost 127.0.1.1 bill_lenovo 10.10.10.10 mail.lexi.net # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts +--+ +--+ 7] Check for the Sendmail connectivity in the Server : [root@quickfixlinux.com ~] # netstat -antupl |grep -i sendmail tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 20388/sendmail: acc root@bill_lenovo:~# netstat -antupl | grep -i sendmail tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 20388/sendmail: acc grep: tcp: No such file or directory grep: 0: No such file or directory grep: 0: No such file or directory grep: 127.0.0.1:25: No such file or directory grep: 0.0.0.0:*: No such file or directory grep: LISTEN: No such file or directory grep: 20388/sendmail:: No such file or directory grep: acc: No such file or directory >> didn't work at all!!! root@bill_lenovo:~# netstat -antupl +--+ Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 3081/smbd tcp 0 0 127.0.0.1:4101 0.0.0.0:* LISTEN 612/brltty tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 3081/smbd tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1626/rpcbind tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 4207/cupsd tcp 0 0 0.0.0.0:1111 0.0.0.0:* LISTEN 2170/virtuoso-t tcp 0 0 0.0.0.0:8890 0.0.0.0:* LISTEN 2170/virtuoso-t tcp 0 0 127.0.0.1:1111 127.0.0.1:52515 ESTABLISHED 2170/virtuoso-t tcp 0 0 127.0.0.1:52515 127.0.0.1:1111 ESTABLISHED 2170/virtuoso-t tcp6 0 0 :::445 :::* LISTEN 3081/smbd tcp6 0 0 :::139 :::* LISTEN 3081/smbd tcp6 0 0 :::111 :::* LISTEN 1626/rpcbind tcp6 0 0 ::1:631 :::* LISTEN 4207/cupsd udp 0 0 0.0.0.0:2069 0.0.0.0:* 5170/dhclient udp 0 0 0.0.0.0:68 0.0.0.0:* 5170/dhclient udp 0 0 0.0.0.0:111 0.0.0.0:* 1626/rpcbind udp 0 0 192.168.11.212:123 0.0.0.0:* 3009/ntpd udp 0 0 127.0.0.1:123 0.0.0.0:* 3009/ntpd udp 0 0 0.0.0.0:123 0.0.0.0:* 3009/ntpd udp 0 0 192.168.11.255:137 0.0.0.0:* 2209/nmbd udp 0 0 192.168.11.212:137 0.0.0.0:* 2209/nmbd udp 0 0 0.0.0.0:137 0.0.0.0:* 2209/nmbd udp 0 0 192.168.11.255:138 0.0.0.0:* 2209/nmbd udp 0 0 192.168.11.212:138 0.0.0.0:* 2209/nmbd udp 0 0 0.0.0.0:138 0.0.0.0:* 2209/nmbd udp 0 0 0.0.0.0:5353 0.0.0.0:* 2671/avahi-daemon: udp 0 0 0.0.0.0:1900 0.0.0.0:* 3914/minissdpd udp 0 0 0.0.0.0:953 0.0.0.0:* 1626/rpcbind udp 0 0 0.0.0.0:60365 0.0.0.0:* 2671/avahi-daemon: udp6 0 0 :::111 :::* 1626/rpcbind udp6 0 0 fe80::201:6cff:fe9d:123 :::* 3009/ntpd udp6 0 0 ::1:123 :::* 3009/ntpd udp6 0 0 :::123 :::* 3009/ntpd udp6 0 0 :::49287 :::* 2671/avahi-daemon: udp6 0 0 :::5353 :::* 2671/avahi-daemon: udp6 0 0 :::38730 :::* 5170/dhclient udp6 0 0 :::953 :::* 1626/rpcbind +--+ Note my 127.0.0.1:1111 : tcp 0 0 127.0.0.1:1111 127.0.0.1:52515 ESTABLISHED 2170/virtuoso-t tcp 0 0 127.0.0.1:52515 127.0.0.1:1111 ESTABLISHED 2170/virtuoso-t Note also that local-host-names does not have : mail.lexi.net even though I added that??? start Thunderbird, and look at connections (only new ones listed below, other than one virtuoso-t) : +--+ tcp 0 0 192.168.11.212:47797 104.24.2.58:443 ESTABLISHED 10004/thunderbird tcp 0 0 192.168.11.212:53945 172.217.3.194:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:53968 172.217.3.194:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:43686 199.244.50.74:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:45170 72.21.91.29:80 TIME_WAIT - tcp 0 0 192.168.11.212:34215 52.94.208.73:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:33659 74.125.132.94:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:42037 216.58.217.36:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:53063 172.217.3.166:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:34214 52.94.208.73:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:35137 104.25.174.13:443 ESTABLISHED 10004/thunderbird tcp 0 0 192.168.11.212:59181 172.217.14.193:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:46941 172.217.14.230:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:58159 99.86.35.16:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:41071 216.58.217.34:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:53764 172.217.3.166:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:35850 8.39.36.165:443 ESTABLISHED 3793/firefox tcp 0 0 127.0.0.1:52515 127.0.0.1:1111 ESTABLISHED 2170/virtuoso-t tcp 0 0 192.168.11.212:55218 34.228.35.165:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:41106 23.220.93.205:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:36735 23.220.93.89:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:36736 23.220.93.89:443 ESTABLISHED 3793/firefox tcp 0 0 192.168.11.212:43964 13.224.2.91:443 ESTABLISHED 3793/firefox +--+ >> interesting! Thunderbird isn't using 127.0.0.1 +--+ https://stackoverflow.com/questions/1461154/how-to-figure-out-the-smtp-server-host How to figure out the SMTP server host? Ask Question Asked 10 years, 4 months ago Active 1 month ago Viewed 242k times # dig mail.lexi.net MX ; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> mail.lexi.net MX ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61446 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;mail.lexi.net. IN MX ;; ANSWER SECTION: mail.lexi.net. 3600 IN CNAME mail-msa.lexi.net. ;; AUTHORITY SECTION: lexi.net. 3600 IN SOA nsi0.lexi.net. hostmaster.lexi.net. 220 10800 3600 604800 3600 ;; Query time: 260 msec ;; SERVER: 192.168.11.1#53(192.168.11.1) ;; WHEN: Thu Jan 30 17:21:06 2020 ;; MSG SIZE rcvd: 106 https://stackoverflow.com/questions/1461154/how-to-figure-out-the-smtp-server-host How to figure out the SMTP server host? answered May 25 '15 at 13:51 Ritabrata Gautam # ping smtp.lexi.net PING mail-c.lexi.net (198.161.90.1) 56(84) bytes of data. 64 bytes from mail-c.lexi.net (198.161.90.1): icmp_seq=1 ttl=48 time=129 ms 64 bytes from mail-c.lexi.net (198.161.90.1): icmp_seq=2 ttl=48 time=99.2 ms 64 bytes from mail-c.lexi.net (198.161.90.1): icmp_seq=3 ttl=48 time=108 ms >> wow! totally different than for Thunderbird !??? >> so I set /etc/hosts 198.161.90.1 +--+ 127.0.0.1 localhost 127.0.1.1 bill_lenovo 10.10.10.10 mail.lexi.net # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts +--+ +--+ https://www.unix.com/unix-for-dummies-questions-and-answers/54889-how-do-i-configure-sendmail.html How do I configure sendmail? timontt - by default sendmail only listen to 127.0.0.1, so comment it as dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl - use m4 to generate new sendmail.cf # m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf note: This will overwrite existing sendmail.cf, if needed do a backup - restart sendmail, check with to, it shd show sendmail accepting connection # ps -ef|grep -i sendmail >> I got : # ps -ef | grep -i sendmail root 9673 7643 0 16:29 pts/1 00:00:02 emacs /etc/mail/sendmail.mc root 9724 7852 0 16:34 pts/0 00:00:00 grep -i sendmail - telnet to port 25 to try also... - test mail... # mail -s "Testing" youremailaddress@abc.com If still not work, do you have any firewall blocking port 25? Hope this will help... +--+ emacs /etc/mail/sendmail.mc Try : root@bill_lenovo:~# netstat -antupl | grep -i sendmail tcp 0 0 127.0.0.1:1111 0.0.0.0:* LISTEN 20388/sendmail: acc +--+ 8] Now, we can try to send mail out from the Server to other recipients: [root@quickfixlinux.com ~]# echo “This is message body” | mail -s “This is Subject” quickfixlinux@gmail.com +--+ 9] To Check and confirm with the logs under /var/log/maillog: May 8 15:40:29 quickfixlinux.com sendmail[20444]: v487eTgX020444: from=root, size=61, class=0, nrcpts=1, msgid=<201705080740.v487eTgX020444@quickfixlinux.com>, relay=root@localhost May 8 15:40:29 quickfixlinux.com sendmail[20445]: v487eTwo020445: from=, size=348, class=0, nrcpts=1, msgid=<201705080740.v487eTgX020444@quickfixlinux.com>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1] May 8 15:40:29 quickfixlinux.com sendmail[20444]: v487eTgX020444: to=quickfixlinux@gmail.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30061, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (v487eTwo020445 Message accepted for delivery) May 8 15:40:29 quickfixlinux.com sendmail[20447]: STARTTLS=client, relay=smtpcis., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256 May 8 15:40:29 quickfixlinux.com sendmail[20447]: v487eTwo020445: to=, ctladdr= (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120348, relay=smtpqf. [10.10.10.10], dsn=2.0.0, stat=Sent (ok: Message 330662174 accepted) enddoc