Thanks Martin...it seems to be almost working...
However, I get the following error in the maillog:
Sep 26 16:21:27 corpmail postfix/local[3486]: 41F61AB543:
to=<jwilliams(_at_)courtesymortgage(_dot_)com>, relay=local, delay=2, status=bounced
(can't create user output file. Command output: procmail: Lock failure on
"/home/spamcop/Maildir/.lock" procmail: Unable to treat as directory
"/home/spamcop/Maildir" procmail: Error while writing to
"/home/spamcop/Maildir" )
So i'm not sure what im doing incorrectly, but I am doing something wrong. :)
Just to verify, what im trying to do is have all email that comes in with
[SPAM] in the headers to be moved to the spamcop user for review.
Would it be better if I made the folder for the spam to be held in
/var/spool/mail ?
I'm new to procmail so im brainstorming and trying to gather some ideas.
Thanks.
Jason
At 12:41 AM 9/27/2003 +0100, you wrote:
Jason Williams <jwilliams(_at_)courtesymortgage(_dot_)com> wrote:
> Thanks Martin...
>
> Here is what I currently have in my /etc/procmailrc
>
> MAILDIR="$HOME/Maildir/"
> SPAM="/home/spamcop/Maildir/"
>
> :0 H:
> * ^Subject:.*[SPAM]
> $SPAM
>
> I've setup SA to write in the subject field, [SPAM]. Im trying to catch it
> with procmail so I can filter it to the spamcop account.
>
> WOuld it be best to use a subject field, or use the one I previously asked
> about?
>
> Thanks for your help.
>
> CHeers,
>
> Jason
Hi Jason,
I'm fairly new to procmail myself, so I don't feel qualified to
say which
nethod is best. AFAIK, it's just a matter of preference in this case. But
you seem to have a problem witht the regular expressions. .*[SPAM] will
match any mail message that ends in the letters S, P, A or M. You need to
escape the [] so procmail doesn't think that you are using them as part of
the regular expression. try this instead :-
MAILDIR="$HOME/Maildir/"
SPAM="/home/spamcop/Maildir/"
:0 H:
* ^Subject:.*\[SPAM\]
$SPAM
Martin
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail