My Exim mail queue was full of spam so I ran a custom grep command to search out spooled messages that contained the spam terms. Problem is, I didn't know that Exim breaks messages up into multiple files (one for header information, one for data, etc.) so my grep command deleted the data files while leaving the header files.
我的进出口邮件队列中满是垃圾邮件,所以我运行了一个自定义grep命令来搜索包含垃圾邮件术语的假消息。问题是,我不知道Exim将消息分解成多个文件(一个用于头信息,一个用于数据,等等),所以我的grep命令在保留头文件的同时删除了数据文件。
Does anyone know of a way I can easily find and delete messages in the queue that have a header file but no data file? Or another way to fix it?
有没有人知道有一种方法,我可以很容易地找到并删除队列中有头文件但没有数据文件的消息?或者另一种解决方法?
2 个解决方案
#1
2
Find them:
找到他们。
exipick '$message_body_missing'
Find and delete them:
找到并删除它们:
exipick -i '$message_body_missing' | xargs exim -Mrm
#2
0
For lack of exipick,
对于缺乏exipick,
cd /var/spool/exim/input
find -name "*-H" -exec sh -c 'H={}; if [ ! -e ${H%-*}-D ]; then rm $H; fi' \;
#1
2
Find them:
找到他们。
exipick '$message_body_missing'
Find and delete them:
找到并删除它们:
exipick -i '$message_body_missing' | xargs exim -Mrm
#2
0
For lack of exipick,
对于缺乏exipick,
cd /var/spool/exim/input
find -name "*-H" -exec sh -c 'H={}; if [ ! -e ${H%-*}-D ]; then rm $H; fi' \;