Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a mail server with postfix, and I want to differenciate the bouncing rules.

maximal_queue_lifetime = 12h

bounce_queue_lifetime = 12h

Ok, its 12h (maybe it should be more). But I want to have a shorter bounce lifetime when a user has his mailbox full. Is it possible to configure postfix like this?

Thanks in advance

share|improve this question
You could change a local delivery failure to be fatal, so that postfix will bounce the message immediately. – Dan Pritts Feb 13 '14 at 19:30
Can you elaborate please? Ty – Ricardo Feb 17 '14 at 13:09
normally when you have a local delivery failure (i.e., the command to put the message in the user mailbox fails), this is a non-fatal error and postfix will re-queue the message. You could change the configuration (i'm not exactly sure how) to change this to a fatal error, which will cause an immediate bounce. I'd do what quadruplebucky suggests instead, though. – Dan Pritts Feb 17 '14 at 17:12
up vote 1 down vote accepted

As far as I am aware, Postfix does not let you configure different lifetime for messages depending on the failure code. The behavior of a system implementing different lifetimes depending on the response may also be a bit unpredictable, in case a message gets different errors on different retries.

Do you really get so many bounce messages that this is a problem?

By the way, lifetime of 5 days is more reasonable than 12h. Many system administrators assume that a mail server can be offline up to 24 hours with a minimal risk of losing incoming mail...

share|improve this answer
It does let you set different timeouts for the bounce and defer queues, just as he has it written. I agree that a timeout of 12h is too short. – quadruplebucky Feb 16 '14 at 5:01
Yes, i get alot of mailbox full bounces. I agree on the 5days bounce limit, but that would increase my mailqueue ALOT. I mean, almost 100% of my bouncing mails are for the same reason: mailbox full. Should I make a cron for this? – Ricardo Feb 17 '14 at 10:55
@Ricardo: Is it an actual, measurable, performance problem? My experience is that there are many other things with a larger impact on the performance of the mail server than the length of the bounce queue... – pehrs Feb 17 '14 at 12:55
Well no, not at all. The problem here its not performance, its the alert system that we have. It fires an alarm each time the mailqueue reaches a certain number of bounces. That kinda "scares" ppl around me. Maybe the problem is that this alarm its too sensitive, and we should allow ALOT more emails to bounce. – Ricardo Feb 17 '14 at 13:04
Sounds like the alarm is not tuned correctly, but it is hard to tell without knowing the use case. I would not worry so much about the length bounce queue. We do have a similar alarm, but it is configured to go off on sudden changes in the number of messages successfully delivered. – pehrs Feb 17 '14 at 13:34

Yes, since postfix 2.1 you can set bounce_queue_lifetime separately from maximal_queue_lifetime, exactly as you have it written.

Note that you must have soft_bounce = no in your, otherwise the bounces will use 4XX codes and will wind up in the defer queue and be subject to maximal_queue_time rather than the 5XX codes that will put it in the bounce queue (subject to bounce_queue_lifetime). A mail to a mailbox that exceeds mailbox_size_limit

Note that you can't override these from -o parameters, here's what Wietse Venema has to say about that

I seriously doubt this is a problem more than an annoyance, though. Here's what Wietse has to say about it

12h is too short a time, IMHO. The default of 5 days is reasaonable and not a significant burden to any but the busiest systems.

Note that RFC 3463 status codes 2.XXX.XXX for success, 4.XXX.XXX for temporary, try later, 5.XXX.XXX for permanent failure aren't the same as the EXITCODE that tells bounce(8) what status code to return. You can test this behavior with a .forward (or alias) as simple as "| EXITCODE=73" (can't create user output file, a 5.2.0 hard bounce) or "|EXITCODE=75" (persistent transient failure, retry). These are defined in /usr/include/sysexits.h

You can customize templates and codes returned, see the man pages for bounce(5) and postconf.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.