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

Re: aliasing mailing lists



Hi David,

 On Saturday, May 20, 2006 at 12:46:23 +0100, David Woodfall wrote:

>| cat ~/.mutt/mailinglists | grep @ | awk

    Or with #comments and empty lines in the master mailinglists file,
stricter subscribe regexps, mbox locking, and less cats and greps:

| awk -F@ '/^[^#]/{
|   print "alias " $1 "\t\t<" $1 "@" $2 ">"
| }' ~/.mutt/mailinglists > ~/.mutt/listaliases
| awk '/^[^#]/{
|   print "mailboxes +lists/" $1
| }' ~/.mutt/mailinglists > ~/.mutt/listboxes
| awk '/^[^#]/{
|   gsub("\.", "\\\\\\\\.");
|   print "subscribe ^" $1 "$"
| }' ~/.mutt/mailinglists > ~/.mutt/listsubs
| awk '/^[^#]/{
|   regexp=$1;
|   gsub("\.", "\\\\.", regexp);
|   print ":0:\n* ^(To|Cc):.*" regexp "\nlists/" $1 "\n"
| }' ~/.mutt/mailinglists > ~/.procmailrc-lists


    OTOS procmail dispatching only on To/Cc list is weak. Bcc or resends
get misdirected. Adding a condition on mailing list robot specific
headers like "^Sender: owner-mutt-users@mutt\.org$" or some such
"^X-BeenThere: slrn-user@lists\.sourceforge\.net$" could be better. This
would need extending the master mailinglists file format with an
optional 2nd field on the line.


Bye!    Alain.
-- 
Give your computer's unused idle processor cycles to a scientific goal:
The Folding@home project at <URL:http://folding.stanford.edu/>.