[Exim] Don't deliver to procmail if system quota is over/nea…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Stian Grytoyr
Dátum:  
Címzett: exim-users
Tárgy: [Exim] Don't deliver to procmail if system quota is over/near limit
I'm trying to figure out how to make procmail deliveries
more robust, by checking if the user's system quota is
exceeded, or nearing its limit.

As it is now, the message is handed over to procmail, which
discovers that there is no space available, so the message
is appended to /var/mail/<username> instead of begin
delivered to the user's Maildir folder. This has caused some
frustration, so we need a more robust solution.

My idea was to have a router with a condition that runs a
command to check for available space. If the condition is
true (there isn't enough space), the message is kept on
queue and retried at the usual intervals. Is that possible?

Or is there perhaps a better way to solve this?

Here is our router:

  procmail:
    driver = accept
    check_local_user
    transport = procmail_pipe
    require_files = ${local_part}:+${home}/.procmailrc
    no_verify
    no_expn


And here is our transport:

  procmail_pipe:
    driver = pipe
    command =  /local/bin/procmail -d $local_part
    return_path_add
    delivery_date_add
    envelope_to_add
    check_string = "From "
    escape_string = ">From "
    user = $local_part
    group = mail
    log_fail_output
    log_defer_output
    return_fail_output


Thanks for any help.

--
Regards,
Stian Grytoyr