Stephan Seitz via Postfix-users: > Am Mi, M?r 05, 2025 at 13:30:07 -0500 schrieb Wietse Venema via Postfix-users: > >> If you have more than one, how is the host chosen? Always the first > >> until it fails? Or always randomly? > >In the specified order. Using multiple relayhosts is rare, using > >them randomly even rarer. > > Strange. > > If you have a shop for example that sends mails to customer, you would > want to have more than one relay host, so that the mails aren?t hold > back, when the relay host is down (updates, failures, etc.).
Postfix supports multiple relay hosts (relayhost = foo, bar). > On the other hand you don't want the backup relay host to be a fresh one > to the outside world (reputation and co.). > > How would you solve it? With randmap, if a built-in solution is needed. It may not be obvious but it gets the job done. Other alternatives: - Poor man's load balancer: configure multiple IP addresses for the relayh0ost name (in DNS or /etc/hosts) - Locsl load balanacer: configure relayhost with the name:port or [ipaddress]:port of a load balancer, and point the load balancer to the relayhosts. This also reduces mail delivery delays in case one of the relayhosts goes down. The load balancer can run on the Postfix machine, bound to 127.0.0.1. Wietse _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org