Page 1 of 1

Cancel E-Mail Sent in Linux

Posted: Tue Sep 25, 2007 5:19 am
by mad_phpq
Hi,

Can someone tell me how i can cancel an email i send from the shell prompt. I sent an email using the following command

mail -s 'subject' here@domain.prefix < report.txt

I've only just seen that the attachment is 160mb in size. How can i remove it from the mail queue?

Thanks

--Mark

Posted: Tue Sep 25, 2007 6:12 am
by mad_phpq
found a solution. Pretty sure this worked.

http://kb.nitix.com/2559
If you need to clear out the SMTP queue in a hurry, you can use the following:

1. Change to the qmail queue directory:

cd /var/qmail/queue

Warning
Please be VERY sure that you are in /var/qmail/queue when you run the find command below. If you are anywhere else, you risk SERIOUS data loss (although you can recover using idb).

2. Find and remove bulk email:

find -type f -exec rm -f {} \;