Benutzer-Werkzeuge

Webseiten-Werkzeuge


freebsd:spamd

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
freebsd:spamd [2009/04/03 17:10]
Idefix
freebsd:spamd [2013/12/16 12:31] (aktuell)
idefix freebsd-spamd umbenannt in freebsd:spamd
Zeile 1: Zeile 1:
 +Installing it:
 +<​code>​
 +cd /​usr/​ports/​mail/​spamd
 +make install
 +make clean
 +</​code>​
 +
 +Enable spamd in rc.conf:
 +<​code>​
 +  - enable spamd
 +obspamd_enable="​YES"​
 +obspamlogd_enable="​YES"​
 +</​code>​
 +
 +Edit /etc/fstab:
 +<​code>​
 +  -  mount for spamd
 +fdescfs ​                /​dev/​fd ​        ​fdescfs rw              0       0
 +</​code>​
 +and mount it with:
 +<​code>​
 +mount -a
 +</​code>​
 +
 +Create the configuration file:
 +<​code>​
 +cd /​usr/​local/​etc/​spamd
 +cp spamd.conf.sample spamd.conf
 +</​code>​
 +
 +We log the entries in a seperate file, edit /​etc/​syslog.conf for this:
 +<​code>​
 +!spamd
 +daemon.err;​daemon.warn;​daemon.info ​             /​var/​log/​spamd
 +</​code>​
 +and restart it:
 +<​code>​
 +touch /​var/​log/​spamd
 +chmod 644 /​var/​log/​spamd
 +touch /​usr/​local/​etc/​mail/​spamd-mywhite
 +chmod 644 /​usr/​local/​etc/​mail/​spamd-mywhite
 +/​etc/​rc.d/​syslogd restart
 +</​code>​
 +
 +We enable log rotating by editing /​etc/​newsyslog.conf:​
 +<​code>​
 +/​var/​log/​spamd ​                         644  7     ​100 ​ *     JC
 +</​code>​
 +and reload the config with:
 +<​code>​
 +/​etc/​rc.d/​newsyslog restart
 +</​code>​
 +
 +Now start it with:
 +<​code>​
 +/​usr/​local/​etc/​rc.d/​obspamd start
 +/​usr/​local/​etc/​rc.d/​obspamlogd start
 +</​code>​
 +
 +Now we redirect the traffic by using pf.
 +Make sure you have something like the following lines in your /​etc/​rc.conf:​
 +<​code>​
 +  -  enable pf
 +pf_enable="​YES"​
 +pf_rules="/​etc/​pf.conf"​
 +pf_flags=""​
 +pflog_enable="​YES"​
 +pflog_logfile="/​var/​log/​pflog"​
 +pflog_flags=""​
 +</​code>​
 +
 +Now edit your /​etc/​pf.conf and add:
 +<​code>​
 +table <​spamd-white>​ persist
 +table <​spamd-mywhite>​ persist file "/​usr/​local/​etc/​mail/​spamd-mywhite"​
 +
 +  -  redirect unkown mail sender to spamd
 +no rdr inet proto tcp from <​spamd-white>​ to any \\
 +<​code>​
 +        port smtp</​code>​
 +no rdr inet proto tcp from <​spamd-mywhite>​ to any \\
 +<​code>​
 +        port smtp</​code>​
 +rdr pass inet proto tcp from any to any \\
 +<​code>​
 +        port smtp -> 127.0.0.1 port spamd</​code>​
 +</​code>​
 +and reload pf with:
 +<​code>​
 +/​etc/​rc.d/​pf restart
 +</​code>​
  
freebsd/spamd.txt · Zuletzt geändert: 2013/12/16 12:31 von idefix