I have already made similar scripts, but the issue is that it runs "postcat"
and "postsuper" once for every queue ID, so it becomes absolutely unusable
when needing to delete tens- or hundreds of thousands of emails.

So far I have been lucky in that most of spam scripts send mail with only a
few different sender email addresses, so I've been able to grep the output
of "postqueue -p" 4-5 times, used Vim to create a long list of queue IDs and
fed it to "postsuper -d -" through the standard input.

However, I'm never sure I've caught all the spam mails sent from the
specific IP, and some day I could have to clean up the spam of a script that
generates random sender email addresses. That day I'm going to need a fast
script that can filter queue IDs by sender IP.

I really, really wish "postcat -e" had a "-" option, like postsuper, that
allowed me to stream queue IDs in through stdin...



--
View this message in context: 
http://postfix.1071664.n5.nabble.com/Is-there-any-documentation-on-the-binary-format-of-the-mail-files-under-var-spool-postfix-tp90656p90662.html
Sent from the Postfix Users mailing list archive at Nabble.com.

Reply via email to