limiting 10 recipient in email/exim

abubin

Well-Known Member
Dec 7, 2004
401
3
168
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.
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
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.
 

Stefaans

Well-Known Member
Mar 5, 2002
461
4
318
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
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
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.
 

Stefaans

Well-Known Member
Mar 5, 2002
461
4
318
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 ;)
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,774
328
363
Chesapeake, 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...
 

mohakevin

Well-Known Member
Jan 19, 2005
84
0
156
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=<[email protected]> 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
 

mohakevin

Well-Known Member
Jan 19, 2005
84
0
156
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.
 

jdstallings

Well-Known Member
Jul 27, 2003
60
1
158
USA
cPanel Access Level
Root Administrator
Limiting EMAIL

Stefaans said:
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
Does this alert the sender in anyway or just can the messages?