Re: aliasing mailing lists
On (00:11 20/05/06), cga2000 <cga2000@xxxxxxxxxxxxx> put forth the proposition:
> On Fri, May 19, 2006 at 10:08:50PM EDT, Cameron Simpson wrote:
> > On 19May2006 19:53, cga2000 <cga2000@xxxxxxxxxxxxx> wrote:
> > | On Fri, May 19, 2006 at 07:36:11AM 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.
> >
> > I go the other way; I have a file like this:
> >
> > mutt Mutt-Users sender:owner-mutt-users@xxxxxxxx
>
> a very interesting idea. ie. if you have to have the "master file" I
> was talking about, it makes good sense to go the whole hog and have
> *everything* re: your mailing lists generated from that one file.
An alternative I've been playing with this morning is a shell script that auto
generates a separate procmail file from the files in my mail/lists folder. The
file is included in the main .procmailrc using the INCLUDERC function at an
appropriate place.
#!/bin/bash
fetchmail -q # stop daemon in case of incoming in middle of script
rm ~/.procmailrc-lists
for file in `ls ~/mail/lists`
do
echo :0 >> ~/.procmailrc-lists
echo "* ^(To|Cc).*$file*" >> ~/.procmailrc-lists
echo lists/$file >> ~/.procmailrc-lists
echo >> ~/.procmailrc-lists
done
fetchmail # restart daemon
And in .procmailrc:
INCLUDERC=$HOME/.procmailrc-lists
just after my spamassassin filters. This generates filters like
:0
* ^(To|Cc).*bug-bash@xxxxxxx*
lists/bug-bash@xxxxxxx
:0
* ^(To|Cc).*fluxbox-users@xxxxxxxxxxxxxxxxxxxxx*
lists/fluxbox-users@xxxxxxxxxxxxxxxxxxxxx
Now when I recieve a welcome message I save it to the list box (mutt will prompt
to create one) and run the script. Seems to work ok - at least so far.
> >
> > and generate the .procmailrc from that. Column 1 is the folder name,
> > column 2 gets inserted as an X-Label header (I mix several lists in one
> > folder sometimes) and column 3 generates a procmail condition.
> >
> > It makes maintaining a large .procmailrc much easier.
> > This is the converter:
> >
> > http://freshmeat.net/projects/cats2procmailrc/
> >
> > [...]
> > | 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.
> >
> > It feels like a setup where someone could damage your mutt config just
> > be sending you email:-)
>
> That's a general problem with automation. You open yourself to
> potential abuse. On the other hand, malicious users would need to know
> how I set up my mutt to figure this out. More likely I'll shoot myself
> in the foot by not configuring it right in the first place.. If I ever
> find the time to embark upon such a project, that is.. :-)
>
> >
> > Personally I rarely both with step 2.
> >
> > Cheers,
> > --
> > Cameron Simpson <cs@xxxxxxxxxx> DoD#743
> > http://www.cskk.ezoshosting.com/cs/
>
> Thanks,
>
> cga
--
"Pascal is Pascal is Pascal is dog meat."
-- M. Devine and P. Larson, Computer Science 340