[ale] Need some scripting assistance
Jim Popovitch
jimpop at yahoo.com
Wed Jun 28 13:01:31 EDT 2006
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.
More information about the Ale
mailing list