Using PostFix To Reject Spam | ||||||||
| Line: 153 to 153 | ||||||||
|---|---|---|---|---|---|---|---|---|
| # Access maps for senders that we always want to accept or reject. check_sender_access hash:/usr/local/etc/postfix/sender_access # Access maps for recipients that we always want to accept or reject. | ||||||||
| Changed: | ||||||||
| < < |
check_sender_access hash:/usr/local/etc/postfix/recipient_access | |||||||
| > > |
check_recipient_access hash:/usr/local/etc/postfix/recipient_access | |||||||
| # # Now, we've verified that the recipient is legitimate. The final # suite of tests enforces various anti-UCE policies: | ||||||||
Using PostFix To Reject Spam | ||||||||
| Line: 17 to 17 | ||||||||
|---|---|---|---|---|---|---|---|---|
| 208.162.254.122 REJECT You are not me. Shoo. | ||||||||
| Added: | ||||||||
| > > |
These are domains that are known to be friendly but that may appear in various DnsBlackholeLists. Examples of good canditates for this file are domains of every company that you do business with; you don't want to blacklist your clients, do you?
Alternatively, you can use this as a private blacklist of domains that you never want to receive mail from.
| |||||||
This is a list of our secondary mailservers. We perform some "expensive" filtering at late stages in the pipeline, and if we can trust that our secondary servers have already performed these tests, then there's no need to run them again. Particularly note the GreyListing? feature. We really don't want to greylist mail coming in from our secondaries since it could cause a nasty and needless logjam.
| ||||||||
| Line: 84 to 102 | ||||||||
| # If you can't be polite, then we don't want to talk to you. smtpd_helo_required = yes | ||||||||
| Added: | ||||||||
| > > |
smtpd_client_restrictions = # Test restricting unknown clients warn_if_reject, reject_unknown_client, permit smtpd_etrn_restrictions = permit # Only all explicit hosts to ETRN # check_etrn_access hash:/usr/local/etc/postfix/etrn_access, # reject | |||||||
| smtpd_helo_restrictions = # Allow anyone on our network, by IP address. permit_mynetworks, | ||||||||
| Line: 97 to 127 | ||||||||
| # Allow anyone making it so far. permit | ||||||||
| Deleted: | ||||||||
| < < |
smtpd_client_restrictions = # Test restricting unknown clients warn_if_reject, reject_unknown_client, permit smtpd_etrn_restrictions = permit # Only all explicit hosts to ETRN # check_etrn_access hash:/usr/local/etc/postfix/etrn_access, # reject | |||||||
| smtpd_sender_restrictions = # Authenticated users are good people. Let them talk to us even if # we can't verify their hostname in later steps. | ||||||||
| Line: 132 to 150 | ||||||||
| # At this point, reject relaying for every other domain that we don't # serv. reject_unauth_destination, | ||||||||
| Changed: | ||||||||
| < < |
# OK, we've determined that the recipient is either local or that the # sender is authorized to send email to remote domains. In the case # of local recipients, make sure that the person actually exists # before wasting expensive DNS checks on them. # reject_unlisted_recipients, | |||||||
| > > |
# Access maps for senders that we always want to accept or reject. check_sender_access hash:/usr/local/etc/postfix/sender_access # Access maps for recipients that we always want to accept or reject. check_sender_access hash:/usr/local/etc/postfix/recipient_access | |||||||
| # # Now, we've verified that the recipient is legitimate. The final # suite of tests enforces various anti-UCE policies: | ||||||||
| Line: 146 to 163 | ||||||||
| reject_rbl_client relays.ordb.org, reject_rbl_client list.dsbl.org, reject_rbl_client sbl-xbl.spamhaus.org, | ||||||||
| Changed: | ||||||||
| < < |
# Trust our secondary MXes are equally aggressive at rejecting malformed # messages. Pass mail coming in from any of them. | |||||||
| > > |
# Trust that our secondary MXes are equally aggressive at rejecting # malformed messages. Pass mail coming in from any of them. | |||||||
| check_helo_access hash:/usr/local/etc/postfix/secondary_mx_access, | ||||||||
| Deleted: | ||||||||
| < < |
||||||||
| # SPF check_policy_service unix:private/spfpolicy | ||||||||
| Changed: | ||||||||
| < < |
# # Don't greylist mail that we're a secondary MX for # check_recipient_access hash:/usr/local/etc/postfix/relay_domains, # Grey everything else | |||||||
| > > |
# Greylisting | |||||||
| check_policy_service unix:private/greypolicy | ||||||||
| Deleted: | ||||||||
| < < |
||||||||
| # Ran the gauntlet? Go ahead and send it! permit | ||||||||
| Line: 1 to 1 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Added: | ||||||||||||||||
| > > |
Using PostFix To Reject SpamI've switched several production servers from using SendMail to PostFix for mail transfer. Among its features are an extremely readable configuration file syntax that allows for some very powerful spam filtering.Configuration FilesThe following sections are the contents (or portions) of various PostFix configuration files.
This file mainly used as a deny list. When a remote server (that is, one not on our LAN) says | |||||||||||||||
| META FORM | ClassForm | |
|---|---|---|
| META FIELD TopicClassification | TopicClassification | SystemAdministration |
| META FIELD OsVersion | OsVersion | All |
| META TOPICMOVED | KirkStrauser? | date="1089732788" from="Freebsd.FilterMailWithPostfix" to="Freebsd.FilterMailWithPostFix" |