summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsplit-mailman-mails-and-discard-and-save13
1 files changed, 7 insertions, 6 deletions
diff --git a/split-mailman-mails-and-discard-and-save b/split-mailman-mails-and-discard-and-save
index c7b0d12..9cfb9ea 100755
--- a/split-mailman-mails-and-discard-and-save
+++ b/split-mailman-mails-and-discard-and-save
@@ -217,6 +217,13 @@ def process_mail(filename)
sa_class , sa_text , sa_score = sa_check(held_part)
bogo_class, bogo_text = bogo_check(held_part)
+ spam_info = RMail::Message.new()
+ spam_info.header['Content-Type'] = 'text/plain; charset="us-ascii"'
+ spam_info.header['MIME-Version'] = '1.0'
+ spam_info.header['Content-Transfer-Encoding'] = '8bit'
+ spam_info.body = sa_text + "\n\n" + bogo_text
+ message.body.unshift spam_info
+
if sa_class == "Ham" and bogo_class == "Ham"
store_in_maildir(MAIL_PROCESSED_HAM, message)
approve(cookie, request_address)
@@ -228,12 +235,6 @@ def process_mail(filename)
store_in_maildir(MAIL_PROCESSED_SPAM, message)
discard(cookie, request_address)
else
- spam_info = RMail::Message.new()
- spam_info.header['Content-Type'] = 'text/plain; charset="us-ascii"'
- spam_info.header['MIME-Version'] = '1.0'
- spam_info.header['Content-Transfer-Encoding'] = '8bit'
- spam_info.body = sa_text + "\n\n" + bogo_text
- message.body.unshift spam_info
store_in_maildir(MAIL_PROCESSED_FORWARDED, message)
store_in_maildir(OUTBOX_HUMANS, message)
end