Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question
add comment

1 Answer

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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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