Link to home
Start Free TrialLog in
Avatar of Jaidenkell
Jaidenkell

asked on

Sendmail Outbound Queue full of NDRs

I've got a sendmail box running the whole clamav/mailscanner/spamassassin on a redhat server and we use it for clients to relay through for email protection.  recently, we had an issue where the server had about 10,000+ messages in the queue that it couldnt' deliver for about 12 hours.  we fixed the issue and the messages that needed to go to the outside world got there fine but now there are like 5,144 messages sitting in my outbound queue waiting to be delivered because they are NDR's (The 4 hour could not send message) that are trying to go to spam-spoofed addresses.  is there a way i can clear these out?  it would be nice if i could just clear out the NDR's that its been trying to send for the past 6 or so hours and leave the regular mail and newer NDR's there for now.

Ideas?
Avatar of PsiCop
PsiCop
Flag of United States of America image

Yes, just delete the qf* and df* files from /var/spool/mqueue (or wherever you have the sendmail queue directory). Since you have such an accurate count, I assume you can specifically identify the message files.
Avatar of Jaidenkell
Jaidenkell

ASKER

well the details i get on the queue files are from mailwatch (which logs mailscanner and all of the stuff it does and puts it into a web interface).  so i can see all of the individual mail files and the totals of the whole mail server, but i cant just delete all of the NDR's and DNR's and leave all of the email that is still in there.  i have a bad feeling that of those 5000+ emails, there are probably about 20 or so that are good and wanted and i'd like to avoid deleting.

on a side note i did try setting the queuereturn to like 5 hours on sendmail.cf and restarting sendmail (in hopes that it will purge the emails older the 5 hours, which are all the deferred spam junk) but it doesn't seem to have taken affect.  did i mis-interpret the function of queuereturn?
ASKER CERTIFIED SOLUTION
Avatar of PsiCop
PsiCop
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Well it looks like it just took a long time for the queuereturn to take effect but it purged teh system and i moved it back up to 15 days.  quite an adventure.  thanks for the help!