Using PMG as a Relay/Smarthost without fixed network address

eins

Member
Jan 13, 2021
3
0
6
37
I have a mail server on a residential internet connection with a changing IP Address. For incomming Emails that is fine, but for outbound i rented a VPS and wanted to setup Proxmox Mail Gateway as a relay host.
Now i understand that i can allow relaying mail for ip adresses or networks under Configuration -> Mail Proxy -> Networks, but that only works for fixed IP adresses. On a IP change i would have to manually update that.

Is there a better way to allow relaying mail? By allowing a Domain (i have a dynamic DNS setup) or even authentication?
 
. For incomming Emails that is fine
how does that work - where does your MX record point to?

Is there a better way to allow relaying mail? By allowing a Domain (i have a dynamic DNS setup) or even authentication?
hmm - In that case I'd probably setup a VPN between my residential line and the PMG-VPS
(wireguard is pretty easily setup, openvpn is also an option) - and put the VPN-IPs in the trusted networks

else - you can adapt PMGs postfix configuration (and add SMTP-AUTH, or some other way of verifying your identity) - there's quite a few howtos on the net (and in this forum) regarding postfix configuration
integration of your the config into PMG works via the templateing system:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine
 
how does that work - where does your MX record point to?
I have a dynamic DNS entry that gets updated when the IP changes and the MX just points to that.

hmm - In that case I'd probably setup a VPN between my residential line and the PMG-VPS
(wireguard is pretty easily setup, openvpn is also an option) - and put the VPN-IPs in the trusted networks

else - you can adapt PMGs postfix configuration (and add SMTP-AUTH, or some other way of verifying your identity) - there's quite a few howtos on the net (and in this forum) regarding postfix configuration
integration of your the config into PMG works via the templateing system:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine
If i were to setup a VPN connection between the two... i could just forward the port over that connection and don't use the mail gateway at all. Actually, thinking about that, i might just tunnel the port over ssh...
The Proxmox Mail Gateway was recommended to me since it is supposed to make stuff like setting up a relay easy, but it seems for my usecase its not really useful.
 
Last edited: