Charles Boling: > I've been a postfix user for nearly 10 years, but in many ways I'm still > quite the newbie. That's the problem with Postfix being such a solid > MTA: I don't mess with it much. :-) > > For a good chunk of that time, I have wrestled on and off with this > problem off and on, playing with it for a bit, giving up, then returning > to it a year or two later. After all this time, I've finally gotten > smart enough to specifically ask for help! > > I love "+" addressing, the ability to append ad-hoc suffixes to an email > address (like the one used to post to this list). The problem is, a lot > of web sites don't. They tend to take the lazy route to preventing SQL > injection attacks, and reject any address with a "+" in it. > > To address that issue, I would like to be able to use another character > ("_" or ".") that is commonly accepted as part of email addresses, instead.
Address transformation mappings are always queried at recipient validation time, so you can't use a wild-card pattern to replace "_" by "+" without becoming a backscatter source. The only way to change an envelope address before SMTP server recipient validation is with the Postfix 2.7 smtpd_command_filter which replaces SMTP commands before they are executed. This is for the desperate. It has no safety mechanisms. http://www.postfix.org/postconf.5.html#smtpd_command_filter Wietse > When an email comes into Postfix (v2.2 currently), I would like it to > search for, e.g. "_" in the recipient address, and replace it with "+". > This, of course, needs to happen before it does recipient checking. > The validated message is eventually passed on to the MDA (Cyrus, in my > case) with the "+" in it. > > How might be the best way to accomplish this? > > >