I am using postfix on Linux redhat server,
I can't understand the functionality of smtp fallback relay configured in both main.cf & master.cf
Could you please advise?
The smtp_fallback_relay
parameter is there to allow you to extend the time or amount of attempts to deliver to external hosts, especially in cases where you would fill up the local outbound queue with messages (primarily host not found, or host unavailable messages). If you have a 24 hour retry period, you would send it to the fallback relay so it could continue to make delivery attempts until its timeout is reached. This can be useful in situations where you have to send large amounts of email to large providers, as they often do not accept more than a certain amount of mail per hour from single hosts.
smtp_fallback_relay
hosts as the documentation says: The fallback relays must be SMTP destinations. Specify a domain, host, host:port, [host]:port, [address] or [address]:port; the form [host] turns off MX lookups. If you specify multiple SMTP destinations, Postfix will try them in the specified order.
relayhost = domain.name
, in that manner, Postfix will do an MX lookup on that domain, and will normally return multiple MX records.
smtp_fallback_relay
permits multiple destinations, you can only hard code 1 address into relayhost
, unless you want to set up sender dependent or destination dependent relays (read about them in the postfix documentation). I suggest using just the domain name in the relayhost parameter. If you want to see how many servers it can chose from, run this command dig -t mx gmail.com
.