Question1:
--------------
Title: tens of thousands of spoof/spam mails hog up mailq :
       will 'postsuper -h' placed in a crontab help ?

I have a case where tens of thousands of spam & spoof emails jammed up my
Linux SMTP mail queue (not that I don't have an anti-spam policy but many
of these mails are innocently/accidentally blasted over by internal
colleagues):
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


2nd question:
------------------
Title : Linux OS files that hold postfix incoming & outgoing mails

Does anyone know the equivalent of sendmail's /var/spool/mqueue and
.../clientqueue  files in postfix?

I plan to use a script to extract out the 'witheld' postfix mails, sieve
through
it & generate out a list of 'witheld' mails to be deleted.  Then use a
looping
Shell script to read thru this list to 'postsuper -d " to delete away these
'witheld' mails.  I would like to take a backup of these files first, delete
the
'witheld' mails & just in case I regret the decision later, I can restore
back
the mail or mail queue files to recover them back.

Reply via email to