Also, I think you could use this to capture mail from kclug (although I haven't tested it and it may be slightly wrong):
:0: * ^Delivered To: * [email protected] .kclug/
If you just wanted to do the single thing. I really didn't grok Jeremy's snippet. I understand what it's doing and why, but I still have a really hard time reading string processing syntax and mapping into an actual example of what it translate to. And I don't like using things I can't easily modify to use to a different purpose. I suppose it's time I took a shell string processing class. Actually it's just the "/[^@]+" and the "/[/]/_/g'`" that confuse me.
-----Original Message----- From: Jeremy Turner
On Fri, October 15, 2004 10:38 am, [email protected] said:
To: KCLUG[email protected] Envelope-To: [email protected]
That makes for easy filtering...either by the kclug addy, or by the Envelope-To address, which would be more comprehensive it seems.
When I use fetchmail to get the same message, I see: To: KCLUG[email protected] Envelope-To: mdg@localhost
So, when that 'Envelope-To' changes, I lose any idea (from
the headers)
as to what address it was fetched from. There is no more record of [email protected] anywhere.
Here's a question: for a mailing list, do you care what mailbox/address it came in as? Consider the following procmailrc snippet:
# Used by the perl6-all list to break out into seperate mailboxes :0:
- ^X-Mailing-List-Name: /[^@]+
lists/`echo $MATCH | sed -e 's/[/]/_/g'`
# Majordomo uses Sender header to tell when it is coming from :0:
- ^Sender: owner-/[^@]+
lists/`echo $MATCH | sed -e 's/[/]/_/g'`
:0:
- ^X-BeenThere: /[^@]+
lists/`echo $MATCH | sed -e 's/[/]/_/g'`
:0:
- ^Delivered-To: mailing list /[^@]+
lists/`echo $MATCH | sed -e 's/[/]/_/g'`
:0:
- ^X-Mailing-List: </[^@]+
lists/`echo $MATCH | sed -e 's/[/]/_/g'`
:0:
- ^X-Loop: /[^@]+
lists/`echo $MATCH | sed -e 's/[/]/_/g'`
:0:
- ^X-List-ID: </[^@.]+
lists/`echo $MATCH | sed -e 's/[/]/_/g'`
:0:
- ^X-list: /[^@.]+
lists/`echo $MATCH | sed -e 's/[/]/_/g'`
This procmailrc tries to identify mailing lists (mailman, Yahoo groups, etc) by using various headers that they use. You can subscribe to new lists, and it would automatically create the new folder for you.
For your multi-mailbox setup you could have a structure something like:
INBOX INBOX.mailacct1 INBOX.mailacct1.somefolder INBOX.mailacct2 INBOX.mailacct2.somefolder INBOX.mailacct3 INBOX.mailacct3.somefolder INBOX.lists INBOX.lists.kclug
Is this something of what you're looking for?
Jeremy
-- Jeremy Turner [email protected] Linux Tips and News! ---> http://linuxwebguy.com
Kclug mailing list [email protected] http://kclug.org/mailman/listinfo/kclug
On Fri, October 15, 2004 12:01 pm, Brian Densmore said:
Actually it's just the "/[^@]+"
I think this is match any characters until the "@" in the mailing list email address. The "" escapes the "/" in this case, and "[^@]+" would mean match 1 or more characters that are not "@". I'm not entirely sure why you need the "/" in there. Any hard core procmailrc guys wanna chime in?
and the "/[/]/_/g'`" that confuse me.
If you get a "" or a "/" in the name of the mailing list, then turn it into an underscore "_". I don't think they are valid in filenames. Now that I think about it, I don't know why they would be in an email address either. Better paranoid than broken, right?
Jeremy