[Dovecot] Postfix aliases with quota-status service

Ulrich Zehl ulrich-dovecot at topfen.net
Wed Aug 7 09:29:43 EEST 2013


On Tue, Aug 06, 2013 at 09:20:13PM +0200, Thomas Leuxner wrote:
> Now everything in between seems to create SMTPD rejections in some cases
> _or_ queue the mail and let it hit the quota in other cases. That's my
> whole point...

I'm sorry, I don't get your point.

Are you saying that quota-status does not eliminate all over-quota bounces?

That's to be expected. quota-status does not reserve quota when questioned,
it only tells Postfix whether enough space is currently free or not. This
is not free of race conditions, and therefore cannot eliminate all late
bounces, even when quota-status has all the information, including size.

For example, if a mailbox has 3000 bytes of free space, and two 2000 byte
messages arrive close enough together so that the first one has not been
delivered by the time the second one sends "RCPT TO ... SIZE=...",
quota-status will allow both messages, even though the second one will be
rejected when Postfix actually tries local delivery (LTMP/LDA).

Are you saying that rejects depend on SIZE= being sent during the RCPT TO
stage (i.e., messages that announce their size correctly are rejected
during the SMTP transaction, while those without size inidcation are
passed)?

If so, follow Rob's suggestion, and run quota-status (again) as part of
smtpd_end_of_data_restrictions. By then, Postfix will know the size of a
message and pass it to quota-status. 
(This only works for single-recipient messages; multi-recipient messages
will always pass at this stage, because Postfix' policy protocol will not
send "recipient=..." in this case, and thus quota-status replies with
"DUNNO". In my environment, most messages are single-recipient, so it works
well enough for me.)

Are you saying something else that I missed? Please tell me, because I'd
like to understand your point.


More information about the dovecot mailing list