OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Can postfix notify to postmaster when over quota ?

From: Alain NAKACHE (alainalinto.net)
Date: Wed May 10 2006 - 08:31:01 CDT


Wietse Venema a écrit :
> Alain NAKACHE:
>
>> A corollary with this maildir quota management with Postfix would be :
>> How Is it possible to build a mechanism in Postfix to accept SMTP
>> incoming mail if and only if Postfix queue doesn't contain overquota
>> deferred email for a recipient ?
>>
>
> When mailbox files are stored outside of Postfix (procmail, maildrop,
> Cyrus, and so on), there is no reliable way to report an over-quota
> condition back to Postfix.
>
> So instead YOU create an access map that rejects mail for over-quota
> users.
>
> This over-quota access table needs to be updated only a couple
> times a day; there is no need to tally up the user's mailbox
> files every time an SMTP client attempts to deliver mail.
>
> In any case, this tallying up must be done outside of Postfix
> for the reasons stated above.
>
>
After a long brain storming, my reflexion led me to think that a hook
(plugin) in the bounce management could be a good place to achieve a
real time overquota accessmap update.

Indeed, it is when a mail leave the queue to bounce that we can safely
delete an overquota alert.

What do you think of that ?
>> Courier-smtp already include such a mechanism by testing exit_code=78
>> when a mail can't be delivered because of overquota in a maildir.
>>
>
> According to /usr/include/sysexits.h:
>
> #define EX_CONFIG 78 /* configuration error */
>
> In other words, this is NOT an over-quota indicator.
>
I know but as it is an unused indicator, I think that Mr Sam decided it
is a good way to warn about an overquota :-)