Date: Tue, 08 Apr 2003 17:42:07 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Dan Langille <dan@langille.org> Cc: freebsd-chat@freebsd.org Subject: Re: foo+bar@ addresses, procmail, and postfix Message-ID: <3E936C5F.33549B1@mindspring.com> References: <3E930CA5.30714.112296A7@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E936C5F.33549B1>