3

Once upon a time there was a server. Lets call it zzz.com, running Ubuntu LTS 10. Then, domain owner decided to create his corporate mail via Google Apps, and created account username@zzz.com.

Everything looks to be fine with username@zzz.com. Mail is sent / received.

But there is one mysterious problem. When PHP script at zzz.com is trying to send some mail to [ANYNAME]@zzz.com, mail is not delivered. Sendmail works fine when trying to send mail anywhere else.

There is a non-delivery notification in this case in the mail log.

What could this be? How can this be fixed?

2

This sounds to be almost exactly the same issue than on ServerFault question titled Disable local delivery in sendmail.

The solution is to disable the local delivery of mail with the following steps:

  1. Open one of the sendmail's configuration files, /etc/mail/sendmail.mc, using any editor you want (I use vim as an example):

    vim /etc/mail/sendmail.mc
    
  2. Add the following lines to the end of the file:

    define(`MAIL_HUB', `zzz.com.')dnl
    define(`LOCAL_RELAY', `zzz.com.')dnl
    
  3. Configure sendmail:

    sudo sendmailconfig
    
  4. Restart the sendmail service:

    sudo /etc/init.d/sendmail restart
    

    or

    service sendmail restart
    

References

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.