-- David Raeker-Jordan <[EMAIL PROTECTED]> wrote
(on Tuesday, 11 February 2003, 10:52 PM -0500):
> Jeffrey L. Taylor wrote:
> > Quoting David Raeker-Jordan <[EMAIL PROTECTED]>:
> > > 
> > > Currently, I use fetchmail to get my email from my ISP. Fetchmail passes the
> > > mail to procmail, which uses a few rules and spamassasin to sort the mail
> > > into folders. I use exim, but I am afraid I am a bit fuzzy as to
> > > its role in delivering incoming mail. Does procmail pass the mail to exim,
> > > or does procmail deliver the mail it sorts?
> > >
> > 
> > Procmail delivers the mail it sorts.  It can accept mail directly from
> > fetchmail or fetchmail can hand the mail to exim.  And exim hands it
> > to procmail.
> 
> If fetchmail hands-off to procmail, and procmail delivers the mail, then how
> does procmail know to deliver in Maildir format (or even mbox format, for
> that matter)
<snip>
> Looks like fetchmail passes the mail directly to procmail. Here is my
> procmailrc:
> 
> PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin 
> MAILDIR=/var/spool/mail       # make sure this is right 

What I do is have a $HOME/.procmailrc that has this stuff -- but then, I
have Postfix handing off delivery to procmail, so I'm not quite sure how
this will work for you.

In my ~/.procmailrc, I then set
    MAILDIR=$HOME/Maildir

and then you won't need the DEFAULT setting you have below.

> DEFAULT=$MAILDIR/username     # completely optional 
> LOGFILE=/var/log/procmail.log # recommended 
> 
> SPAM=/home/david/mail/spam
> 
> :0:
> * ^X-Mailing-List:.*[EMAIL PROTECTED]
> /home/david/mail/In-debian-user

In a nutshell, you direct procmail to deliver in Maildir format. In the
above example, you are delivering to a standard mbox:

    :0:
       the trailing ':' indicates file locking, a mechanism necessary
       for mbox formats. You will omit this with Maildir, as each
       message is given its own file.

    * ^X-Mailing-List:.*[EMAIL PROTECTED]
       this will stay the same -- this is your filtering rule

    /home/david/mail/In-debian-user
       this is the name of the mbox file you're using. *THIS* will also
       change, as you want to go to a Maildir

The revised version that would send this to a maildir is:
    
    :0
    * ^X-Mailing-List:.*[EMAIL PROTECTED]
    .In-debian-user/

The leading '.' indicates that this directory is directly beneath the
IMAP inbox 'INBOX'; to indicate a hierarchy, you would do something
like:
    .lists.In-debian-user/
which indicates that it falls in the lists directory (which is under the
inbox).

The trailing '/' tells procmail to send this to a maildir... It's as
simple as that.

-- 
Matthew Weier O'Phinney
[EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to