3 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Sorting Lists
FromSent OnAttachments
Thorsten HaudeJan 15, 2004 1:06 pm 
John LockeJan 15, 2004 2:46 pm 
Thorsten HaudeJan 17, 2004 3:07 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] Sorting ListsActions...
From:Thorsten Haude (list@thorstenhau.de)
Date:Jan 17, 2004 3:07:39 am
List:net.sourceforge.lists.courier-maildrop

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