Picon

single domain - multiple smtp relayhosts

Hello to all,

I need to configure postfix to use multiple smtp relayhosts for a single
domain.

This is possible? How?

Thanks,

Wilson

Noel Jones | 3 Jul 03:17

Re: single domain - multiple smtp relayhosts


Wilson A. Galafassi Jr. wrote: > Hello to all, > > I need to configure postfix to use multiple smtp relayhosts for a single > domain. > > This is possible? How? >
Your question is not entirely clear, so I'm going to answer as if "single domain" refers to a single outbound destination, with other outbound domains delivered directly. Use transport_maps and MX records to direct mail to the group of hosts you want, or use multiple /etc/hosts entries. An example: # main.cf - tell postfix to use a transport table transport_maps = hash:/etc/postfix/transport # transport - domains that get special treatment example.com smtp:example.local # /etc/hosts - host <> IP mapping 10.1.2.2 example.local 10.1.2.3 example.local Or you can define example.local in your local DNS server. http://www.postfix.org/transport.5.html -- Noel Jones
vtzan | 3 Jul 11:53
Picon

Re: single domain - multiple smtp relayhosts

You just need to mention one domain on your transport maps and then 
configure dns to have multiple MX records for same domain.
Don't forget to add the priority number for its host.
Postfix will automatically discover those mx records for you.

e.g.
mail.test.com
    IN   MX   10   mailserver1.test.com
    IN   MX   20   mailserver2.test.com

Bill

Noel Jones wrote:

> Wilson A. Galafassi Jr. wrote: >> Hello to all, >> >> I need to configure postfix to use multiple smtp relayhosts for a single >> domain. >> >> This is possible? How? >> > > > Your question is not entirely clear, so I'm going to answer as if > "single domain" refers to a single outbound destination, with other > outbound domains delivered directly. > > Use transport_maps and MX records to direct mail to the group of hosts > you want, or use multiple /etc/hosts entries. > An example: > > # main.cf - tell postfix to use a transport table > transport_maps = hash:/etc/postfix/transport > > # transport - domains that get special treatment > example.com smtp:example.local > > # /etc/hosts - host <> IP mapping > 10.1.2.2 example.local > 10.1.2.3 example.local > > Or you can define example.local in your local DNS server. > > http://www.postfix.org/transport.5.html > > -- Noel Jones >
Picon

RES: single domain - multiple smtp relayhosts

Hello,

I want to use multiple relayhost parameter because i want to use more than
one relay to send emails. My serve will handle emails for only one domain.
My need is to have multiple relayhost.

Thanks,
Wilson

-----Mensagem original-----
De: Noel Jones [mailto:njones <at> megan.vbhcs.org] 
Enviada em: quinta-feira, 2 de julho de 2009 22:17
Para: Wilson A. Galafassi Jr.; postfix-users <at> cloud9.net
Assunto: Re: single domain - multiple smtp relayhosts

Wilson A. Galafassi Jr. wrote:

> Hello to all, > > I need to configure postfix to use multiple smtp relayhosts for a single > domain. > > This is possible? How? >
Your question is not entirely clear, so I'm going to answer as if "single domain" refers to a single outbound destination, with other outbound domains delivered directly. Use transport_maps and MX records to direct mail to the group of hosts you want, or use multiple /etc/hosts entries. An example: # main.cf - tell postfix to use a transport table transport_maps = hash:/etc/postfix/transport # transport - domains that get special treatment example.com smtp:example.local # /etc/hosts - host <> IP mapping 10.1.2.2 example.local 10.1.2.3 example.local Or you can define example.local in your local DNS server. http://www.postfix.org/transport.5.html -- Noel Jones
Wietse Venema | 3 Jul 09:25

Re: RES: single domain - multiple smtp relayhosts

Wilson A. Galafassi Jr.:

> Hello, > > I want to use multiple relayhost parameter because i want to use more than > one relay to send emails. My serve will handle emails for only one domain. > My need is to have multiple relayhost.
List the first host in "relayhost", and list the other hosts in smtp_fallback_relay. If you want to do load balancing, use a relayhost name that resolves to multiple IP addresses (multiple A records. or /etc/hosts entries if supported by your OS). wietse
Picon

RES: RES: single domain - multiple smtp relayhosts

Hello,

Yes. I want to do load balancing. How i can implement this in postfix?

-----Mensagem original-----
De: owner-postfix-users <at> postfix.org [mailto:owner-postfix-users <at> postfix.org]
Em nome de Wietse Venema
Enviada em: sexta-feira, 3 de julho de 2009 04:26
Para: Postfix users
Assunto: Re: RES: single domain - multiple smtp relayhosts

Wilson A. Galafassi Jr.:

> Hello, > > I want to use multiple relayhost parameter because i want to use more than > one relay to send emails. My serve will handle emails for only one domain. > My need is to have multiple relayhost.
List the first host in "relayhost", and list the other hosts in smtp_fallback_relay. If you want to do load balancing, use a relayhost name that resolves to multiple IP addresses (multiple A records. or /etc/hosts entries if supported by your OS). wietse
Noel Jones | 3 Jul 16:41

Re: RES: RES: single domain - multiple smtp relayhosts


Wilson A. Galafassi Jr. wrote: > Hello, > > Yes. I want to do load balancing. How i can implement this in postfix? >
# main.cf relayhost = [relay.local] # /etc/hosts 10.2.2.2 relay.local 10.2.2.3 relay.local -- Noel Jones
Victor Duchovni | 3 Jul 16:55
Favicon

Re: RES: RES: single domain - multiple smtp relayhosts


On Fri, Jul 03, 2009 at 09:41:25AM -0500, Noel Jones wrote: > Wilson A. Galafassi Jr. wrote: >> Hello, >> Yes. I want to do load balancing. How i can implement this in postfix? > > # main.cf > > relayhost = [relay.local] > > # /etc/hosts > 10.2.2.2 relay.local > 10.2.2.3 relay.local
Yes. On BSD systems. On Linux systems /etc/hosts returns only the first match, so one needs DNS for multi-homed hosts. -- -- Viktor. Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the "Reply-To" header. To unsubscribe from the postfix-users list, visit http://www.postfix.org/lists.html or click the link below: <mailto:majordomo <at> postfix.org?body=unsubscribe%20postfix-users> If my response solves your problem, the best way to thank me is to not send an "it worked, thanks" follow-up. If you must respond, please put "It worked, thanks" in the "Subject" so I can delete these quickly.
Picon

RES: RES: RES: single domain - multiple smtp relayhosts

I have to configure the machines with the same hostname and reverse dns?

-----Mensagem original-----
De: owner-postfix-users <at> postfix.org [mailto:owner-postfix-users <at> postfix.org]
Em nome de Victor Duchovni
Enviada em: sexta-feira, 3 de julho de 2009 11:55
Para: 'Postfix users'
Assunto: Re: RES: RES: single domain - multiple smtp relayhosts

On Fri, Jul 03, 2009 at 09:41:25AM -0500, Noel Jones wrote:


> Wilson A. Galafassi Jr. wrote: >> Hello, >> Yes. I want to do load balancing. How i can implement this in postfix? > > # main.cf > > relayhost = [relay.local] > > # /etc/hosts > 10.2.2.2 relay.local > 10.2.2.3 relay.local
Yes. On BSD systems. On Linux systems /etc/hosts returns only the first match, so one needs DNS for multi-homed hosts. -- -- Viktor. Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the "Reply-To" header. To unsubscribe from the postfix-users list, visit http://www.postfix.org/lists.html or click the link below: <mailto:majordomo <at> postfix.org?body=unsubscribe%20postfix-users> If my response solves your problem, the best way to thank me is to not send an "it worked, thanks" follow-up. If you must respond, please put "It worked, thanks" in the "Subject" so I can delete these quickly.
Noel Jones | 5 Jul 21:31

Re: RES: RES: RES: single domain - multiple smtp relayhosts


Wilson A. Galafassi Jr. wrote: > I have to configure the machines with the same hostname and reverse dns?
Please don't top post. No, just some private name in DNS that has 2 A records. Doesn't matter what the hostname or reverse DNS is. -- Noel Jones
Picon

RES: RES: RES: single domain - multiple smtp relayhosts

I use Linux. How i can configure dns for this setup? In the Servers i have
to configure the same hostname? And the reverse dns same too in all the
machines i want to user as load balancing?

-----Mensagem original-----
De: owner-postfix-users <at> postfix.org [mailto:owner-postfix-users <at> postfix.org]
Em nome de Victor Duchovni
Enviada em: sexta-feira, 3 de julho de 2009 11:55
Para: 'Postfix users'
Assunto: Re: RES: RES: single domain - multiple smtp relayhosts

On Fri, Jul 03, 2009 at 09:41:25AM -0500, Noel Jones wrote:


> Wilson A. Galafassi Jr. wrote: >> Hello, >> Yes. I want to do load balancing. How i can implement this in postfix? > > # main.cf > > relayhost = [relay.local] > > # /etc/hosts > 10.2.2.2 relay.local > 10.2.2.3 relay.local
Yes. On BSD systems. On Linux systems /etc/hosts returns only the first match, so one needs DNS for multi-homed hosts. -- -- Viktor. Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the "Reply-To" header. To unsubscribe from the postfix-users list, visit http://www.postfix.org/lists.html or click the link below: <mailto:majordomo <at> postfix.org?body=unsubscribe%20postfix-users> If my response solves your problem, the best way to thank me is to not send an "it worked, thanks" follow-up. If you must respond, please put "It worked, thanks" in the "Subject" so I can delete these quickly.
Barney Desmond | 4 Jul 08:41
Picon

Re: RES: RES: single domain - multiple smtp relayhosts

2009/7/4 Wilson A. Galafassi Jr. <wilson.galafassi <at> gmail.com>:

> I use Linux. How i can configure dns for this setup? In the Servers i have > to configure the same hostname? And the reverse dns same too in all the > machines i want to user as load balancing?
Please don't top-post, put your responses in-line with the parts you're replying to, and trim unnecessary quoting. This really isn't a matter for Postfix, it's DNS theory. We can't tell you exactly how to do this, it will be specific to your setup. http://en.wikipedia.org/wiki/Round-robin_DNS In short, multiple "A" records with the same lookup key, eg. in usual BIND format: themailserver IN A 10.1.1.1 themailserver IN A 10.1.1.2 themailserver IN A 10.1.1.3 themailserver IN A 10.1.1.4
Picon

RES: RES: RES: single domain - multiple smtp relayhosts

Using this way if i send 1.000 emails postfix send 500 each Server? This is
what i need.

Thanks,
Wilson

-----Mensagem original-----
De: owner-postfix-users <at> postfix.org [mailto:owner-postfix-users <at> postfix.org]
Em nome de Victor Duchovni
Enviada em: sexta-feira, 3 de julho de 2009 11:55
Para: 'Postfix users'
Assunto: Re: RES: RES: single domain - multiple smtp relayhosts

On Fri, Jul 03, 2009 at 09:41:25AM -0500, Noel Jones wrote:


> Wilson A. Galafassi Jr. wrote: >> Hello, >> Yes. I want to do load balancing. How i can implement this in postfix? > > # main.cf > > relayhost = [relay.local] > > # /etc/hosts > 10.2.2.2 relay.local > 10.2.2.3 relay.local
Yes. On BSD systems. On Linux systems /etc/hosts returns only the first match, so one needs DNS for multi-homed hosts. -- -- Viktor. Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the "Reply-To" header. To unsubscribe from the postfix-users list, visit http://www.postfix.org/lists.html or click the link below: <mailto:majordomo <at> postfix.org?body=unsubscribe%20postfix-users> If my response solves your problem, the best way to thank me is to not send an "it worked, thanks" follow-up. If you must respond, please put "It worked, thanks" in the "Subject" so I can delete these quickly.

Gmane