Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Apr 2003 17:40:55 -0400
From:      "Dan Langille" <dan@langille.org>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        freebsd-chat@freebsd.org
Subject:   Re: foo+bar@ addresses, procmail, and postfix
Message-ID:  <3E945B27.14522.163D5923@localhost>
In-Reply-To: <3E936C5F.33549B1@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8 Apr 2003 at 17:42, Terry Lambert wrote:

> Dan Langille wrote:
>
> > Any comments?  Ideas?  Improvements?
> 
> Don't run procmail globally.  Replace your mail.local, if you
> need to, but don't run procmail globally.

I found something which I think will work.  I spent some time reading 
http://www.postfix.org/local.8.html.  Often the problem associated 
with man pages is although they document features, the implications 
and interpretation of that documentation is often beyound the grasp 
of those unfamiliar with the product.  What is lacking is practical 
examples. In combination with mailing list archives, I found  
something which I think might work well without requiring global      
procmail.  From the section titled EXTERNAL COMMAND DELIVERY, 
I found references to the environment variable EXTENSION.

After some trial and error, I created a ~/.forward file which 
contains the following:

"|exec /usr/local/bin/procmail -a ${EXTENSION} || exit 75"

~/.procmailrc then contains the following (after the usual 
~/.procmailrc preamble) :

MAILDIR=$HOME/mail      # You'd better make sure it exists
DEFAULT=$MAILDIR/mbox

ARG = $1

:0
$ARG

The above is just a simple proof-of-concept script.

- Mail sent to foo+bar into the bar directory
- Mail sent to foo+test into the test directory

No more global procmail.

Thanks for the push.
-- 
Dan Langille : http://www.langille.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E945B27.14522.163D5923>