Help configuring procmail (was: Help configuring fetchmail)

Jeremy Turner jeremy at linuxwebguy.com
Fri Oct 15 11:05:50 CDT 2004


On Fri, October 15, 2004 10:38 am, linux at bizniche.com said:
> To: KCLUG<kclug at kclug.org>
> Envelope-To: linux at bizniche.com
>
> 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<kclug at kclug.org>
> Envelope-To: mdg at 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
> linux at bizniche.com 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 <jeremy at linuxwebguy.com>
Linux Tips and News! ---> http://linuxwebguy.com




More information about the Kclug mailing list