foo+bar@ addresses, procmail, and postfix
Dan Langille
dan at langille.org
Tue Apr 8 14:53:43 PDT 2003
I'm trying to get foo+bar at 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].
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:
"When you receive message from any of these mailing lists to your
login account, the list.procmail is already in variable $1 and the
recipe to sink all mailing lists to their individual folders is very
simple: "
The problem was to get a value in $1. The only solution I could see
was to resort to "Using Procmail for system-wide local delivery" as
found at http://www.postfix.org/faq.html#procmail. I now have this
entry in my postfix config file:
mailbox_command = /usr/local/bin/procmail -t -a "$EXTENSION"
This test procmail recipie now works:
ARG = $1
:0
$ARG
Mail to foo+bar@ gets put into the bar folder.
Any comments? Ideas? Improvements?
[1] - with the tools mentioned. Those suggesting a change of MTA
will be beaten to death with spam.
--
Dan Langille : http://www.langille.org/
More information about the freebsd-chat
mailing list