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

Re: aliasing mailing lists



On (10:16 20/05/06), Dave <dave@xxxxxxxxxxxxxxx> put forth the proposition:
> On (09:07 20/05/06), Dave <dave@xxxxxxxxxxxxxxx> put forth the proposition:
> 
> Also it shouldn't be too hard to use the same idea reading from a master list
> file if you want to go that way.

Something like:

#!/bin/bash
fetchmail -q
rm ~/.procmailrc-lists
cat ~/.mutt/mailinglists | grep @ |awk -F@ '{print "alias "$1" <"$1"@"$2">"}' > 
~/.mutt/listaliases
cat ~/.mutt/mailinglists | awk '{print "mailboxes +lists/" $1}' > 
~/.mutt/listboxes
cat ~/.mutt/mailinglists | awk '{print "subscribe " $1}' > ~/.mutt/listsubs

for file in `cat ~/.mutt/mailinglists`
do
        echo :0 >> ~/.procmailrc-lists
        echo "* ^(To|Cc).*$file*" >> ~/.procmailrc-lists
        echo lists/$file >> ~/.procmailrc-lists
        echo >> ~/.procmailrc-lists
done
fetchmail

Then source the 3 files listaliases, listboxes and listsubs from .muttrc.

> -- 
> Real Users never know what they want, but they always know when your
> program doesn't deliver it.
> 

-- 
Tomorrow will be canceled due to lack of interest.