From: Thomas Hurst Date: 2002-02-07T00:28:48+09:00 Subject: ruby-mda After seeing the huge ugly mess of procmail's code, I'm feeling a compulsion to change. The most "standard" alternative seems to be maildrop, which at least looks fairly clean and has a much more readable filter language. But it still lacks some features I want, such as the ability to queue messages and perform higher level comparisons on them to, for instance, intelligently deal with dupes in group replies (try filtering on X-Mailing-List: headers and tell me to use formail and a message id cache..) Then I started thinking about how to use ruby as a filter language; require 'filter/mailinglist' require 'filter/queue' require 'filter/dupes' queue = Queue.new(20, '3 min') queue.prune_dupes queue.run do |mail| mail.cc('Backup') if list = MailingList.filter(mail) mail.deliver('lists/' + list) end mail.filter('/usr/local/bin/spamassassin -P') if mail.header.match(/^X-Spam-Flag: Yes/) mail.deliver('SPAM') end mail.deliver('Inbox') end Comments? -- Thomas 'Freaky' Hurst - freaky@aagh.net - http://www.aagh.net/ - 1) You can't win 2) You can't break even 3) You can't even quit the game