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
 
+1
i need to set
Code:
mydomain = mydoamin.org
myhostname = mail.mydoamin.org
into /etc/pmg/templates/main.cf.in for correct HELO message like in PTR
but after that server stops relay incoming messages with
to=<root@mydomain.org>, relay=192.168.202.200[192.168.202.200]:25, delay=0.16, delays=0.04/0.05/0.06/0, dsn=5.4.6, status=bounced (mail for [192.168.202.200]:25 loops back to myself
 
Same here. Anyone with a solution when the mail server and PMG have the same FQDN, e.g. mail.mydomain.com?
 
I also couldn’t solve this issue, so I just gave the mail server the name mail.mydomain.local and PMG – mail.mydomain.com