[SOLVED] Relaying Failre

infinityM

Well-Known Member
Dec 7, 2019
179
1
58
31
Hey Guys,

I am running Proxmox Mail Gateway with multiple servers.
One of which is a direct admin server, Which is using it as a smart host to send mails aswell, and it's running smooth as silk.

When I tried connecting the new Exchange server to the PMG as a SmartHost, I am seeing errors in the log.

The first of which was Relay access denied errors. Which went away when I changed the exchange smtp port to send through port 26. But now I am seeing errors in the logs like:
Mar 28 12:53:00 pmg postfix/smtpd[1528]: NOQUEUE: reject: RCPT from unknown[156.38.200.57]: 451 4.3.0 <xxx.xxx@gmail.com>: Temporary lookup failure; from=<test@mydomain.com> to=<xxx.xxx@gmail.com> proto=ESMTP helo=<INFEXC01.dom.cloud>

I don't know if it makes a difference, but the domain "INFEXC01.dom.cloud" does not actually exist. It's just the cluster's internal domain for exchange

What can I check to resolve this? It's frustrating me to no end...
 
have you added your Exchange's IP to GUI->Configuration->Mail Proxy->Networks?
That should help with that.
 
how did they fail?
please provide some logs
That's the thing... I am not sure which logs to check. From what I can see I can't see the connection in the logs. But I can't see a reason for the server being unable to send the mail to proxmox....
 
I am not sure which logs to check.
for PMG the relevant logs should be /var/log/mail.log (and possibly the general journal - `journalctl -b` )
for the other systems - if they are unix-like - /var/log/mail.log would be a good starting point as well
 
  • Like
Reactions: infinityM
for PMG the relevant logs should be /var/log/mail.log (and possibly the general journal - `journalctl -b` )
for the other systems - if they are unix-like - /var/log/mail.log would be a good starting point as well

Ok so I played around and this is the issue I am now getting again...

When I send an email to an email address who's domain is local (the routing is in my PMG) it does route correctly.
When sending to gmail I see the below lines:


Apr 6 17:45:53 pmg postfix/smtpd[131709]: warning: hostname infexc01.myhostname.tld does not resolve to address 156.38.200.x: Name or service not known
Apr 6 17:45:53 pmg postfix/smtpd[131709]: connect from unknown[156.38.200.x]
Apr 6 17:45:53 pmg postfix/smtpd[131709]: NOQUEUE: reject: RCPT from unknown[156.38.200.x]: 554 5.7.1 <mygmailaddress@gmail.com>: Relay access denied; from=<test@mydomain.com> to=<mygmailaddress@gmail.com> proto=ESMTP helo=<INFEXC01.myhostname.cloud>
Apr 6 17:45:53 pmg postfix/smtpd[131709]: disconnect from unknown[156.38.200.x] ehlo=2 starttls=1 mail=1 rcpt=0/1 quit=1 commands=5/6

And the bounce imediately comes when sending in outlook as below:

Remote Server returned '554 5.7.1 <mygmailaddress@gmail.com>: Relay access denied'

Email was sent from test@mydomain.com to mygmailaddress@gmail.com so the outbound proxy is blocking it. Inbound emails are relayed to the domain correctly though?

I hope that helps?
Also the sending server is a hosted exchange 2016 server hope that helps...
 
do you have enabled 'reject unknown clients' or 'reject unknown senders' in GUI->Configuration->Mail Proxy->Options?
does your exchange relay over the internal port (26) or the external port (25)?

also check that your pmg's dns config is working (i.e. hostnames can be resolved)
 
do you have enabled 'reject unknown clients' or 'reject unknown senders' in GUI->Configuration->Mail Proxy->Options?
does your exchange relay over the internal port (26) or the external port (25)?

also check that your pmg's dns config is working (i.e. hostnames can be resolved)

I don't understand how but adding the IP to the networks section this time worked... Thank you anyway guys... I have no idea what fixed it now... I might've changed something else that caused this to work now :)
 
Glad that solved itself somehow :)
please mark the thread as 'SOLVED'
Thanks!
 

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!