0

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
FEATURE(`nullclient',`mx.mydomain.com')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. [64.92.120.50], dsn=4.0.0, stat=Deferred: 450 4.1.8 <apache@i-8941-41970-VM.cs22edcloud.internal>: Sender address rejected: Domain not found
sridhar pandurangiah
  • 763
  • 2
  • 11
  • 29

1 Answers1

1

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.

mdpc
  • 11,856
  • 28
  • 53
  • 67