From owner-freebsd-chat@FreeBSD.ORG Tue Apr 8 17:43:57 2003 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C905337B401 for ; Tue, 8 Apr 2003 17:43:57 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AC5043F85 for ; Tue, 8 Apr 2003 17:43:57 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0311.cvx21-bradley.dialup.earthlink.net ([209.179.193.56] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 1933gl-0003C8-00; Tue, 08 Apr 2003 17:43:44 -0700 Message-ID: <3E936C5F.33549B1@mindspring.com> Date: Tue, 08 Apr 2003 17:42:07 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Dan Langille References: <3E930CA5.30714.112296A7@localhost> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4c6f15ae8b6853c820749637d36fdf533667c3043c0873f7e350badd9bab72f9c350badd9bab72f9c cc: freebsd-chat@freebsd.org Subject: Re: foo+bar@ addresses, procmail, and postfix X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2003 00:43:58 -0000 Dan Langille wrote: > I'm trying to get foo+bar@example.org addresses to work with > procmail. My MTA is postfix. I've had a hard time tracking down the > information and trial and error has gotten me a working solution. > I'm wondering if there is a better way to accomplish this[1]. You should look at the "Cyrus" mailer. For "plussed" addresses, your MTA/MDA should not consider the portion following the "+" as part of the local address, when doing local address validation, user validation, account validation, etc.. But it should pass the portion following the "+" to the MDA/local delivery agent, IFF the local delivery agent understands "plussed" addresses. The Cyrus "deliver" program (the MDA that comes with the Cyrus distribution) takes that portion as an additional command line argument, in the normal case. I don't know what procmail is/isn't willing to take as additional command line arguments (normally, I use Sieve, not procmail, so that I can automatically direct the mail to a specific IMAP4 mailbox as a result of the plussed addresses and/or Bayesian filtering, etc., without giving users the ability to run code on my systems), but you could always stuff it in the environment before invoking procmail, if that was the only way to get procmail to see it. But either way, you need to modify the MDA invocation by the MTA, on local delivery. I can tell you how to do this with sendmail ("Look at the Cyrus mailer!" 8-)), but I don't know the answer for Postfix or Qmail, or if it's even possible (Sendmail is cool! 8-) 8-)). > This type of addressing is often referred to as address extensions. > I found one clue at http://pm-doc.sourceforge.net/pm-tips- > body.html#using_plus_addressing_foobar. My problem was that I could > not get the "bar" bit of the address. But the above URL mentions: That's because mail.local doesn't take or pass on optional arguments to programs invoked in .forward files. It's an MDA that doesn't support that. There are "mail.local" replacements available on the net, but if you use them, you need to replace the MTA/MDA interface, since it expects to be able to send to multiple local users, simultaneously. The normal way to disable multiple users simultaneously in sendmail is to remove the "m" flag on the "local" mailer. > Any comments? Ideas? Improvements? Don't run procmail globally. Replace your mail.local, if you need to, but don't run procmail globally. > [1] - with the tools mentioned. Those suggesting a change of MTA > will be beaten to death with spam. I suspect you can do this with Postfix, but I'll be damned if I know the dead chicken you would have to wave for it to work. If Postfix actually supports Cyrus IMAP4, rather than just pretending to support it, then "however you have to configure Postfix for Cyrus plussed mailboxes" is the correct answer. -- Terry