我卡住了
我想知道如何检查Q-ID是否为有效的邮件ID。
/var/spool/mqueue (3 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
m9TMLQHG012749 1103 Thu Oct 30 11:21 <apache@localhost.localdomain>
(host map: lookup (electrictoolbox.com): deferred)
<test@electrictoolbox.com>
m9TMLRB9012751 37113 Thu Oct 30 11:21 <apache@localhost.localdomain>
(host map: lookup (electrictoolbox.com): deferred)
<test@electrictoolbox.com>
m9TMLPcg012747 240451 Thu Oct 30 11:21 <apache@localhost.localdomain>
(host map: lookup (electrictoolbox.com): deferred)
<test@electrictoolbox.com>
Total requests: 3
谢谢你的提示
根据您上次的评论,我猜测这就足够了。
randomMailQId=XXXXXXXX # get this populated
if mailq | grep "^$randomMailQIds"; then
echo Valid
else
echo Invalid
fi