On 2021-05-27 at 11:31:15 UTC-0400 (Thu, 27 May 2021 11:31:15 -0400)
 <post...@ptld.com>
is rumored to have said:


enable_long_queue_ids = yes

New queue files are created with names such as 3Pt2mN2VXxznjll. These are encoded in a 52-character alphabet that contains digits (0-9), upper-case letters (B-Z) and lower-case letters (b-z). For safety reasons the vowels (AEIOUaeiou) are excluded from the alphabet.

21 upper case + 21 lower case + 10 digits = 52 characters

The name format is: 6 or more characters for the time in seconds, 4 characters for the time in microseconds, the 'z'; the remainder is the file inode number encoded in the first 51 characters of the 52-character alphabet.


Is the queue ID fixed length always 16 characters or is the last section inode number dynamic in length?

The range of inode numbers is filesystem-specific. You cannot rely on it being any particular scale.

Safe to assume the 11th character is always 'z'?

For as long as anyone now alive will live, yes. The "6 or more characters" phrase is exceedingly optimistic about the lifetime of Postfix.

It says vowels are excluded, then it says the the inode number is encoded in the fist 51 of the alphabet.

Yes. The first 51 characters of the 52-character alphabet described above, consisting of consonants and digits.

Does that mean 'a' and other vowels can appear in the last inode part of the ID?

No. This is not a reference to The Latin Alphabet, but to the bespoke alphabet defined for Postfix queue IDs.

Or is it safe to validate a queue ID by checking for vowels in any part of the ID?

That should be safe, assuming that you are not trying to deal with the older short form Postfix queue IDs, which are still the default and are widely used. Or Sendmail queue IDs which are similar but different. So if you're looking at Received headers in email you have a complex task validating queue IDs.

Any other tips for parsing logs for queue ID?

Logs should be relatively straightforward, since you can count on the queue IDs being in a fixed location in each line.

--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire

Reply via email to