Koozali.org formerly Contribs.org

Qmail local queues

Qmail local queues
« on: May 03, 2011, 09:51:40 AM »
I have some email that staying too long in queues.
From different reasons emails are trying to sent for 7 or 10 days.
Is possible to let server to try only 1 day until to return to render?
How to do that?

Offline mmccarn

  • *
  • 2,392
Re: Qmail local queues
« Reply #1 on: May 04, 2011, 04:48:56 AM »
From looking at the man page for qmail-send, it looks as though you need to create the file /var/qmail/control/queuelifetime containing the number of seconds you want the queue to last before the email sender gets an "undeliverable" message.

The default value is 604800 seconds, or one week.

You can change your queue timeout to 24 hrs using:
Code: [Select]
echo 86400 > /var/qmail/control/queuelifetime
sv t qmail

Since the queuelifetime control file is not templated, this may be all you need to do.  However, you should check that the file still exists any time you update your server.



Offline Jáder

  • *
  • 1,057
    • LinuxFacil
Re: Qmail local queues
« Reply #2 on: May 04, 2011, 03:20:01 PM »
I loved the info... thank you.

By the way, I think this should be a db parameter!
And maybe we should update wiki with this info or even make this file a permanent part of SME with a lower limit... one week is too much time these days! :)

Regards

Jáder
...

Re: Qmail local queues
« Reply #3 on: May 06, 2011, 08:44:16 AM »
I made that setting last year and is reseting after restart.
 

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: Qmail local queues
« Reply #4 on: May 06, 2011, 08:52:50 AM »
I made that setting last year and is reseting after restart.
That is because SME Server is using a templating system to generate the configuration files, it might be that the template system is removing the fragment.

You could try:

Code: [Select]
mkdir -p /etc/e-smith/templates-custom/var/qmail/control
echo 86400 > /etc/e-smith/templates-custom/var/qmail/control/queuelifetime
expand-template /var/qmail/control/queuelifetime
sv t qmail
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Re: Qmail local queues
« Reply #5 on: May 06, 2011, 08:55:35 AM »
Thank you ,

Is working.

Re: Qmail local queues
« Reply #6 on: May 06, 2011, 05:51:35 PM »
I have some email that staying too long in queues.

How are you deciding what is "too long"?

Quote
Is possible to let server to try only 1 day until to return to render?

If you do that, you will unnecessarily return mail when there is just a temporary network or server problem.

Re: Qmail local queues
« Reply #7 on: May 10, 2011, 10:44:55 AM »
How are you deciding what is "too long"?

If you do that, you will unnecessarily return mail when there is just a temporary network or server problem.

I have some urgent emails and 1 week to wait for a failure is too much for users, is faster to search for another solution

Offline Jáder

  • *
  • 1,057
    • LinuxFacil
Re: Qmail local queues
« Reply #8 on: May 10, 2011, 01:43:48 PM »
Nowadays, everyone think about e-mail as something must get delivered in a few minutes.
I know is not this way it was thinked about, but then was 20 years ago, when dial up rules!
In a business environment, do not have an e-mail delivered after one day is too much.
IMHO iIf there are any problem, it's better to know it was no delivered then wait 1 week to return.
So just after to find out about this timing, I change several of my SME install to 1 day timeout. One client even asked for a 4 hours timeout!
I (and my clients) know if there are ANY problem with our server, their servers or even on web, the e-mail will return sooner than it could... but everyone I talk appears to prefer this way.
I'll put those templating commands in wiki if nobody has nothing against it!
  because I think it's a REALLY NICE FEATURE to be able to control in how much time your messages return if not delivered.
...

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: Qmail local queues
« Reply #9 on: May 10, 2011, 07:10:17 PM »
The problem is that you can not influence every server in the line to the addressed person. It might very well be that your server is now only trying for a day, but what does for instance a mail really server do that might be in the chain?

Apart from that being delivered might not mean that it is read, it might be spam filtered, rejected by a virusscan or even deleted unread by the intended receiver.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Jáder

  • *
  • 1,057
    • LinuxFacil
Re: Qmail local queues
« Reply #10 on: May 10, 2011, 10:03:07 PM »
The problem is that you can not influence every server in the line to the addressed person. It might very well be that your server is now only trying for a day, but what does for instance a mail really server do that might be in the chain?

Apart from that being delivered might not mean that it is read, it might be spam filtered, rejected by a virusscan or even deleted unread by the intended receiver.

Cactus

I think this is a personal option and to document it allow every person choose the best option/timing for his environment.
To me, and all my clients, return ALL e-mail not delivered in a day (for WHATEVER reason) is a good option.

I don´t have problems if e-mail arrives and get moved to junkmail/spam folder... just if it do not get delivered in time.
Most of companies have a SMTP server running and get e-mail in less than 30 minutes  (time to process a LOOOG queue of e-mails even in a ISP!) because delivered is configurated server to server. All others... already have enough problems to care than miss one or two e-mails! :D

UPDATE: documented in http://wiki.contribs.org/Email#How_long_retry_before_return_e-mail_as_undeliverable
« Last Edit: May 12, 2011, 12:56:19 PM by jader »
...