View Single Post
  #2  
Old 9th February 2013, 00:00
Parsec Parsec is offline
Member
 
Join Date: Jan 2013
Posts: 66
Thanks: 1
Thanked 9 Times in 8 Posts
Default

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