I have a newly minted CentOS 6.7 box to set up sendmail on. It seems sending email but not really, no idea whats the issue could be.
What I did:
yum install sendmail sendmail-cf sendmail-doc sendmail-devel telnet
service sendmail start
chkconfig sendmail on
chkconfig --list sendmail
ls -l /etc/mail
telnet localhost 25
chkconfig --level 25 sendmail
service iptables stop
telnet connected successfully, iptables was stopped to reduce any complications.
Testing sendmail:
mail -v -s 'testing sendmail' myEmail@mydomain.com < /etc/passwd
2.1.0 <root@localhost.localdomain>... Sender ok </br>
2.1.5 <myEmail@mydomain.com>... Recipient ok
Enter mail, end with "." on a line by itself
2.0.0 tA4Bud7a006235 Message accepted for delivery </br>
myEmail@mydomain.com... Sent (tA4Bud7a006235 Message accepted for delivery)
Closing connection to [127.0.0.1]
QUIT
2.0.0 localhost.localdomain closing connection
Now this shows the message have sent successfully but i cant see any email in my inbox and if ) check /var/log/maillog
:
Nov 4 15:48:03 localhost sendmail[6852]: tA3HPSF2002371: to=<myEmail@myDomain.com>, ctladdr=<root@localhost.localdomain> (0/0), delay=22:22:35, xdelay=00:00:00, mailer=esmtp, pri=2732098, relay=mail.myDomain.com., dsn=4.0.0, stat=Deferred: Connection refused by mail.mydomain.com.
Any ideas?