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.

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?

有帮助吗?

解决方案

Find them:

exipick '$message_body_missing'

Find and delete them:

exipick -i '$message_body_missing' | xargs exim -Mrm

其他提示

For lack of exipick,

cd /var/spool/exim/input
find -name "*-H" -exec sh -c 'H={}; if [ ! -e ${H%-*}-D ]; then rm $H; fi' \;
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top