?
Solved

Canceling a sendmail message from the queue

Posted on 1998-09-07
1
Medium Priority
?
396 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
blowfish earned 150 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

771 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