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.

Anything similar to this on cPanel?

Discussion in 'General Discussion' started by anup123, Dec 28, 2005.

  1. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    Domain based Message Size Limit?

    Domain Dependant Maximum Message Size Limit something similar to following:

    http://koivi.com/exim4-config/

    If how to available, post a link, if not could someone put everything in one place

    TIA
    Anup
     
    #1 anup123, Dec 28, 2005
    Last edited: Jan 13, 2006
  2. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    which boxes do the routers and transport stuff goes precisely It's fine creating the two files. Yes message_size_limit would have to be set to 0 right in the first box if i am not worng.

    Any suggestions

    Anup
     
  3. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    OK for those who would want to try this and add on to this thread:

    (1) Create /etc/exim/domain-size-limit-messages
    (2) Create /etc/exim/domain-size-limits

    The content of these files can be taken from the link above (with path modifications)

    (3) In router add:

    ##Domain Wise Message Size Mod ##

    large_messages:
    driver = accept
    domains = lsearch;/etc/localdomains
    condition = ${if >{$message_size}{${expand:${lookup{$domain}lsearch*@{/etc/exim/domain-size-limits}}}} {yes}{no}}
    transport = bounce_large_messages
    no_verify

    (4) In transport add:

    # This bounces a message to people who send files too large for that domain#
    bounce_large_messages:
    driver = autoreply
    from = $local_part@$domain
    to = $sender_address
    subject = Re: ${escape:$h_subject:}
    text = ${expand:${lookup{$domain}lsearch*@{/etc/exim/domain-size-limit-messages}}}

    Right in the first box you could add the largest possible mail size that you would want to accesspt with say:

    message_size_limit = 100M (not sure how SM and Horde/IMP would be affected)

    Hit Save

    Test it on a domain by setting the size limit.


    I did test it out and it worked. However, you could check for any errors in exim_paniclog
    If maestros find anything that needs to be corrected, kindly let the cat out of the bag :)
    I am just a beginer on these things so chances of messing it up are high.


    EXTENSION OF THIS:

    If anyone could put up a working model of being able to set largest message size for:

    outgoing mail
    incoming mail

    separately for each domain with similar bounce handling. If all this works then perhaps a feature addition in cPanel ... too early to post it at this stage.

    Cheers
    Anup
     
    #3 anup123, Jan 13, 2006
    Last edited: Jan 13, 2006
  4. Manuel_accu

    Manuel_accu Well-Known Member

    Joined:
    Jun 19, 2005
    Messages:
    191
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    I have one domain xyz.com, I want to set the message size limit to 5Mb for all email accounts under this domain while SENDING mails. In exim how can I do this?

    Thanks,
     
Loading...

Share This Page