Mailserver and PMG same FQDN - :25 loops back to myself

Nov 27, 2023
2
0
1
Hello,

we setup a new mail gateway with PMG. The old mail gateway only receivied E-Mails. The mail server send direkt.

Now, PMG receive and send E-Mail. Sending with DMARC works fine.

But receiving fail:

mail for [192.168.2.2]:25 loops back to myself.

Mail Server and PMG has the same FQDN. Is that wrong?

Diffrent FQDN means, DNS MX for reciving E-Mails for PMG and something else for mailserver, but with other certificat for client connection.

Is that right?

Best regards

Matthias Schmidt
 
you probably should configure a transport for your domain in Configuration -> Mail Proxy -> transport, so it does not do a mx lookup when trying to forward the mails
 
Hello,

our configuration: 192.168.2.2 PMG and 192.168.2.3 mailserver
public dns mx record for two domains (example.com, example2.com) to mx.example.com and mx.example2.com public IP Address Port 25 to 192.168.2.2

Configuration - Mail Proxy - Relaying:

Default Relay 192.168.2.3
Relay Port 25
Relay Protocol smtp
Disable MX lookup (SMTP) no
Smarthost nono

Configuration - Mail Proxy - Relay Domains
example.com
example2.com

Configuration - Mail Proxy -
External SMTP Port 25
Internal SMTP Port 26

Configuration - Mail Proxy - Transports
Relay Domain example.com host 192.168.2.3 Protocol smtp Port 25 Use MX No
Relay Domain example2.com host 192.168.2.3 Protocol smtp Port 25 Use MX No

Sending with DMARC works fine. Only recived faild:

Log on PMG

2024-02-21T09:38:34.887314+01:00 mx postfix/smtp[1034428]: C57372134A: to=<n.name@example.com>, relay=192.168.2.3[192.168.2.3]:25, delay=0.05, delays=0.05/0/0/0, dsn=5.4.6, status=bounced (mail for [192.168.2.3]:25 loops back to myself)

On mailserver log is nothing.

Chanching Disable MX lookup (SMTP) no to Disable MX lookup (SMTP) yes
has no effect.

Other people say, FQDN should be different, or in poxfix relay port should somthing else than 25, or in etc host should set to example.com 192.168.2.3. Im not sure if this is right.

I hope to get an working answere.

Best regardes

Matthias Schmidt
 

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!