Re: Non-unique Message ID in mail messages

2022-01-27 Thread Wietse Venema
Daniel Ry?link:
> Hello!
> 
> I apologize for bringing perhaps trivial/well-known matter, but I am 
> interested in your opinion.
> 
> RFC 5322 clearly states that mail messages SHOULD contain a Message ID 
> identifier, but if the do contain it, it MUST be globally unique.

And when the mesage is forwarded, for example when it is sent to
this mailing list, the Message ID stays the same, because it is the
same message, only in a different envelope.

But that is not the problem here.

> Despite this requirement, I have encountered senders (namely Spamcop) 
> that sends obviously different (albeit related) messages called "Alert" 
> and "Summary" (they are always related to the same incident and have the 
> same Message ID). This creates all sorts of problems when processing 
> these mails, namely with users that have local forwards from one domain 
> to another (our mailserver hosts multiple domains), because for example 
> Dovecot refuses to forward the second message, flagging it as a 
> duplicate (yes, I will write also to the Dovecot related mailing list).

That is nasty. Messages with different content should have different
Message ID headers (if they have a Message ID header).

If Spamcop has a distinct Message ID pattern, then you could use
Postfix header_checks to IGNORE their Message ID headers. According
to RFC 5321 or 5322 the Message ID header is not required, and
Dovecot should be able to handle that.

> My question to you is - did you also encounter similar problems with 
> Message IDs? Because according to the log records, Spamcop does not seem 
> to be the only offender.

Do not confuse forwarded email (see my comment above) with Message ID reuse.

Wietse

> Thanks in advance for any reactions, and if I did something wrong by 
> writing this message, I apologize again in advance.
> 
> -- 
> 
>  ? --===--
> --== Best Regards! ==--
>  ? --===--
> 
> Daniel Ry?link
> Sysadmin @ Quantcom.cz
> Czech Republic
> 
> 


Non-unique Message ID in mail messages

2022-01-27 Thread Daniel Ryšlink

Hello!

I apologize for bringing perhaps trivial/well-known matter, but I am 
interested in your opinion.


RFC 5322 clearly states that mail messages SHOULD contain a Message ID 
identifier, but if the do contain it, it MUST be globally unique.


Despite this requirement, I have encountered senders (namely Spamcop) 
that sends obviously different (albeit related) messages called "Alert" 
and "Summary" (they are always related to the same incident and have the 
same Message ID). This creates all sorts of problems when processing 
these mails, namely with users that have local forwards from one domain 
to another (our mailserver hosts multiple domains), because for example 
Dovecot refuses to forward the second message, flagging it as a 
duplicate (yes, I will write also to the Dovecot related mailing list).


My question to you is - did you also encounter similar problems with 
Message IDs? Because according to the log records, Spamcop does not seem 
to be the only offender.


Thanks in advance for any reactions, and if I did something wrong by 
writing this message, I apologize again in advance.


--

  --===--
--== Best Regards! ==--
  --===--

Daniel Ryšlink
Sysadmin @ Quantcom.cz
Czech Republic