Hello everybody, I am using a Postfix mail relay to modify sender
addresses of emails coming from my company Office 365 cloud-hosted
domain: I configured a connector on Office 365 to route all emails to
Postfix.
Everything works perfectly, except for some recipient domains that are
also hosted on outlook.com domains. Every mail sent is bounced with
this error:

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)

This error does not appear for every email we send to other
*.outlook.com recipients, only for emails sent to domains that have
the same *.outlook.com server that we have: searching in Postfix logs,
i found that our emails are going out from 3 outlook.com servers, with
3 different IP addresses; I found the same and only 3 IP addresses in
error logs related to the bounce error. Here is an example:

mycompany-com.outlook.com [104.1.2.3] -> Postfix relay [54.1.2.3] ->
recipient_first-com.outlook.com [104.1.2.3] = Bounce error

mycompany-com.outlook.com [104.1.2.3] -> Postfix relay [54.1.2.3] ->
recipient_second-com.outlook.com [104.4.5.6] = mail sent correctly

I suppose that outlook.com considers email coming from the same IP
addres as a loop, and then blocks them. Is there a way in Postfix to
"mask" (?) source IP and avoid this loop? Do you have better ideas?

Reply via email to