Emails sent to the server are not received and there is no information logged in /var/log/exim_mainlog on the delivery status of these emails. Attempting to telnet into the server will result in the following error:
telnet 18.104.22.168 25
Connected to 22.214.171.124.
Escape character is '^]'.
220-host.mailnode.tld ESMTP Exim 4.94 #2 Tue, 23 Feb 2021 17:17:37 +0100
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
250-host.mailnode.tld Hello hou-2.nat.cptxoffice.net [126.96.36.199]
250-AUTH PLAIN LOGIN
MAIL FROM: firstname.lastname@example.org
RCPT TO: email@example.com
421 Unexpected failure, please try later
When analyzing the /var/log/exim_paniclog file you will see the following log entry:
tail -n 1 /var/log/exim_paniclog
2021-02-23 18:15:42 failed to open $FILE for linear search: No such file or directory
$FILE here refers to an absolute file path like /etc/blockeddomains. (Only for demonstration)
This occurs when there is some Exim customization and Exim is configured to perform a linear search (lsearch) for a specific file that does not exist. For example, if the file shown in the error log is /etc/blockeddomains then you can confirm that by the following command:
grep -i lsearch /etc/exim.conf | grep -i blockeddomains
domainlist blocked_domains = lsearch;/etc/blockeddomains
As you can see Exim is configured to look for that file but that file does not exist:
ls -Flathr /etc/blockeddomains
ls: cannot access /etc/blockeddomains: No such file or directory
Either the above customization needs to be removed or the missing file needs to be created, then you can run the following scripts to load the changes: