Cancel E-Mail Sent in Linux

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
mad_phpq
Forum Commoner
Posts: 85
Joined: Fri Apr 27, 2007 5:53 am

Cancel E-Mail Sent in Linux

Post 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
mad_phpq
Forum Commoner
Posts: 85
Joined: Fri Apr 27, 2007 5:53 am

Post 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 {} \;
Post Reply