Can't receive emails on PMG

Luis1822

Member
May 24, 2021
4
0
6
22
Hi, I've recently set up a PMG server, but sadly email forwarding is not working.

First of all, I'd want to be sure of a thing: Can I use the same port on Relay Port (Mail Proxy > relaying) and External SMTP Port (Mail Proxy > Ports)?
After that, why postfix says "warning: No certs for key at index 1 in /etc/pmg/pmg-tls.pem" at every email, also if the file exists and has a private key inside?
 
Last edited:
Hi, I've recently set up a PMG server, but sadly email forwarding is not working.
How so? Most issues I have seen with mail forwarding is the SPF isn't valid and that makes sense since you're mail server would not be allowed in external domains. Reducing SPF rules would be needed but that defeats their purpose.

Can I use the same port on Relay Port (Mail Proxy > relaying) and External SMTP Port (Mail Proxy > Ports)?
The relay port is the port PMG would be connecting to to connect to the default relay host and unless you are using that you can ignore it.
After that, why postfix says "warning: No certs for key at index 1 in /etc/pmg/pmg-tls.pem" at every email, also if the file exists and has a private key inside?
Make sure the pem is in the right format with line breaks for the certificates, keys, etc and the certificate and key headers and footers are there and without any special characters like tabs.
 
How so? Most issues I have seen with mail forwarding is the SPF isn't valid and that makes sense since you're mail server would not be allowed in external domains. Reducing SPF rules would be needed but that defeats their purpose.


The relay port is the port PMG would be connecting to to connect to the default relay host and unless you are using that you can ignore it.

Make sure the pem is in the right format with line breaks for the certificates, keys, etc and the certificate and key headers and footers are there and without any special characters like tabs.
The error is about TLS, but it's autogenerated by PMG and seems to be okay.
 
/etc/pmg/pmg-tls.pem should contain the following structure:
Code:
-----BEGIN PRIVATE KEY-----
..base64encoded certificate (PEM format)
-----END PRIVATE KEY-----

-----BEGIN CERTIFICATE-----
..base64encoded certificate (PEM format)
-----END CERTIFICATE-----

I would try rebooting the pmg instance and see if this changes anything
(alternatively restarting the postfix service should remove the postfix warnings)
 
/etc/pmg/pmg-tls.pem should contain the following structure:
Code:
-----BEGIN PRIVATE KEY-----
..base64encoded certificate (PEM format)
-----END PRIVATE KEY-----

-----BEGIN CERTIFICATE-----
..base64encoded certificate (PEM format)
-----END CERTIFICATE-----

I would try rebooting the pmg instance and see if this changes anything
(alternatively restarting the postfix service should remove the postfix warnings)
The format is correct, I've already tried to reboot but nothing changed
 
if the certificate was the one generated by pmg - you can simply create a new one with `pmgconfig tlscert --force 1` and restart postfix

if the issue still persists please provide the postfix logs
 
if the certificate was the one generated by pmg - you can simply create a new one with `pmgconfig tlscert --force 1` and restart postfix

if the issue still persists please provide the postfix logs
Thanks, that worked.

Now I'm having issues with the mailserver not accepting the proxmox emails.
There are recommended mailservers for that?
 
Thanks, that worked.

Now I'm having issues with the mailserver not accepting the proxmox emails.
There are recommended mailservers for that?
which issues?

quite commonly the issues of not being able to receive mail from PMG are due to not using the appropriate port for internal/external mailing, not adding proper relay configuration to PMG or some configuration setting on the downstream server

check the reference documentation:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html

and if this does not clear things up - please provide logs which show the issue
 

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!