Force sendmail to deliver a message in sendmail’s mail queue

by on April 3, 2006 · 4 comments· LAST UPDATED March 13, 2007

in , ,

Sendmail is age-old mail transfer agent (MTA). We still use sendmail on Solaris boxes and all other web hosting (www) server to route mails via our master MTA.

Task: Linux/UNIX deliver old email

The command sendmail -q forces the mail queue to be sent. Use the command mailq to find out what's in the queue:
# sendmail -q
# mailq
Following command will force sendmail to become verbose so that debugging turns into an easy job:

# sendmail -v -q

However, there is a catch. Sendmail would not process your queue if the system load were too high. You can configure these options in sendmail configuration file sendmail.cf and configure QueueLA option. Using this option you can configure load average at which Sendmail simply queues up new messages, this is a good tweaking and troubleshooting parameter.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 4 comments… read them below or add one }

1 lepiaf October 16, 2008 at 3:42 pm

I write the command, but it doesn’t send.


Running /var/spool/mqueue/m9GFSg8s014645 (sequence 1 of 3)
m9GFSg8s014645: locked

What’s the problem ?

Reply

2 Mohammed Shah Newaj November 4, 2010 at 10:50 am

It’s usefull and awsome tools for trouble shooting.

Reply

3 Colin May 27, 2013 at 12:47 am

Hi All

I found that this command was incredibly effective in flushing stuck mail.
sendmail -OTimeout.hoststatus=0m -q -v

This sent out all waiting mail.

The source:

http://stephan.paukner.cc/syslog/archives/33-Flush-deferred-messages-in-sendmail-queue.html

Reply

4 Siddharth Pujare July 24, 2013 at 6:50 am

How to read a mail using messege id in sendmail queue?
For e.g. we use postcat -q in postfix. Is there anything similar for sendmail?

Reply

Leave a Comment

Previous post:

Next post: