Old 8th February 2013, 19:49
rlischer rlischer is offline
Senior Member
Join Date: Jul 2009
Posts: 121
Thanks: 6
Thanked 1 Time in 1 Post
Default Simple Mail Queue Question

What exactly is the mail queue? I see email pop up in there every now and then, some stay for hours some don't. Does this mean some are stuck? Is there a was to clear it or force a stuck email to send?

running Debian Squeeze perfect server nginx.

Reply With Quote
Sponsored Links
Old 9th February 2013, 01:00
Parsec Parsec is offline
Join Date: Jan 2013
Posts: 66
Thanks: 1
Thanked 9 Times in 8 Posts

Ok, the answer could get complex quite easily but I'll try to keep it simple rather then technical.

The mail queue is the process the mail server uses to store an email for delivery. Every email will go into the queue. Think of it as a temporary place the mail server puts it while it decides what to do with it.

When ready, the mail server will pull the email from the queue and do what is decided has to be done with it. If there is a problem with the action, the mailserver will return the email to the queue and try the action again later.

So, say you are sending an email to some one, your email is received by your mailserver and goes into the queue. then the mail server grabs it again and attempts to deliver it, if all goes well, it's done and gone. If the other end is offline, has a problem etc, the mail server fails to deliver the email and thus returns it to the queue - it will try and deliver it again later.

There can be a zillion reasons why an email isn't delivered straight away - thus the queue is important. If the email cannot be delivered then that's when you receive a bounce. There are hard and soft bounces - but I won't get into that here.

Assuming you are using postfix on your debian system the mail queue can be viewed from the command line with "postqueue -p", you can force postfix to try and send all mail in the queue by "postqueue -f". If you do this you should also watch your log "tail -f /var/log/mail.log" to see reasons why the mail isn't delivered. You can also most probably find web cgi based programs to view the queue - if you want.

For postfix, the config lines in main.cf which control how long postfix will leave the mail in the queue before giving up are "bounce_queue_lifetime" and maybe "maximal_queue_lifetime". With ISPConfig these are left at default values - you can see these by "postconf -d | grep queue" on the command line.

So in answer to your question, the mail queue is a good thing and if you are woried about why some appear to stay there a while then maybe you need to find something that displays you the current queue. I use a little web cgi (perl) script that outputs it to a webpage called "webq.pl" but I don't remember where I got it.

Hmm, did I actually answer your question?
Reply With Quote
Old 9th February 2013, 02:37
rlischer rlischer is offline
Senior Member
Join Date: Jul 2009
Posts: 121
Thanks: 6
Thanked 1 Time in 1 Post

Wow! Thank you very much, this makes sense to me now. I appreciate the way you explained it! My queue is empty now so now I feel confident that things are working well.

Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendig mail Error fisherofer Installation/Configuration 12 30th November 2011 08:56
Postfix/courier/Centos 6 cant send email to external email servers maxtorzito Installation/Configuration 14 7th October 2011 11:56
installing squirrelmail on Debian with ispconfig3 saco721 Installation/Configuration 18 1st April 2011 18:57
just the last step...and it works. Postfix...need help config. ubuntusr Installation/Configuration 1 5th January 2009 10:50
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs ebbay Installation/Configuration 9 4th March 2006 12:47

All times are GMT +2. The time now is 17:21.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.