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 <roman.doe...@gmail.com> 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 <
> postfix-us...@dukhovni.org> wrote:
>
>>
>> > On Feb 2, 2016, at 1:10 AM, Roman Doe <roman.doe...@gmail.com> wrote:
>> >
>> > Using this can I do the following process?
>> >
>> > If 1...@gmail.com = 1...@mydomain.com
>> > and 2...@gmail.com = 2...@mydomain.com
>> >
>> > When 1...@gmail.com sends to 2...@mydomain.com (gmail webmail)
>> > Rewrite: 1...@gmail.com in 1...@mydomain.com
>> > 2...@gmail.com receives from 1...@mydomain.com (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:
>>         us...@gmail.com us...@example.com
>>
>> This will apply to all mail sent by us...@gmail.com, regardless
>> of the recipient address.
>>
>> --
>> --
>>         Viktor.
>>
>
>

Reply via email to