On 2/17/2017 1:24 PM, Marek Kozlowski wrote: > On 02/17/2017 08:09 PM, Noel Jones wrote: >> On 2/17/2017 12:53 PM, Marek Kozlowski wrote: >>> When smithj authenticates via SASL to my server and sends e-mail from >>> `smi...@something.com' locally or remotely I'd like to replace it to >>> `j.sm...@sth.com'. But if mail form `smi...@something.com' is received >>> from remote SMTP hosts any address changes should NOT be applied. >> >> Excellent, yes canonical_maps is what you need, but you'll need to >> limit the scope to submission. See Viktor's reply for how to do >> that. Come back if you have any questions. > > Honestly, I'd like to use canonicals for postsrsd (protecting external > forwards from SPF rules) so if I could use some other mechanism here... > > Best regards, > Marek >
I don't use postsrsd so can't offer any specific advice on that. Canonical maps is the feature you need for the address rewriting you have described. You can use multiple canonical_maps as long as they aren't trying to match the same input key. -- Noel Jones