procmail
[Top] [All Lists]

Re: Still tweaking .procmailrc

2002-01-07 20:05:15
At 10:29 2002-01-08 +0800, Mohsenruddin Moonshi did say:

INCLUDERC=$HOME/procmail/spam.rc
INCLUDERC=$HOME/procmail/sort.rc
INCLUDERC=$HOME/procmail/mailing-lists.rc

# "$HOME/procmail/spam.rc" containts all the rules
# to filter spams and $HOME/procmail/sort.rc contains
# all the rules to sort.

Suggestion: if the includerc's really need an explanation, put it above each one, not as a block down below.

Otherwise, yes, such modularization is part of the goal of INCLUDERC. It also allows for quickly disabling an entire set of rules, or replacing them with an alternate set.

Second question:
In Microsoft Outlook, I can sort my mails as it is downloaded to my
INBOX via POP3 and via the "Rules Wizard" and I can sort the mails using
the option "Move messages based on content" >> "With [specific words] in
the message hearder" (where [specific words] are the words used to
filter the email) >> "Moved them to [folder]".

These have nothing to do with the rules you've got going below - below, you're doing the same for pine, but Outlook will never see the messages thus filtered.

Using procmail, am I right to do the following to achieve the above?

:0
* !^(From|To|CC): mailing-list
* !^Subject: [procmail]
$MAILDIR/procmail-list

This tosses the message into a folder which your host based mail client can access - it isn't going into your mail spool file, which is where your POP daemon is likely to be looking for your mail in. (you should also LOCK the file - add a colon to the end of the flags line).

What I do to help Eudora along (which supports regexp and multiple conditions, so it is capable of doing a decent job of mail filtering by itself - but I don't feel like duplicating effort), is add a header to the messages stuffed in my spool:

:0
* some condition
{
        :0c:
        | formail -A"X-MY-MB: SOMEBOX" >> $DEFAULT

        :0:
        some.mbx
}

This way, I configure Eudora to take messages and drop them into Eudora mailboxes based on the X-MY-MB: header (which is really named something else in my case, but the idea is the same). I retain a copy of the mailboxes on the server for access there (though in my case, I actually gzip them, then periodically archive them off).


You might find it handy to check one of the several procmail for beginners documents. Also, check the info about sandboxes linked from my .sig - you want to test such filters standalone before whacking your mail stream with them.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

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