Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

blocking emails with sendmail 1

Status
Not open for further replies.

SM777

Technical User
Mar 7, 2001
208
GB
How can I block a certain email address from reaching my mailbox?

I either want the sender to get a bounce back saying my email address doesnt exist (for any email that the sender sends to me), or just delete it without any notification for either sender or recipient.
 
First add this to /etc/mail/sendmail.mc if it's not there.
FEATURE(`access_db')
then do this:
m4 /etc/mail/sendmail.mc > /etc/sendmail.cf

now you need to add something like this to /etc/mail/access :

spammer@aol.com REJECT
cyberspammer.com REJECT
192.168.212 REJECT

Note that you can use an address, domain or ip. Next create access.db with the following command:
makemap hash /etc/mail/access < /etc/mail/access

You should be all set. Don't forget to restart sendmail so it reads sendmail.cf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top