diff options
author | Peter Palfrader <peter@palfrader.org> | 2006-06-16 03:06:22 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2006-06-16 03:06:22 +0000 |
commit | 10ecc02a6c33a240b5b7e7c2ef21aefba222668d (patch) | |
tree | 3e763d0b8a3f33886b300e0c72e9926437dff7cd /split-mailman-mails-and-discard-and-save | |
parent | 8e1db222556dafcaa1c016431d51bb24e4d886ef (diff) |
Do spam classification right here, 5
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@135 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'split-mailman-mails-and-discard-and-save')
-rwxr-xr-x | split-mailman-mails-and-discard-and-save | 13 |
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 |