Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

best place for relay address

Status
Not open for further replies.

dsvick

IS-IT--Management
Apr 22, 2011
1
US
I've got a postfix setup I inherited that I'm trying to clean up and understand a bit more. My question for today is about the relay domains that are set up.

The relevant listings in main.cf are:
relay_domains = hash:/etc/postfix/relay_domains
relayhost =
transport_maps = hash:/etc/postfix/transport
relay_recipient_maps = hash:/etc/postfix/relay_recipients

The lists in /etc/postfix/relay_domains and in /etc/postfix/transport are identical. In the transport file the relay destination is the same for all of the domains listed. My question is if there is a cleaner way to do this?

Can I get rid of the transport file altogether and simply list the relay destination for the relayhost variable? Like this:
relay_domains = hash:/etc/postfix/relay_domains
relayhost = [ip.ad.dr.es]


The other option that I've seen in a couple of places is to use the transport_maps variable as input to the relay_domains, like this:
transport_maps = hash:/etc/postfix/transport
relay_domains = $transport_maps
relayhost =

Is one of the those methods better than the other, or is there a third option better than both? I've read quite a bit over the last week or so and both look like they'll do the job for me, with the first one being simpler assuming I don't ever need to relay different domains to different next hops.

Thanks in advance for any input!

Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top