Following up on this suggestion for a mailq sort
, in our case we'd like to add the year in the sort, as this is a quarantine. How would you include the first character in the first column, which is the year? The first 0 from 001CJwkY1702541
is 2020.
mailq -qQ|grep "^[A-F0-9]" | sort -k8n -k4M -k5n -k6n
001CJwkY1702541 5623 Wed Jan 1 07:19 <user@ourdomain.edu>
Also from the sendmail 8.11 docs, page 79:
All queue files have the name x fYMDhmsNPPPPP where YMDhmsNPPPPP is the id for this message and the x is a type. The individual letters in the id are:
Y Encoded year
M Encoded month
D Encoded day
h Encoded hour
m Encoded minute
s Encoded second
N Envelope number
PPPPP At least five digits of the process ID
This appears to be old as 001CJwkY1702541
does not correspond to fYMDhmsNPPPPP
. Is there an updated document that shows this? The first number, "0" is the year and the second number, also a "0", appears to be January, and the third number, "1", is the day of the month. But that doesn't always make sense, e.g., with another quarantined queue id such as 00ACF2XJ4027295
.