On Fri, Dec 12, 2008 at 11:07:15AM -0800, Corey Chandler wrote: > I'm attempting to rewrite all source addresses from our server farm via > a canonical map.
Use smtp_generic_maps for this. Not canonical_maps. Upgrade to a Postfix that supports this feature if necessary. http://www.postfix.org/postconf.5.html#smtp_generic_maps > What I want to see happen is that if the sender is, for instance > apa...@machinename.datacenter.example.com > I want it to rewrite it to: > mxm...@example.com > so that bounces can be routed accordingly via a custom handler. > > /etc/postfix/canonical: > apache mxmail > loguser mxmail > @*\.datacenter\.example\.com @example\.com > > # postconf -n canonical_maps > canonical_maps = pcre:/etc/postfix/canonical > > What am I doing wrong here? Your pcre table is missing the delimiter that surrounds the pattern. Also you are expecting bare names to be used in regexp/pcre tables, but these always process full addresses. The RHS of regexp tables does not support or need "\" chars to protect characters that are special in patterns. -- Viktor. Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the "Reply-To" header. To unsubscribe from the postfix-users list, visit http://www.postfix.org/lists.html or click the link below: <mailto:majord...@postfix.org?body=unsubscribe%20postfix-users> If my response solves your problem, the best way to thank me is to not send an "it worked, thanks" follow-up. If you must respond, please put "It worked, thanks" in the "Subject" so I can delete these quickly.