Problem with incoming mail on Exim mail server 4.96
Recently, more and more users and administrators of Exim mail server with version 4.96 began to face the problem of receiving incoming mail, namely after updating the exim package within the system. This is expressed by the fact that the mail service user can send an e-mail from the server, but when trying to receive it back - the e-mail will not be delivered. ISPmanager 6 also has this problem.
When trying to send an e-mail to a mailbox on a problematic server with Exim 4.96, the sender gets a reply about failure to deliver e-mail and a file with technical information. Unfortunately, this information is not quite informative and does not contain any specifics.
Text of the reply from the mail server about the problem
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
Technical information file
Reporting-MTA: dns; mail.local-domain.com
As you can see, it is quite difficult to understand the true cause of the mail delivery problem to further resolve it.
In the mail server log /var/log/exim/main.log you can see the following line that appears when the mail is accepted.
Tainted arg 4 for dovecot_deliver_pipe transport command
This is the information you should pay attention to. It indicates that there is an error in one of the settings for the mail message routing parameters within the mail server.
Open the configuration file of the mail server. By default it is /etc/exim/exim.conf and find the configuration group for dovecot_deliver_pipe near the end of the file
Next, find the line of the command parameter. It will look like this
command = "/usr/libexec/dovecot/dovecot-lda -d $local_part@$domain -f $sender_address "
Remove the -f $sender_address parameter from it
command = "/usr/libexec/dovecot/dovecot-lda -d $local_part@$domain"
If your mail server configuration uses additional options for the message_suffix parameter, you need to clear them and leave the parameter blank
The default for message_prefix is the mbox string "From " and Dovecot will use it to identify the sender.
You only need to restart the exim service
systemctl restart exim