procmail
[Top] [All Lists]

Re: Solved issues, one more question

2007-10-03 02:59:23
Tolga schreef:

DEFAULT=/var/mail/$LOGNAME
MAILDIR = /var/mail/folders/$LOGNAME

OK, you now have MAILDIR properly at a directory.

Setting the value of MAILDIR is like doing a chdir,
see `man procmailrc`.

    :0
    * ^Subject:.*Postfix log summary of (to|yester)day
    pflogsumm

Tip: To make your code stand out better, just indent it.
(as I did above)

You could make this more general

    TEXT2FOLDER = '
Postfix log summary of today=pflogsum
Postfix log summary of yesterday=pflogsum
'

     :0
     * ^Subject:.*\/Postfix log summary of (to|yester)day
     *$ TEXT2FOLDER ?? ^\/$\MATCH=\/.*
     $MATCH/


If pflogsum is not a directory, but a file, then add locking (the ":"
modifier) and remove the trailing slash:

     :0 :
     * ^Subject:.*\/Postfix log summary of (to|yester)day
     *$ TEXT2FOLDER ?? ^\/$\MATCH=\/.*
     $MATCH



How can I create a rule based on Sender,
not From? Correct me if I'm wrong. *
^Sender:(_dot_)*procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE ?

An IMAP-oriented solution:

    :0 :
    * ^Sender:.*\/procmail(_at_)lists\(_dot_)rwth-aachen\(_dot_)de
    * MATCH ^^\/[^(_at_)]+
    .lists/.$MATCH/

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