2

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?

fuero
  • 9,591
  • 1
  • 35
  • 40
Adeel
  • 21
  • 3

1 Answers1

0

As maillog states:

You are trying to send to myDomain.com, sendmail doesn't think it is its job to handle mails for that domain, so it forwards them to mail.mydomain.com (taken from the MX record for that domain), which in turn doesn't seem to have a mailserver present on port 25.

A little more detail on the domains and the config involved might help.

fuero
  • 9,591
  • 1
  • 35
  • 40