Re: [exim] Exim + Dovecot deliver overquota problems

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Nikita Koshikov
Date:  
À: exim-users
Sujet: Re: [exim] Exim + Dovecot deliver overquota problems
On Mon, 21 Dec 2009 12:21:41 +0100
Joan <aseques@???> wrote:

> Good morning,
>
> We are having an issue with a dovecot + exim setup.
> We are using dovecot's deliver for the mail delivery with the pipe driver:
>
> dovecot_transport:
> driver = pipe
> command = /usr/lib/dovecot/deliver -d $local_part@$domain -f $sender_address
> user = vmail
> group = vmail
> envelope_to_add = true
> return_path_add = true
> delivery_date_add
> log_output
> temp_errors = 64 : 69 : 70: 71 : 72 : 73 : 74 : 75 : 78
>
> In dovecot.conf I have enabled the quota_full_tempfail, so the deliver
> script fails when the final recipient is overquota.
> quota_full_tempfail = yes
>
> This is working without problems with all the mail except for the
> overquota recipients. On those recipients I get:
> Child process of dovecot_transport transport
> returned 75 (could mean temporary error) from command: /usr/lib/dovecot/deliver
>
> I would like this to be returned as a 550 error (or at least a 450
> temp error), but I get the standard success message:
>
> helo example.com
> ...
> 250 Accepted
> data
> 354 Enter message, ending with "." on a line by itself
> jlk
> .
> 250 OK id=1NMgHz-0004VH-Jw
>
>
> Thanks for your help


You need to check user's quota on routing stage, not transport.

I have wrote perl script for my setup that checks existence of maildirsize file and counting quota value for mailbox on smtp-processing stage, thus if user overquota exim's router will return error and you can treat it as 4xx or 5xx response.

Here is example of exim router:

quota_check:
    driver = redirect
    domains = +local_domains
    allow_defer
    allow_fail
    condition = ${if \
        eq{${perl{check_quota}{$local_part}{$domain}}} {no}\
        }
    data = :fail: Account is under quota //5xx error
    #data = :defer: Account is under quota //4xx error




>
> --
> ## List details at http://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/