procmail
[Top] [All Lists]

Re: Consider LOGFILE and Subject in same recipe

2004-03-18 19:30:44
At 06:33 PM 3/18/2004 -0600, David W. Tamkin wrote:
Now Christopher is saying,

Previous emails were correct saying I needed to use LOGNAME and not
LOGFILE.

All right ... but beyond that ...

So what I did is nest it in another level like this.
:0
* !LOGNAME ?? acccount1
{
  :0
  * !Subject:.*(bunch of subject items)
   {
     Do stuff..
   }
}

That is entirely different. Your first post said you wanted to do stuff if the subject didn't match that pattern OR logfile (you now say logname) didn't match account1. Now you're changing OR to AND.

In this new situation, you don't need two nesting levels.  One is enough.

 :0
 * ! LOGNAME ?? account1
 * ! ^Subject:.*(bunch of subject items)
 { Do stuff.. }

This is pretty much what I was asking in a previous post about this is an AND situation. (I'm still new at this so forgive me) I tried this out once on the sandbox and it wouldn't work right. Now I go and try it again like this and it seems to work like I want it to. Hmm.. wonder how I had it before why it wouldn't work.

Thanks for pointing this out. I'll change it to this now and I think I'll be good.

Thanks.

-Chris







_______________________________________________
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>