|
|
< Day Day Up > |
|
Recipe 21.4. Basic UBE Configurations for Postfix21.4.1 ProblemYou want to block as much spam at the SMTP level as possible to minimize the load on your server, so you need to know some basic checks to add to /etc/postfix/main.cf. 21.4.2 SolutionAdd these checks, or some of these checks, to /etc/postfix/main.cf: smtpd_helo_required = yes
disable_vrfy_command = yes
smtpd_recipient_restrictions =
reject_invalid_hostname,
reject_non_fqdn_hostname,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unknown_sender_domain,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
permit_mynetworks,
reject_unauth_destinationAlways run postfix reload after making changes to main.cf. With the exception of the last three lines, which are safe and should always be used, you don't have to use all of these directives. See the "Discussion" section of this recipe to find out what the directives do—they are not specific to spammers, but will also reject mail from misconfigured mail servers, which are all too common. 21.4.3 DiscussionThese directives are for Postfix version 2.0 and newer; the syntax for 1.x is different. It is important to keep Postfix upgraded to the latest stable version, to get security and performance updates. Be sure to follow Recipe Recipe 21.3 for the correct, nondestructive testing procedures. Here's a rundown of what the /etc/postfix/main.cf settings mean. To learn more about the SMTP commands and transaction sequence, read RFC 2821 and Recipe Recipe 20.19.
Running a mail server is a complex, tricky affair, and not all mail admins are as well trained as they should be. Because it is common for mail servers to be misconfigured, and because Postfix can't tell the difference between misconfigured servers and spammers, you may find that trying to implement UBE controls at this level is more trouble than it's worth. 21.4.4 See Also
|
|
|
< Day Day Up > |
|