Solved

Canceling a sendmail message from the queue

Posted on 1998-09-07
1
370 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.

809 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