[Mimedefang] Changes to latest Mail::MIMEDefang/RFC2822.pm
Bill Cole
mdlist-20140424 at billmail.scconsult.com
Sat Nov 5 01:42:52 EDT 2022
On 2022-11-04 at 17:44:28 UTC-0400 (Fri, 4 Nov 2022 15:44:28 -0600)
Philip Prindeville via MIMEDefang <mimedefang at lists.mimedefang.org>
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
bill at scconsult.com or billcole at apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire
More information about the MIMEDefang
mailing list