Friday, October 2, 2009

Episode 5: Block specific sender to specific recipient ..

Issue: I'm trying to configure our mail server to block email from a specific sender reaching a specific recipient. In other words, if one of our employees is getting harassed by a 'stalker', how would one go about blocking, at the MTA (Sendmail) level, a specific sender email address from reaching a particular users inbox? We do not want to capture the email - simply block it before it consumes server resources.

The Sendmail server (MTA) is a front end to our Exchange server so no user accounts exist on the Linux server. We simply use it as a SPAM and Virus scanner then forward clean email to the Exchange server.

Any and all help appreciated

Solution:

I read the Sendmail, 3rd Edition book and resolved the issue.

Mainly, I had to add

FEATURE(`check_compat')
in the /etc/mail/sendmail.mc file

Then I had to create the following entries
Compat:sender@domain.com<@>recipient@ourdomain.com DISCARD
in /etc/mail/access file

No comments:

Post a Comment