Exim Configuration - Defer instead of Fail over quota users
Hi,
Currently running cPanel / WHM 11.52 on the server in question with no major changes to the exim configuration.
A user has come to us with a request to change the return code when a mailbox is over quota from a hard error (5xx) to a temporary defer (4xx) error.
I've located the stanza in WHM => Exim Configuration Manager => Advanced Editor however I'm not sure how to replace it. It currently says:
But I want to change it to be:
Cheers, Craig
virtual_user_maildir_overquota:
driver = redirect
domains = +user_domains
router_home_directory = ${extract{5}{:}{${lookup passwd{${lookup{$domain}lsearch{/etc/userdomains}
{$value}}}{$value}}}}
require_files = $home/etc/$domain
condition = "${if exists {$home/etc/$domain/quota}{${if > {${lookup{$local_part}lsearch{$home/etc/
$domain/quota}{$value}{0}}}{0}{${perl{checkuserquota}{$domain}{$local_part}{$message_size}{${lookup{
$local_part}lsearch{$home/etc/$domain/quota}{$value}{0}}}{$home/mail/$domain/$local_part/maildirsize
}}}{false}}}{false}}"
user = "${lookup{$domain}lsearch* {/etc/userdomains}{$value}}"
data = :fail:Mailbox quota exceeded
allow_fail
But I want to change it to be:
virtual_user_maildir_overquota:
driver = redirect
domains = +user_domains
router_home_directory = ${extract{5}{:}{${lookup passwd{${lookup{$domain}lsearch{/etc/userdomains}
{$value}}}{$value}}}}
require_files = $home/etc/$domain
condition = "${if exists {$home/etc/$domain/quota}{${if > {${lookup{$local_part}lsearch{$home/etc/
$domain/quota}{$value}{0}}}{0}{${perl{checkuserquota}{$domain}{$local_part}{$message_size}{${lookup{
$local_part}lsearch{$home/etc/$domain/quota}{$value}{0}}}{$home/mail/$domain/$local_part/maildirsize
}}}{false}}}{false}}"
user = "${lookup{$domain}lsearch* {/etc/userdomains}{$value}}"
data = :defer:Mailbox quota exceeded
allow_fail
Cheers, Craig
-
Hello :) You may find this thread helpful: Exim Configuration Editor It's a different router in the Exim configuration file, but the same method of modifying it applies. Thank you. 0
Please sign in to leave a comment.
Comments
1 comment