Postfix send with wrong IP from virtual container

Discussion in 'Server Operation' started by Altan, Nov 28, 2020.

  1. Altan

    Altan New Member

    the server ist a virtual lxd container which has no external IP configured itself. It has an internal IP and gets the data packages addressed for the public IP of the VM forwarded by the host to internal IP through iptables rules in both directions in and out. All services are working fine that way, however e-mails get send with the IP address of the host, not with the public IP of the VM. In the mailheader you see something like this:

    Received: from [Hostname VM] (Hostname Host [Host IP])
    by [recipient host] (Postfix) with ESMTPS id 2C7779D8ED
    for <recipient address>; Sat, 28 Nov 2020 15:05:38 +0100 (CET)

    The setting of "smtp_bind_address" an "inet_interface" does not have any effect or maybe they get changed by the host.

    Any ideas how i could resolve the issue?

Share This Page