< Day Day Up > |
Recipe 21.3. Safely Testing New UBE Controls in Postfix21.3.1 ProblemYou want to try some new unsolicited bulk email (UBE) controls in Postfix, because you want to reject as much noxious traffic as possible at the SMTP level, to minimize the load on your server. But you're concerned about bouncing the wrong messages and losing mail you want to receive. 21.3.2 SolutionPostfix has two ways of turning off bounces during testing: globally, and per configuration item. To disable rejects globally, add this line to /etc/postfix/main.cf: soft_bounce = yes This converts 5xx error codes to 4xx. Then you must monitor your logs to see exactly what happens. (See Recipe 20.19 for a description of SMTP response codes.) To configure individual configuration items, use the warn_if_reject qualifier: smtpd_recipient_restrictions = reject_invalid_hostname, reject_non_fqdn_hostname, warn_if_reject reject_non_fqdn_sender, Again, read your logs—Postfix will log a warning, but still deliver the message. Always run postfix reload after making changes to main.cf. 21.3.3 DiscussionPostfix's log files are must-reads for the mail admin at all times, and especially during testing. Fending off unwanted traffic at the SMTP level is efficient, but it's also error-prone, because there are so many misbehaving and misconfigured mail servers. The chances are good that you'll reject mail that you want to keep, so keep an eagle eye on the logs so you know what's going on. This is a quick, easily modifiable regexp to help search for specific messages: # egrep '(reject|warning|error|fatal|panic):' /var/log/maillog 21.3.4 See Also
|
< Day Day Up > |