procmail
[Top] [All Lists]

Re: Recipe Suggestion

2007-09-29 07:09:37
CT Guy schreef:


  MAILDIR     = '/home/mrhend/mail/domain.comhere/siteadmin'
  DEFAULT     = 'new'

This smells bad, looks like you are abusing the maildir structure.

I suggest:

  MAILDIR   = "$HOME/mail/domain.comhere/siteadmin'
  DEFAULT   = "$MAILDIR/"



 GIFBOX            = '.gifbox/'
 DEVNULL           = '.devnull/'
 BLACKLIST         = '.spam/'
 DISABILITYCENTRAL = '.disabilitycentral/'
 SITES             = '.sites/'
 SPAMASSASSIN      = '.spam/'

I would set those up without the trailing slash, so that you need to put
the trailing slash in the delivery line of the recipe, because it shows
there why no locking is necessary, making the recipe more
self-documenting.



  t = ' '                       #  only a TAB, like "\t"

Are you sure that there is a tab character in there?   (use Ctrl-V +
TAB)


  :0
  * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*
  $DEVNULL

  :0
  * ^X-Spam-Level: \*\*
  $SPAM

If that last recipe doesn't work properly, check if a trailing space is
involved (like in the condition line). Otherwise just switch on logging
(VERBOSE=ON) just before it, and find out.


<big snip>
Please don't "publish" outcommented blocks, it will only make it less
likely that people read your message.




  MATCH   # clear the var
  :0 fw hi
  * ^Received:(_dot_)*(_at_)sites\(_dot_)MYDOMAINHERE\(_dot_)com
  * ^Subject:\/.*
  | formail -i "Subject: [SITES]$MATCH"

  :0 A
  $SITES

  MATCH   # clear the var
  :0 fw hi
  * ^To:(_dot_)*(_at_)sites\(_dot_)DOMAINHERE\(_dot_)com
  * ^Subject:\/.*
  | formail -i "Subject: [SITES]$MATCH"

  :0 A
  $SITES


It is easy to combine these two:

    * ^(Received|To):(_dot_)*(_at_)sites\(_dot_)MYDOMAINHERE\(_dot_)com\>


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

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