[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Need some scripting assistance
- Subject: [ale] Need some scripting assistance
- From: jimpop at yahoo.com (Jim Popovitch)
- Date: Wed, 28 Jun 2006 13:01:31 -0400
- In-reply-to: <[email protected]>
- References: <06d101c69ac2$591c5600$018410ac@win2kpro1> <[email protected]>
Tim Meanor wrote:
> You could do something like this:
>
> for i in `grep -l mail.panteq.com /var/spool/mqueue/*`;do
> rm $i
> done
Thinks like that won't work well if it's a Sendmail queue. Sendmail
uses multiple files per email to handle queue data, headers, state, etc.
Simply deleting ones that contain a keyword doesn't mean you will get
all relevant files. Additionally Sendmail uses locks to control files,
so therefore you should use something that respects those locks so as to
not delete a file that is currently in use.
I quote from qtool:
"Unless you are absolutely sure you do not interfere with the queue
group selection mechanism, do not move queue files around."
;-)
-Jim P.