My goal is to use eight ip addresses to relay email from the server.  I
have the following in main.cf to randomize the use of ip addresses:

  sender_dependent_default_transport_maps =
randmap:{r104,r105,r106,r107,r108,r109,r110,r111}

For each of the transports in the randmap list, I have an entry in master.cf
as follows:

  r104     unix  -       -       n       -       -       smtp
    -o smtp_bind_address=75.126.xxx.xxx
    -o smtp_helo_name=r104.raystedman.org
    -o syslog_name=r104

I believe this creates the mapping between transports and ip addresses.  If
I delete "-o smtp_bind_address=75.126.xxx.xxx", Postfix will not know that
I want to use a specific ip address for the r104 transport.

I did notice that the 75.126.xxx.xxx addresses are not known to an
interface on the VM.  I added these addresses as secondary ip addresses to
ens4 which is the public interface on the VM. Now we have ens4:1,
ens4:2,..., ens4:8.  Unfortunately, this did not eliminate the warning
messages in the maillog.

Now the question becomes, how can I use randmap for a set of transports/ip
addresses without "warning: smtp_connect_addr: bind 75.126.xxx.xxx: Cannot
assign requested address" messages in the maillog. It is interesting to
note that the relay to random ip addresses works well -- just the message
in maillog is the problem.

Thanks again! Greg
www.RayStedman.org

On Thu, Jun 25, 2020 at 12:24 PM Wietse Venema <wie...@porcupine.org> wrote:

> Greg Sims:
> >   warning: smtp_connect_addr: bind 75.126.xxx.xxx: Cannot assign
> requested
> > address
>
> You have a smtp_bind_address setting in main.cf or master.cf.  That
> setting dopes not work, because the IP address is not a local
> interface. Remove the setting.
>
>         Wietse
>

Reply via email to