PMG ... local mail server ... dynamic IP -> How to configure?

starbug

Member
Feb 12, 2022
2
0
6
71
Hi,

I do have a setup with a local mail server behind a dynamic IP. As I receive/send eMails via a relay server of a domain hosting company for my private domain all worked find. Recently I wanted to make my setup even safer and installed PMG and configured it to receive all eMails in name of my mail server for the SPAM/virus pre-check.

Now I wanted to even send my eMails from the local mail server via PMG, but got stuck as I haven't found a possibility to configure my domain hosting company's relay with authentication. As PMG is behind a dynamic IP, it fails to directly send the eMails as the address range is typically listed in block lists.

Does anyone has any advice?

Best Regards
 
have you try ddns?
DDNS is configured and working fine.

My question is, how to tell PMG to use a mail relay with authentication to forward outgoing eMail from my mail server to the internet?

Current setup:

incoming eMail ... Internet -----> Domain Hoster Mail Relay -----> FW (NAT) -----> PMG -----> Mail Server
outgoing eMail ... Internet <-------------------------------------- FW <------------------------ Mail Server

Preferred setup (but how to configure if Mail Relay requires authentication?):

incoming/outgoing eMail ... Internet <-----> Domain Hoster Mail Relay <-----> FW (NAT) <-----> PMG <-----> Mail Server
 
My question is, how to tell PMG to use a mail relay with authentication to forward outgoing eMail from my mail server to the internet?
for the authentication part you need to adapt the postfix config using the templateing system:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine

(you can set a 'smart host' in the GUI, which is where outbound mail is sent to, but the smtp-auth part is something you need to do manually)

There are many guides and HOWTOs on the net for this problem - on a quick search - this might work:
https://mailoutgoing.com/support/mailrelay/postfix.html
https://www.cyberciti.biz/faq/postfix-smtp-authentication-for-mail-servers/

I hope this helps!
 
for the authentication part you need to adapt the postfix config using the templateing system:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine

(you can set a 'smart host' in the GUI, which is where outbound mail is sent to, but the smtp-auth part is something you need to do manually)

There are many guides and HOWTOs on the net for this problem - on a quick search - this might work:
https://mailoutgoing.com/support/mailrelay/postfix.html
https://www.cyberciti.biz/faq/postfix-smtp-authentication-for-mail-servers/

I hope this helps!
It would be very nice if this feature could be incorporated into the UI.
Like you have inbound transport destinations there should be outbound transport destinations for smart hosts with authentification.

Then it would be possible to have the Mailgateway a a multi domain inbound and outbound gateway.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!