How to setup an existing Postfix-Mailserver for PMG

Afox

Renowned Member
Dec 18, 2014
257
12
83
Hello,

currently I run a Postfix Mailserver. How do I setup this existing Mailserver to work with PMG 5.0?

I read the documentation but there is no how-to about implementing PMG into existing infrastructure.

Do I understand correctly that the PMG-IP-address becomes the priority 10 MX-record?

Regards,

Afox
 
Last edited:
Hello, thank you! I already read the named chapter.
The question I have is if there have to be any modifications to the Mailserver-config, e.g. add the IP of PMG to "mynetworks" etc. As I said I already have a Postfix running and want to put the PMG in front of it, like shown in the named chapter.
Regards
 
Just add the existing email server IP as Default Relay, see "Configuration/Mail Proxy/Relaying: Default Relay"
 
and for the outgoing direction I add in the main.cf of the existing (Postfix-)server:
Code:
relayhost = #pmgipaddress#:26
?

What about authentication against PMG to sent mails?

Is using an IP-address sufficient in both cases, also a local/internal one?

Thanks again!
 
Last edited:
ok, and is a local IP address fine too or does it have to be the public IP address? My guess is that it doesn´t matter what IP I use, but I want to confirm.
 
ok, and is a local IP address fine too or does it have to be the public IP address? My guess is that it doesn´t matter what IP I use, but I want to confirm.

I have no idea about your network setup, so I cannot answer that question.
 
I understand. I have one more question: what happens to the "internal" mailtraffic, e.g. if user1@mydomain.com sents a mail to user2@mydomain.com? will this be proxied to the PMG if the relayhost is set. Or will there be no checks at all on this mails?
Regards
 
will this be proxied to the PMG if the relayhost is set. Or will there be no checks at all on this mails?

You mail server handles that internally, so there will be no check at PMG (why should it send such mails to the outside?).
 
ok, thank you again. I think I have figured out a way to use your product. But there is something I can´t figure out yet.

Lets say the existing Mailserver is already running amavis (which is utilising ClamAV, Spamassassin etc.). How can I prevent amavis from checking mails coming from or going to the PMG? It should only check the internal Mails like user1@mydomain.com sending a message to user2@mydomain.com.

If I can figure this out, I think I will be able to use PMG (hopefully) :)
 
Last edited:
Just configure your existing Mail Server accordingly (not using clamav or spamassassin again).
 
if anyone can give me a hint how to only check internal Mail with amavis I am very grateful!
 

Indeed I have read this chapter and I am still confused as well.

- I have a regular Postfix mail server from virtualmin configured with clamav or spamassassin and it has a public IP, so it works as-is

Q1: Can you please help me understand any advantage of using PMG 5 instead of this directly?

Q2:
Can PMG5 also run mail service directly so as to remove the need for an external mail server?

Q3:
In order to add PMG in front of my public mail server, would I just change my domain MX to point to PMG IP and from inside PMG set the relay to be the public IP of my mail server?

Q4:
Could my mail server still process mail on its public IP even after doing the above?

Thank you for clarifying.
 
Q1: Can you please help me understand any advantage of using PMG 5 instead of this directly?
web ui configuration, rule system, easier cluster setup, etc..

Q2: Can PMG5 also run mail service directly so as to remove the need for an external mail server?
No

Q3: In order to add PMG in front of my public mail server, would I just change my domain MX to point to PMG IP and from inside PMG set the relay to be the public IP of my mail server?
yes

Q4: Could my mail server still process mail on its public IP even after doing the above?
if you do not block any other ips/domains etc. then probably yes
 
Thank you for your quick reply.

Q5: Does PMG save a copy of each email and is this accessible from interface? Say there is an issue and I want to find the specific email from the specific sender and view its content, how can I do that in PMG?

Q6: How do I implement end-to-end email encrypted with PMG 5? And would this have any negative impact on PMG tracking and stats?
 
Q5: Does PMG save a copy of each email and is this accessible from interface? Say there is an issue and I want to find the specific email from the specific sender and view its content, how can I do that in PMG?
no, the only emails saved are those in the quarantine

Q6: How do I implement end-to-end email encrypted with PMG 5? And would this have any negative impact on PMG tracking and stats?
if you end-to-end encrypt your mails, there is nothing different for pmg since it is not involved? the important headers etc. must be unencrypted anyway?
 

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!