====== Exim + DSPAM ====== ===== Exim-Konfiguration ===== Exim4 unter Debian/Sarge. Die Files sind mit Vorsicht zu genießen, weil ich die Reihenfolge der Konfigurationsteile in conf.d leicht umgestellt habe. ## /etc/exim4/conf.d/router/620_local_dspam dspam_router: no_verify # When to scan a message : # - it isn't already flagged as spam from DSPAM # - it isn't local # - it is less than 512k in size require_files = /usr/local/bin/dspam condition = "${if and { \ {!def:h_X-FILTER-DSPAM:} \ {!eq {$received_protocol}{local}} \ { <= {$message_size}{512k}} \ } \ {1}{0}}" headers_add = "X-FILTER-DSPAM: by $primary_hostname on $tod_full" driver = accept transport = dspam_spamcheck # Which users to run dspam for. local_parts = /etc/exim4/dspam_users dspam_addspam_router: driver = accept local_part_prefix = spam- transport = dspam_addspam require_files = /usr/local/bin/dspam local_parts = /etc/exim4/dspam_users dspam_falsepositive_router: driver = accept local_part_prefix = nospam- transport = dspam_falsepositive require_files = /usr/local/bin/dspam local_parts = /etc/exim4/dspam_users ## /etc/exim4/conf.d/transport/45_dspam dspam_spamcheck: driver = pipe command = "/usr/local/bin/dspam --deliver=innocent --user ${lc:$local_part} -f '$sender_address' -bm %u" home_directory = "/tmp" current_directory = "/tmp" user = Debian-exim group = mail log_output = true return_fail_output = true return_path_add = false message_prefix = message_suffix = dspam_addspam: driver = pipe command = "/usr/local/bin/dspam --class=spam --source=error --user ${lc:$local_part} -f '$sender_address' -bm %u" home_directory = "/tmp" current_directory = "/tmp" user = Debian-exim group = mail log_output = true return_fail_output = true return_path_add = false message_prefix = message_suffix = dspam_falsepositive: driver = pipe command = "/usr/local/bin/dspam --class=innocent --source=error --user ${lc:$local_part} -f '$sender_address' -bm %u" home_directory = "/tmp" current_directory = "/tmp" user = Debian-exim group = mail log_output = true return_fail_output = true return_path_add = false message_prefix = message_suffix = Mit dieser Konfiguration können User False-Positives an ''nospam-@example.com'' und False-Negatives an ''spam-@example.com'' schicken, um dden Filter zu trainieren. ===== DSPAM-Konfiguration ===== Die DSPAM-Installation sollte im Groben vonstatten gehen, wie im HOWTO beschrieben (gibt's nicht auch schon Debian-Pakete?). Für Debian wichtig sind wahrscheinlich die folgenden Einstellungen: Home /var/lib/dspam TrustedDeliveryAgent "/usr/sbin/exim4" Trust root Trust Debian-exim Trust www-data ===== Links ===== * [[http://exim.org/|exim]] * [[http://dspam.nuclearelephant.com/|dspam]]