Symptoms
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 1.2.3.4 25
Trying 1.2.3.4...
Connected to 1.2.3.4.
Escape character is '^]'.
EHLO server.test-001.net
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 [184.94.197.2]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-X_PIPE_CONNECT
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP
MAIL FROM: sending@email.com
250 OK
RCPT TO: recieving@email.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)
Description
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:
root@server [~]# 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:
root@server [~]# ls -Flathr /etc/blockeddomains
ls: cannot access /etc/blockeddomains: No such file or directory
Workaround
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:
/scripts/buildeximconf
/scripts/restartsrv_exim
Comments
0 comments
Article is closed for comments.