Quantcast

send an email with specified sender/recipient address to different servers

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

send an email with specified sender/recipient address to different servers

Zalezny Niezalezny
Hi,

I just would like to know, how may send specified messages to different hosts.


/etc/postfix/transport

domain.com    relay:mx-domain.local
*       host


All E-mails To: [hidden email] system sending to mx-domain.local.
This is working fine.

But what should I do, if I would like to send an e-mail To: [hidden email] to some other system with IP 10.204.2.2 ? What should I do ?


The same question for senders. How to send message From: [hidden email] not via my default gateway ("*   host" like the rest of not defined E-mails ) but via some other system "host2" ?


How to properly do it ?


Thanks in advance for Your support.



Cheers

Zalezny
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: send an email with specified sender/recipient address to different servers

Christian Kivalo
On 2017-02-22 16:51, Zalezny Niezalezny wrote:

> Hi,
>
> I just would like to know, how may send specified messages to
> different hosts.
>
> /etc/postfix/transport
>
> domain.com [1]    relay:mx-domain.local
> *       host
>
> All E-mails To: [hidden email] system sending to mx-domain.local.
> This is working fine.
>
> But what should I do, if I would like to send an e-mail To:
> [hidden email] to some other system with IP 10.204.2.2 ? What
> should I do ?

add the emailadress and nexthop definition to transport_maps before the
domain.com entry

[hidden email]   smtp:10.204.2.2
domain.com       relay:mx-domain.local
*       host

see transport(5) section Table Search Order
http://www.postfix.org/transport.5.html

> The same question for senders. How to send message From:
> [hidden email] not via my default gateway ("*   host" like the
> rest of not defined E-mails ) but via some other system "host2" ?
>
> How to properly do it ?

i think sender_dependent_transport_maps should do it
http://www.postfix.org/postconf.5.html#sender_dependent_default_transport_maps

> Thanks in advance for Your support.
>
> Cheers
>
> Zalezny
>
>
> Links:
> ------
> [1] http://domain.com

--
  Christian Kivalo
Loading...