View previous topic :: View next topic |
Author |
Message |
carpman Advocate
Joined: 20 Jun 2002 Posts: 2202 Location: London - UK
|
Posted: Mon Jun 18, 2007 6:08 pm Post subject: global procmailrc and spamassassin [solved] |
|
|
Hello, i have spamassassin setup and have following in global procmailrc:
cat /etc/procmailrc
Code: |
#set up a Spam maildir where all the spam goes for teaching SA spam vs. non-spam
#and to be sure that no mail - even if detected as spam - gets lost (like when you pipe it to /dev/null)
SPAM_FOLDER= $MAILDIR/.spam/
#pipe mails through SA (this is basically from the example files
#but I use a higher limit, every mail up to 512 kB is filtered)
#spamc is the client programm for the daemonized
#version of SA (designed to keep load and overhead down)
#If you don't run SA as a daemon change "spamc" to "/usr/bin/spamassassin"
#If you do use spamc here you must add spamd to your runlevel
#like this: rc-update add spamd default
:0fw: spamassassin.lock
* < 524288
| spamc
#All mail tagged as spam (eg. with a score higher than the set threshold)
#is moved to ".spam".
:0:
* ^X-Spam-Status: Yes
$SPAM_FOLDER
#Work around procmail bug: any output on stderr will cause the "F" in
#"From" to be dropped. This will re-add it.
#(This is taken directly from the SA example file)
:0
* ^^rom[ ]
{
LOG="*** Dropped F off From_ header! Fixing up. "
:0 fhw
| sed -e '1s/^/F/'
} |
Now email is being recognised as spam but is not be sorted into ~/.maildir/.spam folder?
Am i missing something?
here is example header from mail recognised as spam.
Code: |
Received: from localhost by mailserv.publishing.co.uk
with SpamAssassin (version 3.1.8);
Sat, 16 Jun 2007 19:59:40 +0100
From: Mollie <dabk@boosecasey.com>
To: me@mydomain.com
Subject: look our bid
Date: Sun, 17 Jun 2007 12:54:05 -0200
Message-Id: <573343641.93846668077657@boosecasey.com>
X-Spam-Flag: YES
X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on
mailserv.publishing.co.uk
X-Spam-Level: **********
X-Spam-Status: Yes, score=10.4 required=5.0 tests=DATE_IN_FUTURE_12_24,
DIGEST_MULTIPLE,DRUGS_ERECTILE,HTML_MESSAGE,PYZOR_CHECK,
RAZOR2_CF_RANGE_51_100,RAZOR2_CF_RANGE_E4_51_100,RAZOR2_CF_RANGE_E8_51_100,
RAZOR2_CHECK autolearn=no version=3.1.8
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_4674331C.10B4E91D" |
cheers _________________ Work Station - 64bit
Gigabyte GA X48-DQ6 Core2duo E8400
8GB GSkill DDR2-1066
SATA Areca 1210 Raid
BFG OC2 8800 GTS 640mb
--------------------------------
Notebook
Samsung Q45 7100 4gb
Last edited by carpman on Tue Jun 19, 2007 6:44 am; edited 1 time in total |
|
Back to top |
|
|
phant0ml0rd n00b
Joined: 09 Oct 2006 Posts: 34
|
Posted: Mon Jun 18, 2007 6:17 pm Post subject: try this |
|
|
Add this rule after the X-spam-status rule :
Code: | :0:
* ^X-Score-High: YES
$SPAM_FOLDER
|
Also, make sure the spam folder actually exists, if not create it using maildirmake (assuming you have maildirs)
Hope this helps |
|
Back to top |
|
|
carpman Advocate
Joined: 20 Jun 2002 Posts: 2202 Location: London - UK
|
Posted: Mon Jun 18, 2007 7:04 pm Post subject: Re: try this |
|
|
phant0ml0rd wrote: | Add this rule after the X-spam-status rule :
Code: | :0:
* ^X-Score-High: YES
$SPAM_FOLDER
|
Also, make sure the spam folder actually exists, if not create it using maildirmake (assuming you have maildirs)
Hope this helps |
cheers will try that, spam folder does exist though.
Just wondering why is does not filter it with this rule
Code: |
:0:
* ^X-Spam-Status: Yes
$SPAM_FOLDER
|
_________________ Work Station - 64bit
Gigabyte GA X48-DQ6 Core2duo E8400
8GB GSkill DDR2-1066
SATA Areca 1210 Raid
BFG OC2 8800 GTS 640mb
--------------------------------
Notebook
Samsung Q45 7100 4gb |
|
Back to top |
|
|
carpman Advocate
Joined: 20 Jun 2002 Posts: 2202 Location: London - UK
|
Posted: Tue Jun 19, 2007 6:43 am Post subject: |
|
|
Hello, ok just in case anyone else having issues it seems it was due to how i had set default maildir, it was
Code: |
DEFAULT=$HOME/.maildir/
|
changed it to following and it now works.
Code: |
MAILDIR=$HOME/.maildir/
DEFAULT=$MAILDIR/
|
_________________ Work Station - 64bit
Gigabyte GA X48-DQ6 Core2duo E8400
8GB GSkill DDR2-1066
SATA Areca 1210 Raid
BFG OC2 8800 GTS 640mb
--------------------------------
Notebook
Samsung Q45 7100 4gb |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|