SMTP mailq : can postsuper move mails to another queue that is not scanned

sunhux G sunhux at gmail.com
Thu Oct 21 10:01:18 UTC 2010


I have a case where tens of thousands of spam & spoof emails jammed up my
Linux SMTP mail queue :
mailq | grep MAILER | wc -l    ==> tens of thousands

This caused genuine emails (which is usually a couple hundreds only) to
queue
up & not being processed because the it will take forever to scan from the
top
to the end of the mailq with tens of thousands of emails.

However, I don't want to delete away those spam/spoof mails, just want to
move
them to somewhere else (say another queue) so that I can review & in case
there
 are genuine ones, I'll redeliver them later.

I thought of:
mailq | grep -i mailer | awk '{print ($1)}' | grep -v "@"  >
listofsuspectmails.txt

for each queue id or mail entry id in listofsuspectmails.txt,  I'll do a
    postsuper -h entry_id
to hold the suspect email & after reviewing if I want to release, issue
    postsuper -H entry_id

Question is :
Are the 'held' mails still something that will be scanned (& thus prolonged
the
scan time) or scanning of mail queue will skip 'witheld' mails?  If I have
100000
'witheld' emails & they're still being scanned, it will defeat this purpose
of me
witholding the mails.

Currently we manually do a " postsuper -d entry_id " to delete away emails
(which can be automated with a Shell script but I don't want to automate
deletion as we may delete possibly genuine emails) after examining the
emails

Any other solution are welcome


Thanks
U



More information about the redhat-list mailing list