Saturday, July 20, 2013

How limit postfix from sending email certain domains in Debian Squeeze

Well all know those certain users that you know they got that job because they are related to someone. And, most of them tend to send mail to made up domains.

This is how to limit them from sending to domains that don't exist.

Open up:
nano /etc/postfix/maps/header_checks

Add the following line per your requirements:
/^To:.*@hotmail\.com\.mx/ REJECT This domain does not exist.
/^To:.*@gmail\.com\.mx/ REJECT This domain does not exist.

You can easily change To: to From: and block receiving emails from those domains as well.

Here is a guide that might help you with other things you might want to block: http://www.akadia.com/services/postfix_uce.html

No comments:

Post a Comment