07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

efore Postgrey. If the client is not listed in any black-list, Whitelister tells<br />

Postfix to accept the message; otherwise, Whitelister's reply is that it has no<br />

opinion, and the message goes on to the next rule in the ruleset (which will<br />

usually be the call to Postgrey). Whitelister listens on port 10000 by default.<br />

smtpd_recipient_restrictions = permit_mynetworks,<br />

[...]<br />

check_policy_service inet:127.0.0.1:10000,<br />

check_policy_service inet:127.0.0.1:60000<br />

Since Whitelister never triggers a definitive rejection, using aggressive DNS<br />

black-lists becomes reasonable, including those listing all dynamic IP addresses<br />

from ISP clients (such as dynablock.njabl.org or dul.dnsbl.sorbs.net).<br />

This can be configured with the rbl parameter in the /etc/whitelister.conf<br />

configuration file.<br />

11.1.5. Customizing Filters Based On the Recipient<br />

The last two sections reviewed many of the possible restrictions. They all have their use in<br />

limiting the amount of received spam, but they also all have their drawbacks. It is therefore<br />

more and more common to customize the set of filters depending on the recipient. At Falcot<br />

Corp, greylisting is interesting for most users, but it hinders the work of some users who need<br />

low latency in their emails (such as the technical support service). Similarly, the commercial<br />

service sometimes has problems receiving emails from some Asian providers who may be listed<br />

in black-lists; this service asked for a non-filtered address so as to be able to correspond.<br />

Postfix provides such a customization of filters with a “restriction class” concept. The classes<br />

are declared in the smtpd_restriction_classes parameter, and defined the same way as smtpd_-<br />

recipient_restrictions. The check_recipient_access directive then defines a table mapping a<br />

given recipient to the appropriate set of restrictions.<br />

smtpd_restriction_classes = greylisting, aggressive, permissive<br />

greylisting = check_policy_service inet:127.0.0.1:10000,<br />

check_policy_service inet:127.0.0.1:60000<br />

aggressive = reject_rbl_client sbl-xbl.spamhaus.org,<br />

check_policy_service inet:127.0.0.1:60000<br />

permissive = permit<br />

smtpd_recipient_restrictions = permit_mynetworks,<br />

reject_unauth_destination,<br />

check_recipient_access hash:/etc/postfix/recipient_access<br />

Example 11.13<br />

Defining restriction classes in main.cf<br />

264 The Debian Administrator's Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!