|
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 (alain
alinto.net)
Date: Wed May 10 2006 - 11:32:33 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Wietse Venema a écrit :
> Alain NAKACHE:
> [ Charset ISO-8859-1 unsupported, converting... ]
>
>> 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 ?
>>
>
> I repeat my own words:
>
> 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.
>
>
Wietse, I agree with you. This is not my purpose. I don't want to force
Postfix to manage the deliver. I just want to insert my own mechanism in
the Postfix toolchain in order to defer in realtime the SMTP incoming
email to overquota mailboxes.
This could be managed by a wrapper. The job of this wrapper is to :
1/ call maildrop (or any maildir aware deliver)
2/. test the exit code
2a/ If null (the deliver succeed) then put off the flag in access
map if it is set.
2b/ If overquota (=78 or any other unused value), then put on a
flag for the account in the access map and translate the exit_code :-).
2c/ if not an overquota then return the exit code to pipe as is
The only thing I miss is to catch any mail that leave the queue to
eventually put off the flag in the access map.
>>>> 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 :-)
>>
>
> It is not unused, and it is the wrong status code.
>
Forget it. The wrapper can do it.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]