I have some clients that use a third party spam filter. The way it works is the mail MX records are pointed to the mail filter MX records and the mail is passed thru our server to the third party server and then delivered back to our server so client can retrieve their mail as per usual.
Now what is happening is that the client is not receiving the emails. I have checked with the third party mail server and they are receiving the email and then passing it back to our server. This is where the problem starts. The email then gets lost or stuck and not delivered to my client and a rejection notice is received by the sender sent by my server. The error message is:
Logs which i was getting.
Too many “Received” headers – suspected mail loop
Solution
I am not sure but after doing this its deliver mails in proper mailbox and not getting loop
[~]# /etc/init.d/exim restart
—-for example we take example.com
Added the example.com in /etc/localdomains
Remove example.com from /etc/remotedomains
Here it seems if entry is there for example.com then it will send mailout and it follow again same mailflow ,
Verify that the accounts are in fact in localdomains but not in remotedomains. If it is in only remote cpanel will try to forward the email which could do a loop just like you are describing.
Hello,
Searched on the web for a fix for a really long time and could fine the fix only in this one website. Keep up the great work.