Spam

From Hackepedia
Revision as of 12:59, 25 October 2005 by Pbug (talk | contribs)
Jump to navigationJump to search

There is an effective way to block spam using pf and spamd (OpenBSD's version, not SpamAssassin's). These are taken directly from Bob Beck's slide presentation at BSDCAN 2005

in pf.conf (note variables):

table <spamd> persist
no rdr on { lo0, lo1 } from any to any
rdr inet proto tcp from <spamd> to any port smtp -> 127.0.0.1 port 8025
table <spamd-white> persist
rdr pass inet proto tcp from !<spamd-white> to any port smtp -> 127.0.0.1 port 8025
pass in log on $ext_if inet proto tcp to $Mail_servers port smtp keep state
pass out log on $ext_if inet proto tcp from $Mail_servers to any port smtp keep state

and add the cronjob:

*/30    *    *    *    *    /usr/local/sbin/spamd-setup

Also probably worth your time to check out your spamd.conf although it shouldn't require modification to work out of the box. Now moving on to the Testing:Process.