Saturday, July 19, 2008

How To Limit Outgoing Email Recipient Using Sendmail

This sendmail directive implements the number of allowed recipients of each email message. One signature of an email spammer is delivering an email to thousands and hundreds of recipients all at the same time. This sendmail directive prevents that.

MAX_RCPTS_PER_MESSAGE

If an email message comes with more than the allowed number of recipients per message, the excess recipients are stripped out and are rejected but the ones under the limit are accepted and get delivered. This sendmail directive limit applied to outgoing message only.

In other cases of sendmail setup, say a famous social networking site would need a higher max_rcpts_per_message limit. You could decrease the value to a minimum number that suits your needs.

Configure Sendmail for Maximum Email Recipient Limit

Simply backup and edit /etc/mail/sendmail.mc and add the confMAXRCPTSPERMESSAGE sendmail directive as shown below. Say, to define a maximum limit of 30 email recipients would similarly be like

define(`confMAXRCPTSPERMESSAGE', `30')dnl

Note that with some current webmail features, as soon as the maximum recipient is reached, a denied SMTP connection is immediately rejected and denied.

If your company setup define a little less than 30 staff with less email rate activity, you could decrease that to a very minimum level.

0 comments:

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy