On 2022-11-04 at 17:44:28 UTC-0400 (Fri, 4 Nov 2022 15:44:28 -0600)
Philip Prindeville via MIMEDefang <[email protected]>
is rumored to have said:

Hi,

I'm running 3.1-1 on Fedora 35 and running into some issues w/ my MIMEDefang script not messing with the new gen_date_msgid_headers().

Anyone have logic to generate a prototypical message-id value for use w/ Sendmail?

My submit.cf uses:

H?M?Message-Id: <$t.$i@$j>

So, $j is the FDQN, $i seems to be a random job ID (mangled in part from the PID),

Not random at all. $i is the queue ID, and it has a very deterministic format. Every MTA uses its own style, so the only reason to mimic Sendmail's form is if you really want to specifically mimic Sendmail. MD exposes it as $QueueID, so if you have that for a message, you have $i.

More generally, you can make MD pass any Sendmail macros you want through to mimedefang-filter with '-a' command-line options. See the man page and your MTA documentation for details.

$t is the current time... I guess $i is the tricky one?

Or at least non-trivial...

Depends on your idea of non-trivial. It would be a CS101 program. The modern Sendmail QueueID has 6 characters from a Base60 character set of timestamp (YMDhms,) 2 for a Base60 sequence number and 6 decimal digits for the PID of the sendmail process. The details are in the Bat Book (3rd Ed.) and the code. Postfix "long" IDs use a similar encoding concept using the Base52 microsecond epoch time and the Base51 PID. Exim does something entirely different but also info-laden.

It can be forensically useful to know how those encodings work to sanity-check Received headers. If one wanted to create a plausible false Received header one would need such knowledge, but in my experience people forging Received headers do not have it.


--
Bill Cole
[email protected] or [email protected]
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire

_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

MIMEDefang mailing list [email protected]
https://lists.mimedefang.org/mailman/listinfo/mimedefang_lists.mimedefang.org

Reply via email to