Default Relay

CaseyJones62

Active Member
Jun 14, 2020
6
0
41
63
I have just installed PMG 9.1.4 and can't seem to get the default relay working for my needs.

If I set the Default Relay to my main mail server, then it works fine. I'm using telnet to test the connection.

If I set the Default Relay to another MX entry (or an internal IP with no MX record) then I get a failure.

RCPT TO:<email@address.com>
550 5.5.1 Protocol error

I have Disable MX lookup (SMTP) Yes

I'm looking to route email through a VPS over wireguard to my home server, as my provider has stopped providing fixed IP.

The system is obviously doing other checks on the Default Relay IP besides the MX lookup. I assume it isn't a live check as disabling my main email PMG still works on the main IP. I areckon I have missed some settings that is causing it to abort the connection.
 
Please share the logs from when you got the Protocol error - also consider testing with tools like swaks (or actually sending a mail) - we had a few tools that don't follow SMTP standards on the wire and got similar results, and, speaking from personal experience, sometimes I do mistype a SMTP verb or don't wait long enough for the correct response from postscreen/postfix...

I hope this helps
 
I am running a VBScript to execute the SMTP commands in a repeatable manner. I did increase the inter command delay but this had no effect.

Output from syslog

Oct 16 09:41:14 besvr.URL.com pmg-smtp-filter[2160456]: starting database maintenance
Oct 16 09:41:14 besvr.URL.com pmg-smtp-filter[2160456]: end database maintenance (56 ms)
Oct 16 09:41:50 besvr.URL.com postfix/postscreen[2271337]: CONNECT from [1.1.1.1]:49836 to [2.2.2.2]:25
Oct 16 09:41:53 besvr.URL.com postfix/postscreen[2271337]: PREGREET 1 after 3 from [1.1.1.1]:49836: E
Oct 16 09:42:01 besvr.URL.com postfix/postscreen[2271337]: NOQUEUE: reject: RCPT from [1.1.1.1]:49836: 550 5.5.1 Protocol error; from=<kevin@URL.com>, to=<kevin@URL.com>, proto=ESMTP, helo=<URL.com>
Oct 16 09:42:04 besvr.URL.com postfix/postscreen[2271337]: DATA without valid RCPT from [1.1.1.1]:49836
Oct 16 09:42:04 besvr.URL.com postfix/postscreen[2271337]: DISCONNECT [1.1.1.1]:49836
Oct 16 09:43:11 besvr.URL.com pmgpolicy[2391]: starting policy database maintenance (greylist, rbl)
Oct 16 09:43:11 besvr.URL.com pmgpolicy[2391]: end policy database maintenance (23 ms, 1 ms)

The reason for the DATA error is that I haven't mastered VBScript to make it react to the responses so it sends DATA even after the fail (which it shouldn't)

EHLO URL.com
MAIL FROM:<kevin@URL.com>
RCPT TO:<kevin@URL.com>
{now get error 550 5.5.1 Protocol error}


I pointed the relay to another PMG but the logs on that server showed no contact attempted.
 
Last edited: