procmail
[Top] [All Lists]

Procmail Question

2002-11-13 09:38:23
Hello,

I am using procmail version 3.21 2001/06/09 on RedHat 7.0 and experiencing
some strange problems that I hope someone can help me.  To start out, I
created a simple rule to test subject content, if match, mail sender a no
spam message and save the message in a spam accounts mailbox. Using
/etc/procmailrc for testing system wide:

:0H
*  ^Subject.*(testing)
{
   :0:formail4.lock
      | (formail -rt -I"Subject: This message is SPAM, it is blocked from
this host." \
        -A"From: spam(_at_)mydomain(_dot_)com" \
        -A"Reply-To: spam(_at_)mydomain(_dot_)com" \
        -A"X-Loop: loopcontrol(_at_)mydomain(_dot_)com" ;\
        cat /etc/mail/spamnotes ) \
        | /usr/sbin/sendmail -t -N never -R hdrs || true
   :0
      spam
}

This worked perfectly so to continue developing filters, I then created a
.procmailrc in a test account's home directory, commented out the
INCLUDERC=test.rc in the /etc/procmailrc file and placed it in the
.procmailrc file.  The same rule would generate the no spam message for
sender but would not save the message to the spam mail box.  I then changed
the rule to:

:0H
*  ^Subject.*(testing)
{
   :0
     spam

   :0:formail4.lock
      | (formail -rt -I"Subject: This message is SPAM, it is blocked from
this host." \
        -A"From: spam(_at_)mydomain(_dot_)com" \
        -A"Reply-To: spam(_at_)mydomain(_dot_)com" \
        -A"X-Loop: loopcontrol(_at_)mydomain(_dot_)com" ;\
        cat /etc/mail/spamnotes ) \
        | /usr/sbin/sendmail -t -N never -R hdrs || true
}

So it would first save the message to the spam mail box but now it will not
send the No Spam message to sender.  Every document and FAQ I have read
stated that you have to put multiple recipes within the { } braces and it
will work which it did when used system wide but not for local users
.procmailrc?

Also, I noticed others examples that uses \. instead of just . in the
filters, example:

*  ^Subject.*( spam\.com)

OR

*  ^Subject.*( spam.com)

but when I tested this, it worked either way?

Also, I would like to have only one spam collector mailbox so I tried to use
the copy email function:

:0 c
! spam(_at_)mydomain(_dot_)com

or

:0 c
! spam

but I am unable to get this to function when using the .procmailrc file?

Thank you in advanced for any help you can provide.




_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>