You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Michael Bartlett <mi...@gmail.com> on 2008/01/03 12:53:41 UTC

Procmail/SA not moving mail into spam folder

Hi all,

Wonder if you could help me, I'm trying to get my procmailrc to move
all mail marked as spam into another folder - but it doesn't seem to
work. I understand that this could be a procmail problem - but just
wanted to confirm that maybe spamassassin was getting in the way?

This is what my /etc/procmailrc (global) looks like:
DEFAULT=$HOME/Maildir/
DROPPRIVS=yes
LOGFILE=$HOME/procmail.log
LOG="--- Logging ${LOGFILE} for ${LOGNAME}, "

:0fw
| /usr/bin/spamc

:0:
* ^Subject:.*SPAM
$HOME/Maildir/.Junk/


Right now I'm testing with Subject matching as I'm just sending
through test emails with [SPAM] in them as opposed to checking the
headers. Looking at the logfile, the :0: subject matching never
triggers and it seems like the :0fw spam call is doing the move into
my Maildir.

--- Logging /home/mike/procmail.log for mike, From xxxxx@xxxxx.xxx
Thu Jan  3 11:36:03 2008
 Subject: [SPAM] FFS!
  Folder: /home/mike/Maildir/.Junk/new/1199360165.14652_1.server30474.     2460

Any clues?
Thanks
Mike

Re: Procmail/SA not moving mail into spam folder

Posted by Michelle Konzack <li...@freenet.de>.
Hallo Michael,

Am 2008-01-03 11:53:41, schrieb Michael Bartlett:
> Hi all,
> 
> Wonder if you could help me, I'm trying to get my procmailrc to move
> all mail marked as spam into another folder - but it doesn't seem to
> work. I understand that this could be a procmail problem - but just
> wanted to confirm that maybe spamassassin was getting in the way?
> 
> This is what my /etc/procmailrc (global) looks like:
> DEFAULT=$HOME/Maildir/

Better to use:

MAILDIR=${HOME}/Maildir
DEFAULT=${MAILDIR}/

> DROPPRIVS=yes
> LOGFILE=$HOME/procmail.log
> LOG="--- Logging ${LOGFILE} for ${LOGNAME}, "
> 
> :0fw
> | /usr/bin/spamc
> 
> :0:
> * ^Subject:.*SPAM
> $HOME/Maildir/.Junk/

:0
* ^X-Spam-Status: YES
.Junk/

...and Maildirs must not be locked!

> Right now I'm testing with Subject matching as I'm just sending
> through test emails with [SPAM] in them as opposed to checking the
> headers. Looking at the logfile, the :0: subject matching never
> triggers and it seems like the :0fw spam call is doing the move into
> my Maildir.
> 
> --- Logging /home/mike/procmail.log for mike, From xxxxx@xxxxx.xxx
> Thu Jan  3 11:36:03 2008
>  Subject: [SPAM] FFS!
>   Folder: /home/mike/Maildir/.Junk/new/1199360165.14652_1.server30474.     2460

I do not understand where your problem is, since the recipe WAS WORKING

Maybe you should put am "VERBOSE=on" at the beginning of the ~/.procmailrc


Thanks, Greetings and nice Day
    Michelle Konzack
    Systemadministrator
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSN LinuxMichi
0033/6/61925193    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Re: Procmail/SA not moving mail into spam folder

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Thu, 2008-01-03 at 11:53 +0000, Michael Bartlett wrote:
> Wonder if you could help me, I'm trying to get my procmailrc to move
> all mail marked as spam into another folder - but it doesn't seem to
> work. I understand that this could be a procmail problem - but just
> wanted to confirm that maybe spamassassin was getting in the way?
> 
> This is what my /etc/procmailrc (global) looks like:
> DEFAULT=$HOME/Maildir/
> DROPPRIVS=yes
> LOGFILE=$HOME/procmail.log
> LOG="--- Logging ${LOGFILE} for ${LOGNAME}, "
> 
> :0fw
> | /usr/bin/spamc
> 
> :0:
> * ^Subject:.*SPAM
> $HOME/Maildir/.Junk/
> 
> 
> Right now I'm testing with Subject matching as I'm just sending
> through test emails with [SPAM] in them as opposed to checking the
> headers. Looking at the logfile, the :0: subject matching never
> triggers and it seems like the :0fw spam call is doing the move into
> my Maildir.

Huh

> --- Logging /home/mike/procmail.log for mike, From xxxxx@xxxxx.xxx
> Thu Jan  3 11:36:03 2008
>  Subject: [SPAM] FFS!
>   Folder: /home/mike/Maildir/.Junk/new/1199360165.14652_1.server30474.     2460

Ahem... You are confused. :)  Where do you get the impression from, that
it is not working?

The log does *not* tell you anything about matching receipts, let alone
which ones have been evaluated. In fact, the mail is being "moved" as
you put it (actually, delivered) just as you want.

Without looking at the headers of the delivered messages, there is no
way (given the receipts above) to tell, weather the spamc filter has
been called. However, I don't see any reason to believe it has not
(absence of errors in the log). I suggest changing your delivering
receipt to actually match on the proper headers and feed it spam. That
way, you'll see if it works.

Also, according to the log, the mail has been delivered into the .Junk
Maildir. According to your procmail receipts, the delivering receipt
(the last receipt, actually the only delivering receipt) triggered. I
don't see why you believe the filter to have done this. In fact, since
it is a filter and not a delivering receipt, there is no way at all, it
possibly could have delivered the message into your .Junk Maildir...


Just go on. :)  If you still believe it doesn't work as you intend,
please be more verbose and specific about your reasoning.

  guenther


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}