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.

limiting 10 recipient in email/exim

Discussion in 'E-mail Discussions' started by abubin, Jul 5, 2005.

  1. abubin

    abubin Well-Known Member

    Joined:
    Dec 7, 2004
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    Can I know if it is possible to limit to only let's say 10 recipient for an email? I do not want my users to start sending mails with tons of attachment and also this would about spammers.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    The only limitation available through cPanel is the number of emails per hour. Anything else that you want, you'll have to have a look over at www.exim.org - you could probably do it relatively easily using an ACL that counts the number of recipients in an email, but that could be frought with unexpected problems.
     
  3. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    You can limit the number of recipients as follows: Open the Exim Configuration Editor and switch to Advanced Mode. In the very first edit box, enter the following lines and click Save:
    Code:
    recipients_max = 10
    recipients_max_reject = true
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Does that directive apply to both incoming and outgoing email? I would assume that it does. Also, does it refect an email with a max number of recipients, or does it only process the first 10 and reject the rest?

    Also, I wouldn't expect this to block a great deal of outgoing spam at all since most of that is sent out from a list of addresses in discrete emails, not just one big CC list.
     
  5. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    The limitation applies to all messages processed by Exim, both incoming and outgoing. Messages with to many recipients are denied outright--there is no partial delivery.

    I agree that this setting is becoming less relevant as a SPAM deterrent. A year or three back, it used to offer some safeguard back against exploits of Matt's FormMail and later Cpanel's own FormMail scripts (anyone who doesn't know what I am talking of, are probably new in the hosting business :) ). These days I use this restriction as a tool to manage the mail queue--I find messages with bad addresses in the CC and BCC to hang around the queue all too often. Limiting the number of recipients has mitigated this problem significantly.

    Chirpy, I have so often read your postings--you have a wealth of experience and do not hesitate sharing it. It is nice to answer your question for a turn ;)
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Hi Stefaans,

    Thanks very much for the informative reply :) Definitely handy to know.
     
  7. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    If you do this, I think that you could forget about running mailman lists, right? As I recall, Mailman breaks it down into many messages, but each one also has many recipients...
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I don't believe so, IIRC it sends out a separate email for each recipient so it ought not be affected by this.
     
  9. mohakevin

    mohakevin Well-Known Member

    Joined:
    Jan 19, 2005
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    I have limited the number of recipients to 20, and the mailman lists is blocked too:

    2005-11-22 12:07:15 too many recipients: message rejected: sender=<Lista-z-bounces@satel-sa.com> H=localhost (xxxxxxxxxxxxx) [127.0.0.1]

    Is there any solution ?

    The rule has been puted below that :

    #!!# cPanel Exim 4 Config


    Thanks in advance
     
  10. mohakevin

    mohakevin Well-Known Member

    Joined:
    Jan 19, 2005
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Ok, i have found the solution, sorry


    I have tunned the mailman configuration:


    I edit /usr/local/cpanel/3rdparty/mailman/Mailman/mm_cfg.py

    and add:

    # Max recipients for each message
    SMTP_MAX_RCPTS = 15

    # Max messages sent in each SMTP connection
    SMTP_MAX_SESSIONS_PER_CONNECTION = 30


    Sorry and regards.
     
  11. jdstallings

    jdstallings Well-Known Member

    Joined:
    Jul 27, 2003
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    Limiting EMAIL

    Does this alert the sender in anyway or just can the messages?
     
Loading...

Share This Page