Solved

Canceling a sendmail message from the queue

Posted on 1998-09-07
1
337 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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 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

11 Experts available now in Live!

Get 1:1 Help Now