Page 1 of 1

Mailq

Posted: Thu Dec 20, 2007 11:36 am
by JasonWarren
Hi,
If I want to remove all mail from the mailq is there a better way than manually deleting files from the following directory?

Code: Select all

# cd /var/spool/mqueue

Code: Select all

# rm <insert your file name here>


Any help would be appreciated.

Best regards,

Jason

Posted: Thu Dec 20, 2007 11:56 am
by techsharp
Sure

do this:

cd /var/spool/mqueue

and then rm -f *

that will delete every message in that folder.

Posted: Sun Jan 13, 2008 4:08 pm
by JasonWarren
Hi
thanks for the reply, but can I ask whether its safe to delete mail from the mailq at any time or should the scalix/sendmail services be stopped first.

Best regards,


Jason

Posted: Sun Jan 13, 2008 4:39 pm
by mikethebike
Jason,

best to stop sendmail, then run:

fuser *

to make sure there are no processes with those files open.

then rm -f d*
rm -f q*

Mick