Solved

Canceling a sendmail message from the queue

Posted on 1998-09-07
1
352 Views
Last Modified: 2013-12-26
Hello,
 Whats the official way of canceling a message in a sendmail queue? I have a system that spends most of its time not connected to the internet and then connects periodically to exchange mail. More than once I have needed to cancel a message in the sendmail queue, I usually do this by deleting the three files in the queue, but occasionally the message as gone anyway. Is there a sendmail command that I can use which will properly cancel the message (even if its begun to try and send it - ie mailq shows a * next to the message)

Thanks in advance,
Nicholas Waltham
0
Comment
Question by:nwaltham
1 Comment
 
LVL 2

Accepted Solution

by:
blowfish earned 50 total points
ID: 1293115
If you need to do any "queue maintenance", then the first thing that you should do is stop any currently running sendmail processes.  The easiest way I know of to do that is to run the sendmail script with a stop argument.  For Solaris that would be;

    /etc/init.d/sendmail stop

and for Linux (RedHat) that would be;

    /etc/rc.d/init.d/sendmail stop

Once you have stopped all running sendmail processes, you can delete a queued message by removing all of it's related queue files.  I actually prefer to move the selected queue files into a temporary directory.  But if all you want to do is delete them, the following will work (assuming a queue id of MAA12345);

    cd /var/spool/mqueue
    rm ?fMAA12345

There is no sendmail command that will remove queue files for you, you must remove them from the queue yourself.  

Cheers,

--frankf

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Expand LInux Boot partition remotly 3 85
ORA-01403: no data found 43 89
countEvens challenge 2 74
pre4 challenge 19 93
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now