I had this issue of sendmail delivering mails meant for the domain locally instead of reading the mx records, but couldn't resolve it. Maybe someone could tell me if I am missing any step.

I have a vps running mydomain.com and my drupal site uses sendmail to send out mails on form submissions etc. However mails were reaching other domains but not the mails id of the mydomain.com hosted on the VPS. That was because sendmail was configured to route mails locally for this domain as evidenced by the log entries.

Jun 18 06:38:09 i-8941-41970-VM sendmail[23728]: r5HAqCB4013371: to=<secretary@mydomain.com>, ctladdr=<apache@i-8941-41970-VM.cs22edcloud.internal$

I followed one of the posts on ServerFault and edited my /etc/mail/sendmail.mc

VERSIONID(`nullclient setup')dnl

I then ran m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

However mail not delivered to mydomain.com. the following entries are logged in /var/log/mailog

Jun 18 07:42:21 i-8941-41970-VM sendmail[26265]: r5I6gCQq026263: to=<secretary@mydomain.com>, ctladdr=<apache@i-8941-41970-VM.cs22edcloud.internal> (48/48), delay=00:00:09, xdelay=00:00:09, mailer=esmtp, pri=121044, relay=mx1.mydomain.com. [], dsn=4.0.0, stat=Deferred: 450 4.1.8 <apache@i-8941-41970-VM.cs22edcloud.internal>: Sender address rejected: Domain not found

Looks like you are going to have to tack on a real domain on the From line, ie possibly use the masquerade settings as well as the add domain name options.

  • I don't understand. Could you explain. – sridhar pandurangiah Jun 20 '13 at 8:03
  • Restarted sendmail and my outgoing mails are being delivered to the mydomain.com. But the error above remains an unsolved mystery. – sridhar pandurangiah Jun 20 '13 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.