Back to article
Tuneups and Tweaks for the Better Spam-Trap
Postfix Soft Bounces
October 7, 2004
In parts 1 and 2 of our thrilling "Building an Anti-Virus/Anti-Spam Gateway" series, we covered the basic steps for setting up SpamAssassin and Clam Anti-virus with Postfix. This installment is devoted to testing and tweaking, and creating whitelists in Amavisd-new. Whitelists are essential when you set up any kind of spam filtering: It's the best way to make sure your wanted mail gets through. The first thing to do is configure Postfix for soft bounces. Add this line to
soft_bounce = yes
This converts 5xx response codes to 4xx. 4xx codes are temporary failures, and the sending server is told to keep trying. 5xx response codes are permanent failures, so messages are rejected and the sending server is told to go away, and to not try again. Then you must watch your Postfix and Amavisd-new logs like the proverbial hawk to see what is happening. (See the "Logging Fun" section.)
For a complete list of SMTP response codes, see RFC 2821.