Hi,
* Thorsten Haude <list+mail...@thorstenhau.de> [2004-01-15 22:09]:
I am subscribed to quite a few mailing lists and I want to use
Maildrop to sort my mail by list. This seems to be pretty
straightforward using a list of mailbox addresses and lookup().
However, I want to send more than one list to certain mailboxes and I
don't necessarily want to name the mailboxes after the list.
I thought I would create a list of mailbox/list pair like this:
- - - Schnipp - - -
cour...@lists.sourceforge.net ML/Mail
mutt...@mutt.org ML/Mail
post...@postfix.org ML/Mail
disc...@nedit.org ML/NEdit
deve...@nedit.org ML/NEdit
- - - Schnapp - - -
This list would be read by some script which would be fed the mail and
return the mailbox' name to Maildrop.
That was remarkably simple to do within Maildrop:
- - - Schnipp - - -
gdbmopen("/path/to/lists.db")
foreach /^(To|Cc): .*/
{
foreach (getaddr($MATCH)) =~ /.+/
{
listbox = gdbmfetch($MATCH)
if ($listbox ne "")
{
# Drop any unsubscribe mails
if (/^Subject: unsub?scribe$/ && $SIZE < 1500)
{
to /dev/null
}
to $MAILDIR/ML/$listbox
}
}
}
gdbmclose
- - - Schnapp - - -
Thorsten