Promail recipe help (was [H-CHAT] Re: [H-GEN] Installing multiple Linuxes)

Bruce Campbell bc at humbug.org.au
Mon Oct 7 04:39:40 EDT 2002


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

On Mon, 7 Oct 2002, Harry Phillips wrote:

> I had a procmail recipe that was like this
>
> :0
> * ^TO_chat at lists.humbug.org.au
> $DEFAULT.Humbug.Chat/

Welcome to the general mailing list!

Please save this message for future reference.  Thank you.

[snip various bits]

        The correct mail sorting expression for this list is to match:
                X-Loop: general at lists.humbug.org.au

> I just thought of something, I will try and create a recipe that has a
> first level of '*humbug.org.au' then do the chat*, general* etc after
> that. Has anyone got one already?

For my own .procmailrc, it reads:

##
## Humbug Lists
##
:0
* ^X-Loop:.*humbug.org.au
{
  DUMMY=`test -d $MAILBASE/lists/all || mkdir -p $MAILBASE/lists/all`

  # Chat
  :0
  * ^X-Loop: chat at lists.humbug.org.au
  $MAILBASE/lists/all/chat at lists.humbug.org.au

  [repeat for other lists that you're subscribed to]

}

You could also do:

:0
*^X-Loop: \/[^ ]*@lists.humbug.org.au
{
  # Grab the match found in the above.
  LISTNAME="$MATCH"

  DUMMY=`test -d $MAILBASE/lists/all || mkdir -p $MAILBASE/lists/all`

  # Seperate it out into files with no dots in the names, and those without.
  :0
  * ^Sender:.*\.\..*
  $MAILBASE/lists/all/sender-has-dots

  :0
  * ^Sender:.*/.*
  $MAILBASE/lists/all/sender-has-slash

  # We're still here?  Must be safe, save it.
  :0
  $MAILBASE/lists/all/$LISTNAME

}

--==--
Bruce.



--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list