On 2023-08-14 at 17:23:34 UTC-0400 (Mon, 14 Aug 2023 17:23:34 -0400)
Alex via Postfix-users <mysqlstud...@gmail.com>
is rumored to have said:
Hi,
I have what appears to be a complicated mail loop problem that I can't
figure out. I suspect that their receiving system (M365) is somehow
reinjecting the message back to our mail server after it's been
successfully delivered to them.
For loose values of "success"...
We are acting as MX for two small companies, and occasionally, when
companyA emails companyB, it is first received by raven.example.com,
209.216.111.115,
which is the MX we have created for them, processed by amavisd, then
routed
to the destination through our postfix-out instance
xavier.example.com,
209.216.111.114. The companyB server accepts the message, but then
somehow
companyA appears to connect to our server again and send the same
message
again.
Yes, it is a loop. The loop occurs inside MS365. Apparently Microsoft
does not understand how to get mail from CompanyA to CompanyB
internally, so they follow the DNS.
It's very difficult to trace what's happening,
Not really, just strip out everything but the Received headers and
unfold them. The path is clear.
so I hoped someone could
help. I think the sending server is somehow reconnecting to our server
and
resending the same message, but it eventually dies with the sending
server
saying "Error: too many hops". Our server never sees that message.
They
have forwarded the bounce to me and I've pasted it here:
https://pastebin.com/ChcnDwjK
It appears like it delivers five different copies, but each version
has all
the received headers of the previous version.
It is odd to call these "copies" since the Received headers clearly
prove that the message has gone around the loop 4 times.
I'm sorry if this is confusing. I've spent probably six hours or more
reading through this one email trying to trace the problem and
correlate it
with the postfix/amavis logs. I believe it's only happened a few times
- I
don't quite understand all the circumstances under which it happens.
We
also don't always see the reject/too many hops message. Here is a
recent
one:
Aug 4 09:01:13 xavier postfix-115/smtp[125455]: 88D5F246:
to=<r...@companyb.com>, relay=127.0.0.1[127.0.0.1]:11024, delay=0.67,
delays=0.21/0/0/0.45, dsn=5.4.0, status=bounced (host
127.0.0.1[127.0.0.1]
said: 554 5.4.0 id=136757-17 - Rejected by next-hop MTA on relaying,
from
MTA(smtp:[127.0.0.1]:11025): 554 5.4.0 Error: too many hops (in reply
to
end of DATA command))
Any ideas for either what's going on with this email or what I can do
to
troubleshoot this further would really be appreciated.
Your task is to fix Microsoft's mishandling of email. (giggles
insanely...)
But seriously, you cannot fix this problem by reconfiguring Postfix or
DNS, the changes must be done in MS365 mail routing.
--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org