I am using Sendmail on a Centos server to send email for PHP scripts, but the problem is that mail is delivered to a local
mailbox on the machine rather than what is specified in the MX records for the domain - which actually point to another machine I use for email.
I would like sendmail to not try and locally deliver mail for the domain the machine is setup for, is there a simple way to disable local delivery?
The domain is not in the local-host-names file.
I've already done lots of googling and I have looked at:
http://serverfault.com/questions/26934/sendmail-configuration-to-not-deliver-mail-to-local-machine
http://serverfault.com/questions/65365/disable-local-delivery-in-sendmail
But either there is no answer or it is not suitable.
I don't want to relay to another server, i just want it to send mail regardless of domain.
To provide an example:
I have two servers, one is the mail server at mail.example.com and a web server which is example.com, when I use the smtp service on the web server it currently routes mail to a local
mailbox on example.com, but it should be going to mailboxes on mail.example.com
Output of sendmail -bt returns:
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter
3,0
[email protected]
canonify input: info @ example . com
Canonify2 input: info
Canonify2 returns: info
canonify returns: info
parse input: info
Parse0 input: info
Parse0 returns: info
ParseLocal input: info
ParseLocal returns: info
Parse1 input: info
Parse1 returns: $# local $: info
parse returns: $# local $: info