procmail
[Top] [All Lists]

Re: using procmail to sort email by subject

2002-03-05 13:14:16
On Tue, 5 Mar 2002, Dapid Candra wrote:

Date: Tue, 05 Mar 2002 16:55:21 +0700
From: Dapid Candra <dapidc(_at_)karir(_dot_)com>
To: procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: using procmail to sort email by subject

Hi all,
 
I need help regarding usage of procmail to filter incoming mails based on
part of their subject (e.g. [A123456] ).
I want to do some checking if the folder already exist then forward the
mail to the folder, but if the folder doesn't exist create the folder then
forward the mail to the new folder.
 
For example, I subscribed to abc mailing list. Postings to the milis will
arrive with subject "[abc] hallo...". I want procmail check if folder "abc"
exist. If it is exist, then forward the mail to "abc" folder. Otherwise,
procmail should create "abc" folder and forward the mail to "abc" folder.

Of course, you'll say 'why don't you use the mailing-list address instead',
but that's not the point. I want to use a string from the mail subject for
the folder name, like the example above.

Technically the questions are:
1. How can I grep a string from the mail subject ( Which I can do elsewhere
with awk '{print $3}', for example )


        From this question I understand that you did not read the man pages
        even not the man of procmailex which gives you examples!
        So,  read this FAQ:  http://www.ii.com/internet/robots/procmail/qs/
        It is one of the best clear and easy document (not only for procmail,
        thanks to *-Nancy McGough-*)

Bye,
 Udi


2. How do I instruct procmail to create IMAP folder based on the text I
grep. ( Manually, I have to add the folder name to a file named
.mailboxlist, then store the message to the folder).
 
Have anyone create such procmail recipe?
 
Thanks for the help.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail



--


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