【发布时间】:2021-07-13 21:07:12
【问题描述】:
在this suggestion 上跟进mailq sort,在我们的例子中,我们想在排序中添加年份,因为这是一个隔离区。您将如何在第一列中包含第一个字符,即年份? 001CJwkY1702541 的第一个 0 是 2020。
mailq -qQ|grep "^[A-F0-9]" | sort -k8n -k4M -k5n -k6n
001CJwkY1702541 5623 Wed Jan 1 07:19 <user@ourdomain.edu>
同样来自sendmail 8.11 文档,第 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
这似乎很旧,因为001CJwkY1702541 不对应于fYMDhmsNPPPPP。是否有更新的文件显示这一点?第一个数字“0”是年份,第二个数字也是“0”,似乎是一月,第三个数字“1”是月份中的日期。但这并不总是有意义的,例如,使用另一个隔离队列 ID,例如 00ACF2XJ4027295。
【问题讨论】:
标签: regex sendmail mail-queue