If I'm correct that would only apply to emails without header data. In the
situation where my user sends a mail from his @gmail.com address, there
would be a header, therefore I can't change it and the recipient will be
able to see the sender's personal address (@gmail.com) and not his
associated @mydomain.com address.

On Tue, Feb 2, 2016 at 8:27 AM, Roman Doe <[email protected]> wrote:

> Exactly!
> Everytime a @gmail.com sends to a @mydomaine.com I need to rewritte @
> gmail.com to the associated @mydomaine.com
> And everytime a @mydomain.com receives a mail it has to be sent to the
> associated @gmail.com
>
> I will try to implement this logic.
> Thank you so much for your help, expertise and time!!
>
> On Tue, Feb 2, 2016 at 8:04 AM, Viktor Dukhovni <
> [email protected]> wrote:
>
>>
>> > On Feb 2, 2016, at 1:10 AM, Roman Doe <[email protected]> wrote:
>> >
>> > Using this can I do the following process?
>> >
>> > If [email protected] = [email protected]
>> > and [email protected] = [email protected]
>> >
>> > When [email protected] sends to [email protected] (gmail webmail)
>> > Rewrite: [email protected] in [email protected]
>> > [email protected] receives from [email protected] (gmail webmail)
>>
>> No.  You can only rewrite either the sender address, the
>> recipient address or both.  In your case it seems you'd want:
>>
>>     http://www.postfix.org/postconf.5.html#sender_canonical_maps
>>
>>     main.cf:
>>         indexed = ${default_database_type}:${config_directory}/
>>         sender_canonical_maps = ${indexed}sender-canonical
>>
>>     sender-canonical:
>>         [email protected] [email protected]
>>
>> This will apply to all mail sent by [email protected], regardless
>> of the recipient address.
>>
>> --
>> --
>>         Viktor.
>>
>
>

Reply via email to