how to fix undelivered mail
how to fix undelivered mail by checking domain account name present in local or remote domain location
/etc/localdomains — if domain is present here emails from server will be delivered on local (on accounts on this server).
/etc/remotedomains — if domain is present here emails from server will be delivered on remote mail server, in which the MX record resolves.
Some important things to remember:
– if MX record was not changed: ALL mails delivered on LOCAL, so domains should be present on localdomains.
– if MX resolves to different server (other than our NetCleanse server) and if both domains were present on /etc/remotedomains and /etc/localdomains file: Emails from our local server will go to LOCAL account, and emails coming from outside our local server will go to the mail server where the MX resovles.
– if MX resolves to our NetCleanse server: After the change of MX record the domain will move from localdomains to remotedomains, but since our Netcleanse (220.127.116.11) server was added on /etc/alwaysrelay file domains should be added back to localdomains, otherwise they can’t receive emails coming from our local server.
* You can always check which server/domain an email address is resolving by using “Trace Email Address” feature of cpanel. Or use ‘dig’ command and take note of “@localhost” parameters that i mentioned to get the local results.
* Restart of mail server (Exim) is not necessary.