number of recipients restricted with specific host exceptions
iMS Version: 6.1
I have a need to restrict all senders of email to 10 recipients in a single email message. However, one specific host needs to be able to send to an unlimited (or just a large number) number of recipients on a single message.
From some reading, this isn't all that easy to set up. However, since the exception host is known (by IP/name), we are hoping that simplifies things. Any thoughts?
(the exception host is a server which houses a learning management system. That system allows the professor to send email to the students in the course)
# 1
Hi,
Possible to achieve. Requires a few steps though.
1. Isolate off traffic from your LMS system (in this example represented by 1.2.3.4) to a new source channel:
Create a new mapping table in the style of the INTERNAL_IP mapping table (add to the mappings file) e.g. FRIENDLY_IP
FRIENDLY_IP
$(1.2.3.4/32) $Y
* $N
Add a rewrite rule (imta.cnf) to direct traffic from the FRIENDLY_IP range to the tcp_friendly source channel (needs to be *ABOVE* the INTERNAL_IP rewrite rule which looks almost the same):
! Do mapping lookup for "friendly", non-internal IP addresses
[] $E$R${FRIENDLY_IP,$L}$U%[$L]@tcp_friendly-daemon
Create a new tcp_friendly channel. This should look the same as your existing tcp_intranet channel e.g.
!
! tcp_friendly
tcp_friendly smtp mx single_sys subdirs 20 dequeue_removeroute maxjobs 7 pool SMTP_POOL maytlsserver allowswitchchannel saslswitchchannel tcp_auth missingrecipientpolicy 4
tcp_friendly-daemon
2. Increase the recipient level on the tcp_friendly channel by adding the "recipientlimit <limit>" keyword e.g.
tcp_friendly smtp mx single_sys subdirs 20 dequeue_removeroute maxjobs 7 pool SMTP_POOL maytlsserver allowswitchchannel saslswitchchannel tcp_auth missingrecipientpolicy 4 recipientlimit 100
3. Lock down the recipient limit for other traffic.
Edit the channel definitions for other source channels (such as tcp_local/tcp_intranet/tcp_submit/tcp_auth) and add a smaller recipient (recipientlimit 10) e.g.
tcp_intranet smtp mx single_sys subdirs 20 dequeue_removeroute maxjobs 7 pool SMTP_POOL maytlsserver allowswitchchannel saslswitchchann
el tcp_auth missingrecipientpolicy 4 recipientlimit 10
Then run ./imsimta cnbuild ; ./imsimta restart for it to take effect. You should see emails from your LMS system coming from tcp_friendly rather then tcp_local/tcp_intranet.
Recommend you run through and test these steps on a development/test system first of course.
Regards,
Shane.
# 2
Shane. Wow. I didn't expect such a complete answer from the public forum. Thank you so much.
We actually worked with Support on this many moons ago, but, it appears it never worked. Looking at the configuration, it appears that it may relate to the tcp_friendly channel is *below* the tcp_intranet channel (which contains INTERNAL_IP).
Thanks again.
# 3
Hi,
> Shane. Wow. I didn't expect such a complete answer
> from the public forum. Thank you so much.
Happy to help.
> We actually worked with Support on this many moons
> ago, but, it appears it never worked. Looking at the
> configuration, it appears that it may relate to the
> tcp_friendly channel is *below* the tcp_intranet
> channel (which contains INTERNAL_IP).
Hit this issue myself when I tested the configuration in-house. I think there may have been an underlying assumption that the IP address you were using was not defined already in the INTERNAL_IP address space - so it would have skipped this rewrite rule and matched the FRIENDLY_IP rule.
If you find this configuration works/doesn't work it would be appreciated if you could just update the forum thread -- close the loop and all that.
Regards,
Shane.
# 4
To follow-up on this. This works great Shane. There is just one hitch. It seems as if I can only decrease the number of recipients, not increase it. There seems to be something limiting the number of recipients to 128 -- even if recipientlimit is over that. However, setting recipientlimit to something smaller then 128 definitely does limit the number of recipients to the recipientlimit setting.
Benji
# 5
Hi,
> To follow-up on this. This works great Shane. There
> is just one hitch. It seems as if I can only decrease
> the number of recipients, not increase it. There
> seems to be something limiting the number of
> recipients to 128 -- even if recipientlimit is over
> that.
The 128 limit is the default over-all limit which can be increased using the ALLOW_RECIPIENTS_PER_TRANSACTION SMTP channel option.
e.g.
create the file <msg-svr-base>/config/tcp_local_option and add the line:
ALLOW_RECIPIENTS_PER_TRANSACTION=<number greater then 128>
The recompile/restart the MTA (./imsimta cnbuild;./imsimta restart)
> However, setting recipientlimit to something
> smaller then 128 definitely does limit the number of
> recipients to the recipientlimit setting.
Restrictions work on the least value. So in this case as the over-all restriction is 128 so you can restrict even further but you can't go over this value without increasing the over-all restriction first.
Regards,
Shane.
# 6
Shane -- thanks. That worked. The solution you provided worked very well. The only surprise or deviation was the 128 recipient limit. Of course after implementing this, the other channels needed a restriction on them (I think Shane covered that, but can't remember for sure) in order to limit them to a smaller recipient number.