procmail
[Top] [All Lists]

Re: Procmail to Gifspam to SA ... what next?

2006-12-18 17:58:09
Rado S schreef:
Ruud:

 ### no letters in body
 :0 B:
 * B ?? ! [^a-z]
 $SPAM

I would make that:

  ### initialisation

  LOCKFLAG = ':'
  :0
  * SPAM ?? ()/^^
  { LOCKFLAG }  #  reset

  ### recipes

  :0 $LOCKFLAG
  * ! B ?? [a-z]
  $SPAM

(I assumed that you want to check for a body without any
[a-zA-Z] character)

Right, I see you've put "!" in front: aside from taste, any other
reason?

To negate a condition, I find it strange to put the negation marker
inside the condition.

I also changed [^a-z] to the opposite: [a-z].



As for LOCKFLAG, I know maildir doesn't require locking, but
does it hurt?

It certainly can, with many spam messages per minute. A better name for
the variable is SPAM_LOCKFLAG, to show the relation with the
mailbox-name.


You have recipes with HB in the flags. Best get rid of those,
because an H-flag can cause trouble.

In how-far? You mean the infamous "not reset H flag"?
I learned it the hard way, so I had to put "B ??" where required.

But you still use the H-flag several times. Just remove them, an H-flag
is never needed.


 LOGINFO=SUBJECT
 ### case sensitive D, 1st part begins, 2nd anywhere in subject
 :0 BHD:
 * ^[Ss]ubject:(\
      [ ]*\/(\
      [FP][HARMCYa-z]+[YA]$\
      )\
 |\
      .*\/(\
      [FP][HARMCYa-z]+[YA]$\
      )\
 )
 $SPAM

This seems equivalent to me:

  LOGINFO = 'SUBJECT'
  ### case sensitive D, anywhere in subject
  :0D $LOCKFLAG
  * HB ?? ^[Ss]ubject:.*\/[FP][HARMCYa-z]+[YA]
  $SPAM

Right, but I kept the wrapped version so it's easier to extend
with another line
      |WORD\

I could not find any reason why you had the same expression twice, once
"at the start" and once "anywhere". The second one covers the first one.


but why check "^Subject:.*" in the body? And why is it setting MATCH?

MATCH is being used throughout the system to keep track in the
logfile which rule applied why, in case something went wrong.

OK

-- 
Groet, Ruud


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail