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 Bcc CC Limit?

Discussion in 'General Discussion' started by [MuTe], Aug 2, 2006.

  1. [MuTe]

    [MuTe] Member

    Joined:
    Oct 4, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Hey guys,

    I would like to add a limit to the amount of bcc and cc address an email can have in its header.

    Is there a way to do this google hasnt turned up much yet...

    I would like to limit my users to only a few hunderd bcc and cc in emails. Also is there a way to if they try to send too many, reject the message and send them a message detailing their service isnt provided to spam people.

    Thx

    [MuTe]
     
  2. ispro

    ispro Well-Known Member

    Joined:
    Apr 8, 2004
    Messages:
    628
    Likes Received:
    1
    Trophy Points:
    18
    You have two options. Both should be done via Exim Configuration Advanced edit.

    One is global - limit max recipients per EACH outgoing and incoming message.
    Just add the followin at the very first box of Advanced edit:


    Code:
    recipients_max = 15
    
    recipients_max_reject = true
    This will limit to 15 recipients per message. It is global limit and no one can override this.

    If you would like more flexible ACL rules you need to edit Third box, at the section called "check_recipient" add the following:

    Code:
    # Limit the number of recipients in sent email
    deny message      = Too many recipients, 15 maximum without SMTP Authentication
            condition    = ${if >{$recipients_count}{15} {yes}{no}}
            !authenticated= *
    deny message      = Too many recipients, 200 maximum with SMTP Authentication
            condition    = ${if >{$recipients_count}{200} {yes}{no}}
    This is the sample which limit non-authorized senders to 15 recipients and SMTP-authorized with 200 recipients.

    Of course, you may enter any conditions you wish! You may use lsearch and have file with whitelisted senders/hosts/etc. Use anything which suits better for you.

    Enjoy!
     
  3. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar
    This rules also affect to my mailing list.

    Every mailist send by my user that over 15 will be rejected.
     
  4. ispro

    ispro Well-Known Member

    Joined:
    Apr 8, 2004
    Messages:
    628
    Likes Received:
    1
    Trophy Points:
    18
    Easy to solve!

    Open this file for edit:
    /usr/local/cpanel/3rdparty/mailman/Mailman/mm_cfg.py

    And add the following at the end:
    Code:
    # Max recipients for each message
    SMTP_MAX_RCPTS = 10
    
    # Max messages sent in each SMTP connection
    SMTP_MAX_SESSIONS_PER_CONNECTION = 10
    This way Mailman will be compatible with Exim limit.

    Enjoy!
     
  5. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar
    After add that rules, do i need to restart mailman ?
    If yes, how to restart mailman from shell ?
     
  6. tuxguroo

    tuxguroo Member

    Joined:
    Aug 28, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    start mailman

    You can start mailman by running the following script :

    /usr/local/cpanel/3rdparty/mailman/bin/mailmanctl start

    :D
     
  7. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar
    Thanks to ispro and tuxguroo :D

    Also for [Mute] that start this thread
     
Loading...

Share This Page