On Wednesday we had an unrelated email issue with our host, and they made some changes which included removing our domain, foo.com
, from /etc/local_domains
.
This had some far-reaching (and difficult to diagnose) implications, and we didn't actually notice that mails weren't being delivered at all until Thursday. I spent Thursday mistakenly trying to figure out what was wrong with our email cronjobs, but on Friday I finally found the real problem and fixed it.
The issue now is that there's a lot of email missing from the last two days. I need to find those missing messages if at all possible, but unfortunately googling for "courier where do failed emails go" results in a bunch of news stories about meatspace shipments. I've checked inside /var/mail
but the files within are empty - I guess cPanel or Courier does things I don't expect with email.
My question is: Where would the undeliverable mails from that period go? Is there any possibility they still exist somewhere and I can recover them?
The cpanel /etc/local_domains is probably used to configure exim, not courier. Incoming emails are delivered via smtp, not pop nor imap.
So here is what happened:
So the emails are not on your server, sorry.
Then there is a very little hope: If Exim rejected the incoming emails with 5xx error message, there are few chances the remote servers kept the message. But if Exim rejected the incoming emails with a 4xx error message, then 2 things could happen:
So, in order to find if other MX servers are configured for your domain:
Then in order to check the answer of your SMTP server to relay requests:
telnet your-server-ip-address 25
HELO helo.com
MAIL FROM:
<[email protected]>
RCPT TO:
<[email protected]>
After each line ( HELO, MAIL FROM, RCPT TO ) you will have an answer from your server. The answer to the RCPT TO: should be 5xx .. or 4xx .. . If it is 4xx you have a little hope.