generic rewrites not working for local

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

generic rewrites not working for local

Aleksandr Miroslav
I'd like to use postfix to rewrite the "from" address on all my outgoing emails.

However, smtp_generic_maps/lmtp_generic_maps does not seem to work
with mail coming locally from my machine (from cron jobs, from a local
MUA, etc.).

Is there a way to rewrite mails from local?
Reply | Threaded
Open this post in threaded view
|

Re: generic rewrites not working for local

@lbutlr
On 2018-03-28 (23:52 MDT), Aleksandr Miroslav <[hidden email]> wrote:
>
> Is there a way to rewrite mails from local?


<http://www.postfix.org/ADDRESS_REWRITING_README.html>

that seems to cover it. If smtp_generic_maps isn't working for you, perhaps read that section again, since it seem to do exactly what you want

> Example:
>
> /etc/postfix/main.cf:
>    
> smtp_generic_maps = hash:/etc/postfix/generic
>
> /etc/postfix/generic:
>     [hidden email]               [hidden email]
>     [hidden email]               [hidden email]
>     @localdomain.local                  [hidden email]
>
> When mail is sent to a remote host via SMTP, this replaces [hidden email] by his ISP mail address, replaces [hidden email] by her ISP mail address, and replaces other local addresses by his ISP account, with an address extension of +local (this example assumes that the ISP supports "+" style address extensions).



--
'The gods,' he said. 'Imprisoned in a thought. And perhaps they were
never more than a dream.' --Sourcery