<<< Date Index >>>     <<< Thread Index >>>

Re: aliasing mailing lists



On Fri, May 19, 2006 at 07:36:11AM EDT, Rocco Rutte wrote:
> Hi,
> 
> * cga2000 [06-05-18 20:18:14 -0400] wrote:
> >On Thu, May 18, 2006 at 02:58:30AM EDT, Rocco Rutte wrote:
> 
> >>Since I use procmail for local filtering, I put comments in .procmailrc 
> >>which are converted via cronjob and shell to a mutt config file and 
> >>committed to a git repository.
> 
> >Sounds like the better approach on the face of it. Could you be a
> >little more specific?
> 
> I have lines like these in .procmailrc:
> 
>   #subscribe mutt-users@xxxxxxxx
>   #list mutt-users@xxxxxxxxx
>   :0
>   * ^Sender: owner-mutt-users@mutt\.org
>   IN.mutt-users/
> 
>   #subscribe mutt-dev@xxxxxxxx
>   #list mutt-dev@xxxxxxxxx
>   :0
>   * ^Sender: owner-mutt-dev@mutt\.org
>   IN.mutt-dev/
> 
> and then do:
> 
>   $ grep -E '^#(subscribe|list)' ~/.procmailrc | sed 's/^.//' > 
>   /path/to/mutt.lists
> 
> in a shell script from cron. My ~/.muttrc contains, of course:
> 
>   source /path/to/mutt.lists
> 
> That way I don't ever forget to update configs for removed/added lists 
> as it's done all in one place.

Thanks much. 

I don't know if it's possible in a reliable manner but I was thinking
of maintaining a separate file that lists the addresses of all the
mailing lists to which I am currently subscribed and having procmail:

1. Add an entry to the list whenever it encounters a message that
   confirms subscription to a mailing list 

2. Delete entries upon receiving messages that confirm un-subscription
   from mailing lists.

.. and naturally use this external file to generate the targets of the
subscribe/mailboxes/alias commands in .muttrc.

Provided the .procmailrc file also contains rules that automatically
causes messages from different mailing lists to be copied to separate
mboxes, you would have a system that keeps current without manual
intervention.

I have no idea at this point if/how this could be done.

Thanks,

cga