The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Exim Configuration - Defer instead of Fail over quota users

Discussion in 'E-mail Discussions' started by Craig Marchant, Dec 22, 2015.

  1. Craig Marchant

    Craig Marchant Registered

    Joined:
    Dec 22, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Melbourne, VIC, Australia
    cPanel Access Level:
    DataCenter Provider
    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:

    Code:
    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:

    Code:
    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
     
    #1 Craig Marchant, Dec 22, 2015
    Last edited by a moderator: Dec 22, 2015
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,814
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page