Author Topic: Mail Transport Unavailable - Postfix  (Read 2947 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Mail Transport Unavailable - Postfix
« on: July 28, 2023, 12:47:43 AM »
I have over 50+ emails stuck in postfix queue for weeks. I have processed over and over and they just sit there. The problem is the emails are from scripts and sites on my VPS and all going out to gmail. I checked the mail.log in server logs dir and here is whaqt I am seeing:

Jul 27 19:53:18 vserv postfix/qmgr[27881]: warning: connect to transport private/retry: Connection refused
Jul 27 19:53:18 vserv postfix/qmgr[27881]: warning: connect to transport private/retry: Connection refused
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 5BDBD4DD4: to=<gunstra67@gmail.com>, relay=none, delay=503590, delays=503584/5.1/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 564014D86: to=<gunstra67@gmail.com>, relay=none, delay=762791, delays=762786/5.1/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: B3EA44EC9: to=<brentd67@gmail.com>, relay=none, delay=71203, delays=71198/5.1/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: B17634F26: to=<brentd67@gmail.com>, relay=none, delay=1133210, delays=1133205/5.1/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: B04714D9B: to=<gunstra67@gmail.com>, relay=none, delay=417192, delays=417186/5.1/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 206729120: to=<brentd67@gmail.com>, relay=none, delay=9984, delays=9979/5.1/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 24EA94F13: to=<brentd67@gmail.com>, relay=none, delay=614796, delays=614791/5.1/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 2892C4EAF: to=<brentd67@gmail.com>, relay=none, delay=416817, delays=416811/5.1/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/smtp[11975]: connect to alt4.gmail-smtp-in.l.google.com[172.253.126.26]:25: Connection refused
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 2379D4D4C: to=<gunstra67@gmail.com>, relay=none, delay=935590, delays=935585/5.1/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/smtp[11975]: 57BDF9136: to=<brentd67@gmail.com>, relay=none, delay=96348, delays=96343/0.04/5.1/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[172.253.126.26]:25: Connection refused)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 2751F910B: to=<gunstra67@gmail.com>, relay=none, delay=1194791, delays=1194785/5.1/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/smtp[11979]: connect to alt4.gmail-smtp-in.l.google.com[172.253.126.26]:25: Connection refused
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 699FF4F2B: to=<brentd67@gmail.com>, relay=none, delay=762445, delays=762440/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/smtp[11979]: 50D094B8E: to=<gunstra67@gmail.com>, relay=none, delay=1281190, delays=1281185/0.09/5.1/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[172.253.126.26]:25: Connection refused)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 664E44941: to=<brentd67@gmail.com>, relay=none, delay=355497, delays=355492/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 72BAB4C66: to=<gunstra67@gmail.com>, relay=none, delay=157991, delays=157986/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 7317E4E0F: to=<brentd67@gmail.com>, relay=none, delay=269156, delays=269150/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 71FE74F17: to=<brentd67@gmail.com>, relay=none, delay=440917, delays=440912/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 750594F3F: to=<brentd67@gmail.com>, relay=none, delay=676018, delays=676013/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 832EA4EEA: to=<brentd67@gmail.com>, relay=none, delay=168521, delays=168515/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 849BD57C1: to=<brentd67@gmail.com>, relay=none, delay=1021652, delays=1021647/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: DF95B4E6F: to=<brentd67@gmail.com>, relay=none, delay=873975, delays=873970/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: D9A0F90FC: to=<brentd67@gmail.com>, relay=none, delay=182791, delays=182785/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: DD0E34EEE: to=<brentd67@gmail.com>, relay=none, delay=701201, delays=701196/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: DBE4F4C12: to=<partyoptions13@gmail.com>, relay=none, delay=287941, delays=287936/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 3290E4E4E: to=<brentd67@gmail.com>, relay=none, delay=589613, delays=589608/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 3FACC4F0F: to=<brentd67@gmail.com>, relay=none, delay=330403, delays=330398/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: EB11C4D9F: to=<brentd67@gmail.com>, relay=none, delay=503210, delays=503204/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: E1FDA4EFA: to=<brentd67@gmail.com>, relay=none, delay=243967, delays=243962/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 06A1448BA: to=<gunstra67@gmail.com>, relay=none, delay=244390, delays=244385/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 09035589C: to=<brentd67@gmail.com>, relay=none, delay=157596, delays=157591/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 02F72900C: to=<brentd67@gmail.com>, relay=none, delay=441952, delays=441947/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 019204F2C: to=<brentd67@gmail.com>, relay=none, delay=671939, delays=671934/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 006EF4D60: to=<gunstra67@gmail.com>, relay=none, delay=676389, delays=676384/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 07FA34F2F: to=<gunstra67@gmail.com>, relay=none, delay=511754, delays=511749/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 056664F16: to=<gunstra67@gmail.com>, relay=none, delay=71590, delays=71585/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: AD7BC4E5F: to=<brentd67@gmail.com>, relay=none, delay=168518, delays=168513/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: AED6D58CC: to=<gunstra67@gmail.com>, relay=none, delay=849190, delays=849185/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: AB0A14E4F: to=<brentd67@gmail.com>, relay=none, delay=960350, delays=960344/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: A8A034ED9: to=<gunstra67@gmail.com>, relay=none, delay=1021990, delays=1021985/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 9C9785206: to=<brentd67@gmail.com>, relay=none, delay=935256, delays=935251/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 9B2394EED: to=<gunstra67@gmail.com>, relay=none, delay=589990, delays=589985/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 4F7CD9128: to=<gunstra67@gmail.com>, relay=none, delay=330790, delays=330785/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 4C63E4E90: to=<brentd67@gmail.com>, relay=none, delay=528382, delays=528377/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 4B2084ED5: to=<brentd67@gmail.com>, relay=none, delay=269611, delays=269606/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 16D6F4E57: to=<brentd67@gmail.com>, relay=none, delay=1194465, delays=1194459/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 15B7E4EA3: to=<ruad224466889911@gmail.com>, relay=none, delay=114556, delays=114551/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 13C769118: to=<brentd67@gmail.com>, relay=none, delay=1045692, delays=1045686/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 27 19:53:18 vserv postfix/qmgr[27881]: 1157A9103: to=<brentd67@gmail.com>, relay=none, delay=787595, delays=787590/5.2/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)

The emails themselves are errors like such and again, all stuck emails are going to a gmail address:

Queue reason:
57BDF9136    453795 Wed Jul 26 17:07:30  fettube@vserv.dragonlynx.com

(connect to alt4.gmail-smtp-in.l.google.com[172.253.126.27]:25: Connection refused)
                                         brentd67@gmail.com

Please help!!!!

Offline
*****
Re: Mail Transport Unavailable - Postfix
« Reply #1 on: July 28, 2023, 12:58:23 AM »
Are you checking with Google's Postmaster Tools to gain more insight into your deliverability issues from Google's perspective? Gmail can be particularly finicky, even if you have SSL, reverse DNS and SPF/DMARC records all set up. One compromised account on one of my servers was all it took to shut down deliverability to Gmail and it took a good deal of work (and some time) to get it flowing again.

Offline
*
Re: Mail Transport Unavailable - Postfix
« Reply #2 on: July 28, 2023, 01:22:09 AM »
Are you checking with Google's Postmaster Tools to gain more insight into your deliverability issues from Google's perspective? Gmail can be particularly finicky, even if you have SSL, reverse DNS and SPF/DMARC records all set up. One compromised account on one of my servers was all it took to shut down deliverability to Gmail and it took a good deal of work (and some time) to get it flowing again.

I have added both dragonlynx.com and vserv.dragonlynx.com to google's postmaster. It didn't change anything. rDNS is setup and working fine, port 25 is open. I have tried so many fixes I have seen on forums and still nothing helps.

Offline
*****
Re: Mail Transport Unavailable - Postfix
« Reply #3 on: July 28, 2023, 09:22:42 AM »
As mentioned by Overseer, make sure your DKIM & SPF are setup correctly.

Try to clear you que.

I always hate suggesting this, but stop csf temporarily.

Try to send an email from the CLI:

Make sure you have mailx installed (dnf install mailx)

Then run:

echo "Test Email" | mailx -s "Test" (email)@gmail.com

--

If that doesn't work, then we will have to make some small changes (3 lines) to main.cf

Are all these 'scripts' coming from your sites to your gmail?

Offline
*
Re: Mail Transport Unavailable - Postfix
« Reply #4 on: July 28, 2023, 04:58:14 PM »
As mentioned by Overseer, make sure your DKIM & SPF are setup correctly.

Try to clear you que.

I always hate suggesting this, but stop csf temporarily.

Try to send an email from the CLI:

Make sure you have mailx installed (dnf install mailx)

Then run:

echo "Test Email" | mailx -s "Test" (email)@gmail.com

--

If that doesn't work, then we will have to make some small changes (3 lines) to main.cf

Are all these 'scripts' coming from your sites to your gmail?

I shut the firewall off and all the mails got delivered. So why is that when google isn;'t in the firewall as blocked I don't think.

Offline
*
Re: Mail Transport Unavailable - Postfix
« Reply #5 on: July 28, 2023, 05:13:34 PM »
As mentioned by Overseer, make sure your DKIM & SPF are setup correctly.

Try to clear you que.

I always hate suggesting this, but stop csf temporarily.

Try to send an email from the CLI:

Make sure you have mailx installed (dnf install mailx)

Then run:

echo "Test Email" | mailx -s "Test" (email)@gmail.com

--

If that doesn't work, then we will have to make some small changes (3 lines) to main.cf

Are all these 'scripts' coming from your sites to your gmail?

I cleared all the bans out of csf, turned it back on and installed mailx. I sent a test email out to my gmail and it is sitting in queue again. So gmail all of a sudden has just decided to not work with the firewall on. That is so messed up ugh

Offline
*****
Re: Mail Transport Unavailable - Postfix
« Reply #6 on: July 28, 2023, 05:34:02 PM »
OK, so it's narrowed down to csf blocking outgoing emails, and not a Google problem.

Check to make sure you have ports 25 & 587 open for TCP Out.

Also do you have any country band sunder CC_DENY?

Offline
*****
Re: Mail Transport Unavailable - Postfix
« Reply #7 on: July 28, 2023, 05:35:36 PM »
You can try to rebuild your mailserver also.

I've seen that do some weird things over the years.

Offline
*
Re: Mail Transport Unavailable - Postfix
« Reply #8 on: July 28, 2023, 05:36:35 PM »
OK, so it's narrowed down to csf blocking outgoing emails, and not a Google problem.

Check to make sure you have ports 25 & 587 open for TCP Out.

Also do you have any country band sunder CC_DENY?

Opened TCP \ UDP ports
TCP
IN: 20, 21, 22, 25, 53, 80, 110, 143, 443, 465, 587, 993, 995, 2030, 2031, 2082, 2083, 2086, 2087, 2095, 2096, 2304, 5829
OUT: 2703, 20, 21, 22, 25, 53, 80, 110, 113, 443, 2030, 2031, 2082, 2083, 2086, 2087, 2095, 2096, 587, 993, 995, 2080, 2304, 2443, 5829
UDP
IN: 20, 21, 53, 80, 443
OUT: 20, 21, 53, 113, 123

# Each option is a comma separated list of CC's, e.g. "US,GB,DE"
CC_DENY = ""
CC_ALLOW = ""
« Last Edit: July 28, 2023, 05:38:07 PM by DragoCom »

Offline
*****
Re: Mail Transport Unavailable - Postfix
« Reply #9 on: July 28, 2023, 08:09:23 PM »
In TCP Out, add port 465

Than check the below under SMTP Settings.

Make sure these options say:

SMTP_BLOCK = “0”
SMTP_ALLOWLOCAL = "1"
SMTP_REDIRECT = "0"
SMTP_PORTS = "25,465,587"


After those changes, save, and Force a Restart of csf.
Or run csf -r from the cli.

Offline
*
Re: Mail Transport Unavailable - Postfix
« Reply #10 on: July 28, 2023, 08:55:31 PM »
In TCP Out, add port 465

Than check the below under SMTP Settings.

Make sure these options say:

SMTP_BLOCK = “0”
SMTP_ALLOWLOCAL = "1"
SMTP_REDIRECT = "0"
SMTP_PORTS = "25,465,587"


After those changes, save, and Force a Restart of csf.
Or run csf -r from the cli.

I did all that added those variables to the main.cf for the firewall restarted firewall mail services everything I still have that email to my Gmail from root CLI sitting in q so it didn't help I guess

Offline
*****
Re: Mail Transport Unavailable - Postfix
« Reply #11 on: July 28, 2023, 09:56:04 PM »
csf configuration is located at /etc/csf/csf.conf

Which is where the SMTP Settings are at for the firewall.

--

The Postfix configuration is your main.cf at /etc/postfix/main.cf

--

Your problem is odd, if you have all those setting correct in CSF config, it should not be blocking outgoing SMTP when enabled.

Maybe @overseer will have a suggestion at this point.

Offline
*****
Re: Mail Transport Unavailable - Postfix
« Reply #12 on: July 28, 2023, 10:48:02 PM »
In TCP Out, add port 465
Definitely add 465 (SSL/TLS), in order to support Windows Mail, Outlook, and Mac Mail. Other MUAs (mail user agents) such as Thunderbird default to STARTTLS on standard ports (25 for SMTP, 143 for IMAP), but in order to support the widest range of clients, you should support 25, 465, and 587 (submission).

My csf.conf is as Starburst recommended, so nothing to add there. I am country code blocking CN, RU, KP, NG, and a few other "hacky" countries, but that doesn't interfere with Gmail delivery. I would second his recommendation to try rebuilding the mail server as a matter of housekeeping. Do you have any Google-specific API keys in your DNS?

Offline
*
Re: Mail Transport Unavailable - Postfix
« Reply #13 on: July 29, 2023, 02:58:29 AM »
csf configuration is located at /etc/csf/csf.conf

Which is where the SMTP Settings are at for the firewall.

--

The Postfix configuration is your main.cf at /etc/postfix/main.cf

--

Your problem is odd, if you have all those setting correct in CSF config, it should not be blocking outgoing SMTP when enabled.

Maybe @overseer will have a suggestion at this point.

smtp_block was 1 in csf.conf and I changed it to 0 and it released the gmail mail again. I hope it stays this way. The firewall was on so it works so far. Thank you so much for your help.

Offline
*****
Re: Mail Transport Unavailable - Postfix
« Reply #14 on: July 29, 2023, 04:29:39 AM »
Glad to hear its working.