# X-Spam_bar: $spam_bar\n\
# X-Spam_report: $spam_report
- # hcoop-change: Our more-competent solution
- warn
- # Only run through spamassassin if the user wants this
- condition = ${if exists{/etc/spamassassin/addrs/${local_part}@${domain}}\
- {yes}{no}}
- spam = nobody:true
- add_header = X-Spam-Score: $spam_score ($spam_bar)
- add_header = X-Spam-Report: $spam_report
-
# This hook allows you to hook in your own ACLs without having to
# modify this file. If you do it like we suggest, you'll end up with
--- /dev/null
+# hcoop-change: Pass email through spamc if it has not already been
+# scanned.
+
+spamcheck_router_vmail:
+ no_verify
+ condition = "${if !eq {$received_protocol}{spam-scanned} {1}{0}}"
+ require_files = /etc/spamassassin/addrs/${local_part}@${domain}
+ driver = accept
+ transport = spamcheck
--- /dev/null
+# 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
--- /dev/null
+# 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
+ home_directory = "/tmp/exim4"
+ current_directory = "/tmp/exim4"
+ user = Debian-exim
+ group = Debian-exim
+ return_fail_output
+ message_prefix =
+ message_suffix =
+ headers_remove = X-Spam-Flag:X-Spam-Status:X-Spam-Level