From: dave-mlist@bfnet.com
Subject: There's gotta be an easier way...
Date: 03 Dec 1999 19:31:35 -0500 [thread overview]
Message-ID: <ygeso1jpmvs.fsf@bfnet.com> (raw)
In-Reply-To: Lars Magne Ingebrigtsen's message of "03 Dec 1999 20:46:40 +0100"
Here's my split methods (with some names changed to protect the guilty):
There must be an easier way. Tell me what you think.
Objectives: (1) to have all mailing list mail separated into groups
with the same name as the mailing list. (2) to have non-list mail
filed under the email address it was sent to.
here's what nnmail-split-fancy evals to:
(| ("to\\|cc" "\\(dave\\|fred\\|ethel\\|barney\\)\\(-?[^@]*\\)@\\(bfnet.com\\|wuertele.com\\|this.net\\|that.net\\|andtheother.net\\)" "\\&") ("sender\\|to\\|cc" ".*ding.*" "ding") ("sender\\|to\\|cc" ".*netfilter.*" "netfilter") ("sender\\|to\\|cc" ".*netdev.*" "netdev") ("sender\\|to\\|cc" ".*tcpsat.*" "tcpsat") ("sender\\|to\\|cc" ".*etcetera.*" "etcetera"))
Dave
(setq nnmail-split-methods 'nnmail-split-fancy)
(setq nnmail-split-fancy
(let ((domains (list "bfnet.com" "wuertele.com" "this.net" "that.net" "andtheother.net"))
(usernames (list "dave" "fred" "ethel" "barney"))
(groupnames (list "ding" "netfilter" "netdev" "tcpsat" "etcetera"))
)
(append '(|)
; setup a group for each personal email sent to
(list
(list
"to\\|cc"
(concat
"\\("
(mapconcat (lambda (username)
(format "%s" username))
usernames "\\|")
; this part in parens is for qmail name extensions
"\\)\\(-?[^@]*\\)@\\("
(mapconcat (lambda (domain)
(format "%s" domain))
domains "\\|")
"\\)"
)
"\\&"))
; setup groups for each mailing list
(mapcar (lambda (groupname) (list "sender\\|to\\|cc" (format ".*%s.*" groupname) groupname)) groupnames)
))
)
next reply other threads:[~1999-12-04 0:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-04 0:31 dave-mlist [this message]
1999-12-05 22:55 ` Kai Großjohann
1999-12-08 15:16 ` E. David Bell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ygeso1jpmvs.fsf@bfnet.com \
--to=dave-mlist@bfnet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).