merge hcoop spamchecking configuration
authorClinton Ebadi <clinton@unknownlamer.org>
Sun, 4 Oct 2009 22:43:15 +0000 (18:43 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Sun, 4 Oct 2009 22:43:15 +0000 (18:43 -0400)
conf.d/router/550_exim4-config_spamcheck_localuser [new file with mode: 0644]
conf.d/transport/20_exim4-config_spamcheck [new file with mode: 0644]

diff --git a/conf.d/router/550_exim4-config_spamcheck_localuser b/conf.d/router/550_exim4-config_spamcheck_localuser
new file mode 100644 (file)
index 0000000..1bedd3f
--- /dev/null
@@ -0,0 +1,10 @@
+# hcoop-change: Pass email through spamc if its recipient is a valid
+# HCoop user and it has not yet been scanned.
+
+spamcheck_router_localuser:
+  no_verify
+  condition = "${if !eq {$received_protocol}{spam-scanned} {1}{0}}"
+  check_local_user
+  require_files = /etc/spamassassin/addrs/${local_part}@localhost
+  driver = accept
+  transport = spamcheck
diff --git a/conf.d/transport/20_exim4-config_spamcheck b/conf.d/transport/20_exim4-config_spamcheck
new file mode 100644 (file)
index 0000000..910c8bd
--- /dev/null
@@ -0,0 +1,23 @@
+# hcoop-change: Pass email through spamc, back through exim again,
+# marking it as scanned.  Also, remove any pre-existing X-Spam
+# headers from the message.
+
+spamcheck:
+  debug_print = "T: spamassassin_pipe for $local_part@$domain"
+  driver = pipe
+  command = /usr/sbin/exim4 -oMr spam-scanned -bS
+  use_bsmtp
+  transport_filter = /usr/bin/spamc -x
+  home_directory = "/tmp/exim4"
+  current_directory = "/tmp/exim4"
+  user = Debian-exim
+  group = Debian-exim
+  return_fail_output = true
+  return_path_add = false
+  log_fail_output = true
+  temp_errors = *
+  timeout = 5m
+  timeout_defer = true
+  message_prefix =
+  message_suffix =
+  headers_remove = X-Spam-Flag:X-Spam-Status:X-Spam-Level