Hi Wietse, Thanks for the reply. The problem is not with the VM connection (actually there is no VM active at this point) but rather with the VPN tunnel (tun0). I don't understand why the routing table would cause postfix to use virb0, rather than tun0 or enp0s25, but not other internet apps (i.e. browser is not using virb0). Something is different with postfix/SMTP.
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.228.1 128.0.0.0 UG 0 0 0 tun0 0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 enp0s25 128.0.0.0 192.168.228.1 128.0.0.0 UG 0 0 0 tun0 188.130.138.23 192.168.0.1 255.255.255.255 UGH 0 0 0 enp0s25 192.168.0.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s25 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0 192.168.228.0 0.0.0.0 255.255.255.0 U 0 0 0 tun0 Postfix tries to use network 192.168.122.0 when tun0 is present. Otherwise it uses network 192.168.0.0. I don't see anything that points it to 192.168.122.0. On 7/2/2019 3:12 PM, Wietse Venema wrote: > Dennis Putnam: >> I am occasionally using a VPN connection and while that connection is >> up, postfix uses the wrong NIC to try to send email. When there is no >> VPN connection, postfix uses the primary NIC named enp0s25. At the same >> time there is another NIC named virbr0 created an used for VirtualBox. >> In any case when the VPN is connected, the NIC is tun0 but instead of >> using that or the primary NIC, postfix tries to use virbr0. How do I >> configure postfix to use tun0, if it is up, otherwise enp0s25? TIA. > Postfix does not choose NICs. Your routing table determines the > interface, based on the destination IP address. > > Possible solution: configure Postfix to use the VM as its relayhost > then set up Postfix on the VM. > > Wietse >
signature.asc
Description: OpenPGP digital signature