Skip to content
Chenrymelb edited this page Feb 4, 2015 · 5 revisions

Q0061

Question

What does the error Too many Received headers - suspected mail loop mean?

Answer

Whenever a message passes through an MTA, a Received: header gets added. Exim counts the number of these headers in incoming messages. If there are more than the value of received_headers_max (default 30), Exim assumes there is some kind of mail routing loop occurring. For example, host A passes the message to host B, which immediately passes it back to host A. Check the Received: headers and the mail logs to determine exactly what is going on. One common cause of this problem is users with accounts on both systems who set up each one to forward to the other, thinking that will cause copies of all messages to be delivered on both of them.

The looping problem, which is commonly because the external MX records think your server is the end delivery point and your server believes it is someone else. Check the localdomains and remotedomains files on your server (/etc/localdomains /etc/remotedomains in Linux) to see that the domain in localdomains.

Once you have resolved the looping problem you are commonly left with frozen emails that will not deliver giving the same error. Identify the emails concerned by their Message ID and find the header file for them in /var/spool/exim/input You will have two, the one suffixed with a -H is the one you want. e.g. ./input/o/1YJ8Bo-0003YJ-4w-H Edit that file with your favourite editor and you will see a stamp for each delivery loop in both the delivery and Anti Abuse section. Trim both of those down by removing the multiple loops leaving the orginal delivery headers only.

Flush the queue and they will deliver.


Clone this wiki locally