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

Re: Setting up mutt with procmail



Hi,

* Trey Sizemore wrote (2004-03-22 01:57):
>I have been checking my fastmail account with Evolution for quite a
>while with no issues. But, I wanted to try mutt for a mailer and take
>advantage of some of the more advanced procmail functionality as well.

I don't know about any advanced features in Procmail (except for
advanced obliqueness), so I use Maildrop for this. These are the steps:

1. Let Fetchmail fetch your mail. There is a flag to keep the mail on
the server until you want to delete it.
2. Let Fetchmail deliver it to the MTA (I use Postfix). Fetchmail can
also deliver directly to an MDA, but I use the extra step to buffer
the mail in case something goes wrong.
3. Let the MTA hand the mail to Maildrop.
4. Let Maildrop look in your list database. This is a GDBM database
which contains key/value pairs of list address/target mailbox.
5. Let Maildrop do a loop:

    foreach address in mail
        listbox = gdbmfetch(address)
        if ($listbox != "")
            deliver to listbox


The key is the database of course. You could probably hack something
together for Procmail, but why bother if there's an alternative that
has native support for databases, loops and non-pathological syntax?

There are all kind of ways to fill that database, I use a simple Ruby
scipt for now:
- - - Schnipp - - -
#!  /usr/bin/ruby -w

require 'gdbm'

GDBM.open("/home/yooden/.mutt/lists.db") { |gdbm|
    #   NEdit
    gdbm['discuss@xxxxxxxxx'] = 'NEdit'
    gdbm['develop@xxxxxxxxx'] = 'NEdit'
}
- - - Schnapp - - -


Thorsten
-- 
Those who do not remember the past are condemned to repeat it.
    - Georges Santayana

Attachment: pgpJU4ZQWZkAv.pgp
Description: PGP signature