Thanks Dusan and Wietse, I searched in postfix log files and I can confirm that looping emails have the same ID. "Normal" emails ID appear in the log files a few times (depending on the number of recipients I suppose), but looping emails appear many times:
14 times db8p195mb0565dd65da92d1861c8946u48c...@db8p195mb0565.eurp222.prod.outlook.com 14 times vi1p195mb02560627a8aa5227c95208cd80...@vi1p195mb0256.eurp222.prod.outlook.com 14 times vi1p195mb0463506au7u3dc47au795a8u92...@vi1p195mb0463.eurp222.prod.outlook.com 16 times vi1p195mb038452d8411bu9ba5078801au6...@vi1p195mb0384.eurp222.prod.outlook.com 17 times db8p195mb0696625u1739d7u4dcaa889991...@db8p195mb0696.eurp222.prod.outlook.com 18 times db6p195mb02635592256ud2d84241d3a882...@db6p195mb0263.eurp222.prod.outlook.com 20 times pr3p195mb06990241a503dc8b8656d5u9aa...@pr3p195mb0699.eurp222.prod.outlook.com 20 times vi1p195mb0463aau9au1a022a1cuu68a692...@vi1p195mb0463.eurp222.prod.outlook.com 22 times pr3p195mb07470b722a0a5a241d51dad684...@pr3p195mb0747.eurp222.prod.outlook.com 32 times vi1p195mb03187a8b7275d41b023cc2a0a5...@vi1p195mb0318.eurp222.prod.outlook.com 34 times vi1p195mb03181c1955d18u1d423860caa5...@vi1p195mb0318.eurp222.prod.outlook.com I think I'll try with Dusan advice and let you know. Feel free to suggest something else if comes to your mind. Il giorno mer 18 mar 2020 alle ore 16:40 Wietse Venema <wie...@porcupine.org> ha scritto: > > Dusan Obradovic: > > > > > On Mar 18, 2020, at 11:45 AM, ego...@gmail.com wrote: > > > > > > host xxx-xxx.mail.protection.outlook.com[X.X.X.X] said: 554 5.4.14 Hop > > > count exceeded - possible mail loop ATTR1 > > > [xxx-xxx.prod.protection.outlook.com] (in reply to end of DATA > > > command) > > > > > > > I suspect this is based on received headers. > > > > > Is there a way in Postfix to > > > "mask" (?) source IP and avoid this loop? Do you have better ideas? > > > > Alternatively, You could remove some of the existing Received: headers with > > Postfix. > > See http://www.postfix.org/header_checks.5.html > > That is a dangerous solution as it could cause mail to loop forever. > > To find out if there actually is a hopcount problem, look for the > message ID of a looping message. > > Exmnple: > > Mar 18 00:56:32 spike postfix/cleanup[71391]: 48hyS02vZDzJrNs: > message-id=<48hys02vzdzj...@spike.porcupine.org> > > The message ID is "48hys02vzdzj...@spike.porcupine.org". > > If mail is really looping then you should see that message ID > going through your mail system repeatedly. > > If mail is not really looping, then Microsoft may be reporting > a hopcount error for other reasons, and using a different > source IP address may help. > > Wietse