Ron McKeating wrote:
> OK as the OP in this exchange I have been impressed by the depth of
> knowledge show by the people on this list. The problem that made me post
> originally is that we have some users who cut and paste a list of 1800+
> addresses into the bcc line. I would rather they used the university
> dedicated majordomo list server. What I would like to do is reject the
> message with a permanent failure and an error saying something along the
> lines of "too many recipients" nothing fancy like accept the first 100
> or so.
>
> There seems to be several ways of doing this, I was just wondering which
> is the best. recipients_max_reject would seem to be the obvious choice
> or am I missing something.
You probably only want to limit the number of recipients for people
that use your server as a smart host. Mail coming off the rest of
the internet may have more than 100 recipients and since the RFC
places no limit on the number of recipients, you moy reject valid
mail if you set the recipients_max_reject option.
I would do this in the acl_smtp_rcpt:
USE_RELAY_RCPT_LIMIT=yes
RELAY_RCPT_LIMIT=100
# Limit the number of recipients in relayed mail
defer condition = USE_RELAY_RCPT_LIMIT
message = Too many recipients
condition = ${if >{$recipients_count}{RELAY_RCPT_LIMIT} {yes}{no}}
hosts = +relay_from_hosts
!authenticated= *
defer condition = USE_RELAY_RCPT_LIMIT
message = Too many recipients
condition = ${if >{$recipients_count}{RELAY_RCPT_LIMIT} {yes}{no}}
!hosts = +relay_from_hosts
authenticated= *
USE_RELAY_RCPT_LIMIT is a knob that you can set to "no" to turn
this feature off easily.
Ian
--
Ian Freislich