[Dovecot] Sendmail and deliver LDA exits with EX_TEMPFAIL on overquota

Sotiris Tsimbonis tsimbonis at forthnet.gr
Mon Oct 20 13:11:49 EEST 2008


On 10/20/2008 12:46 PM, Steffen Kaiser wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Sun, 19 Oct 2008, Sotiris Tsimbonis wrote:
> 
>> But how do we move the rejection at smtp level using sendmail+dovecot 
>> lda?
> 
> When a recipient is valid, the mail is queued locally, then the delivery 
> attempt is made. That means that the SMTP dialogue has been closed 
> already, before the MDA is invoked. sendmail has quite a strict 
> separation between MTA and MDA, or to put it in other words it supports 
> only the basic Unix-style /var/mail/system_user mboxes natively.
> 
> About "Switch to postfix":
> 
> How handles postfix the situation, when you mail to an alias with 
> several recipients, one of them is overquota? Is the mail tempfailed for 
> all of them?
> 
> ==
> 
> Well, you could deploy a milter that verifies the recipients at RCPT TO 
> stage. Depending on your config it may be difficult to map recipient 
> addresses to the particular mail storage (esp. if probed on mail relays).
> 
> If you have a strict naming policy, you can put all users over quota 
> into the access DB and update them regularily - thus avoding the milter.

I have made such a proof-of-concept milter before for mbox and static 
quota assignments, see http://stsimb.irc.gr/2008/02/10/milter-quota/ 
(excuse the Greek language :)).

It has a backend webservice (a cgi script) that calculates and reports 
"OVERQUOTA" using stat on the mbox, and a small milter on the frontend 
that queries this webservice for every recepient..

The problem is, that with Maildir it can be very costly to calculate the 
actual mail usage on every mail delivery attempt..

If I could somehow access dovecot's maildirsize, where the size is 
already calculated and updated on delivery and retrieval, things would 
be better..


Sot.


More information about the dovecot mailing list