Control Web Panel

WebPanel => CentOS 9 Problems => Topic started by: kwesiaryee on August 06, 2024, 01:15:09 PM

Title: Can receive but not send emails out
Post by: kwesiaryee on August 06, 2024, 01:15:09 PM
Because of this particular issue I updgraded to AlmaLinux 9 on my contabo vps, because contabo removed centos 7.

Unfortunately, I still cannot send emails out. I've checked my dkim/spl/dmarc and they all are good from mxtools testing, but I just cannot send emails out.

I do applications that do a ot of automated mail sending to customers, so this is very vital to me.

Please  I really need help on this.

Looking forward to a lasting resolution to this problem.
Title: Re: Can receive but not send emails out
Post by: BeZazz on August 06, 2024, 02:17:38 PM
Have you asked contabo if the block might be at their end?
Title: Re: Can receive but not send emails out
Post by: kwesiaryee on August 06, 2024, 03:26:03 PM
They said no.
Title: Re: Can receive but not send emails out
Post by: kwesiaryee on August 06, 2024, 04:30:25 PM
I did some digging and found out the following errors:

Code: [Select]
Aug 6 18:25:12 vps postfix/qmgr[3426]: 602DB505EFC: to=, orig_to=, relay=none, delay=52443, delays=52352/91/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Aug 6 18:25:12 vps postfix/qmgr[3426]: 686715058C0: to=, relay=none, delay=156335, delays=156244/91/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)

Please can this help in finding the errors for a possible resolution.
Title: Re: Can receive but not send emails out
Post by: Starburst on August 06, 2024, 07:42:13 PM
All providers block port 25 by default, including Contabo.

You have to contact their support to unblock that port with a valid reason, and not send out SPAM.

Or use a 3rd party to send email from the server like MailGun.

You can test if your outgoing is configured correctly.

See:
https://kb.starburstservices.com/tips-and-tricks/sending-test-email-in-almalinux-8-9-from-cli-using-s-nail/ (https://kb.starburstservices.com/tips-and-tricks/sending-test-email-in-almalinux-8-9-from-cli-using-s-nail/)
Title: Re: Can receive but not send emails out
Post by: kwesiaryee on August 07, 2024, 07:01:51 AM
I've even used your test and everything is OK. Port 25 is not blocked. With all the errors I'm getting with postfix, I'm inclined to believe that this is a CWP internal issue;

Code: [Select]
Aug 7 08:53:00 vps postfix/qmgr[1377]: 78D3550AAAA: to=, relay=none, delay=10329, delays=10329/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 70FFD50AAA8: from=, size=672, nrcpt=1 (queue active)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 70FFD50AAA8: to=, relay=none, delay=10329, delays=10329/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 7CC7D50AAAB: from=, size=672, nrcpt=1 (queue active)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 7CC7D50AAAB: to=, relay=none, delay=10329, delays=10329/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)
Aug 7 08:53:00 vps postfix/qmgr[1377]: A875650AAB5: from=, size=650, nrcpt=1 (queue active)
Aug 7 08:53:00 vps postfix/qmgr[1377]: A875650AAB5: to=, relay=none, delay=10329, delays=10329/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)
Aug 7 08:53:00 vps postfix/qmgr[1377]: AC3E250AAB6: from=, size=662, nrcpt=1 (queue active)
Aug 7 08:53:00 vps postfix/qmgr[1377]: AC3E250AAB6: to=, relay=none, delay=10329, delays=10329/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)
Aug 7 08:53:00 vps postfix/qmgr[1377]: AD30C50A919: from=, size=1115, nrcpt=1 (queue active)
Aug 7 08:53:00 vps postfix/qmgr[1377]: AD30C50A919: to=, relay=none, delay=29966, delays=29966/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)
Aug 7 08:53:00 vps postfix/qmgr[1377]: A40D950AAB4: from=, size=628, nrcpt=1 (queue active)
Aug 7 08:53:00 vps postfix/qmgr[1377]: A40D950AAB4: to=, relay=none, delay=10329, delays=10329/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)
Aug 7 08:53:00 vps postfix/qmgr[1377]: AB1C950AA83: from=, size=1043, nrcpt=1 (queue active)
Aug 7 08:53:00 vps postfix/qmgr[1377]: AB1C950AA83: to=, relay=none, delay=13015, delays=13015/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 695BC50AA99: from=, size=1081, nrcpt=1 (queue active)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 695BC50AA99: to=, relay=none, delay=10399, delays=10399/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 6817650AAA6: from=, size=2429, nrcpt=1 (queue active)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 6817650AAA6: to=, relay=none, delay=10329, delays=10329/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 6C89750AA9F: from=, size=623, nrcpt=1 (queue active)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 6C89750AA9F: to=, relay=none, delay=10329, delays=10329/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 4F81150AAA2: from=, size=25475, nrcpt=1 (queue active)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 4F81150AAA2: to=, relay=none, delay=10329, delays=10329/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 4238C50AAA0: from=, size=23636, nrcpt=1 (queue active)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 4238C50AAA0: to=, relay=none, delay=10330, delays=10330/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 4A49250AAA1: from=, size=15733, nrcpt=1 (queue active)
Aug 7 08:53:00 vps postfix/qmgr[1377]: 4A49250AAA1: to=, relay=none, delay=10329, delays=10329/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)
Aug 7 08:53:14 vps amavis[66468]: starting. /usr/sbin/amavisd at vps.server.net amavis-2.13.1 (20240304), Unicode aware, LANG="en_US.UTF-8"
Aug 7 08:53:14 vps amavis[66468]: perl=5.032001, user=, EUID: 986 (986); group=(), EGID: 983 983 (983 983)
Aug 7 08:53:14 vps amavis[66473]: (!)Net::Server: 2024/08/07-08:53:14 Can't connect to TCP port 10024 on ::1 [Cannot assign requested address] at line 64 in file /usr/share/perl5/vendor_perl/Net/Server/Proto/TCP.pm
Aug 7 08:53:53 vps postfix/smtpd[66516]: connect from localhost[127.0.0.1]
Aug 7 08:53:53 vps postfix/smtpd[66516]: disconnect from localhost[127.0.0.1] ehlo=1 quit=1 commands=2
Aug 7 08:54:45 vps amavis[66834]: starting. /usr/sbin/amavisd at vps.server.net amavis-2.13.1 (20240304), Unicode aware, LANG="en_US.UTF-8"
Aug 7 08:54:45 vps amavis[66834]: perl=5.032001, user=, EUID: 986 (986); group=(), EGID: 983 983 (983 983)
Aug 7 08:54:45 vps amavis[66839]: (!)Net::Server: 2024/08/07-08:54:45 Can't connect to TCP port 10024 on ::1 [Cannot assign requested address] at line 64 in file /usr/share/perl5/vendor_perl/Net/Server/Proto/TCP.pm

Can anyone please help me out??
Title: Re: Can receive but not send emails out
Post by: BeZazz on August 07, 2024, 11:37:57 AM
I've even used your test and everything is OK. Port 25 is not blocked. With all the errors I'm getting with postfix, I'm inclined to believe that this is a CWP internal issue;

Code: [Select]
Aug 7 08:53:00 vps postfix/qmgr[1377]: 78D3550AAAA: to=, relay=none, delay=10329, delays=10329/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)

Can anyone please help me out??

Code: [Select]
To mstatus=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[142.250.150.26]:25: Connection timed out)

 I'm a tad tired but it looks like you are trying to connect to alt2.gmail-smtp-in.l.google.com I'm guessing you have issues at Gmails end.
Title: Re: Can receive but not send emails out
Post by: Starburst on August 07, 2024, 01:45:07 PM
Look like your IP or domain is temporarily blocked by Google.

What is the base IP and hostname?

You can try to send a test email to:
https://www.mail-tester.com/ (https://www.mail-tester.com/)

And test your IP's and domain names at:
https://multirbl.valli.org/lookup/ (https://multirbl.valli.org/lookup/)

Google became very strict about requiring all your DNS records to be setup correctly.
They actually have become just as bad as M$.
Title: Re: Can receive but not send emails out
Post by: overseer on August 07, 2024, 08:04:15 PM
Yes, they expect all the internet to bow the knee before them, instead of abiding by RFCs and best practices. I personally don't use any of their services yet I still have to tune my delivery setup for them, given the high number of Gmail users that my users try to send to.
Title: Re: Can receive but not send emails out
Post by: kwesiaryee on August 08, 2024, 08:19:45 AM
Test on https://www.mail-tester.com/ failed.

I have to say that I'm more of a programmer than an admin so very novice on these things.

Yet I really want this solved. I am desperately looking for a solution here. 
Title: Re: Can receive but not send emails out
Post by: Starburst on August 08, 2024, 05:47:17 PM
If that mail test failed, it would have told you what failed.

More than likely your DNS entries are missing or incorrect.
Title: Re: Can receive but not send emails out
Post by: kwesiaryee on August 08, 2024, 10:07:36 PM
This is the result I got:

Number 1 reason for this page
Your email client, plugin or extension said "sent", and it sure did. But your email got stopped just after, and never got sent.
Why? Your SMTP or web host is probably blocking your emails. Quite common. Get in touch with them now to find out.

Title: Re: Can receive but not send emails out
Post by: BeZazz on August 09, 2024, 02:50:57 AM
From what I can workout, there appears to missing mx records. (that is getting info from previous posts of yours)

What domain/IP is your email setup on?
Title: Re: Can receive but not send emails out
Post by: kwesiaryee on August 09, 2024, 06:34:13 AM
klarys.com
Title: Re: Can receive but not send emails out
Post by: BeZazz on August 09, 2024, 07:14:25 AM
From what I can tell you have the
PTR for vps.klarys.net set to 194.163.155.218
but your mail server is using
mail.klarys.com
which has no Reverse DNS setup.
Title: Re: Can receive but not send emails out
Post by: Starburst on August 09, 2024, 01:03:07 PM
Your rDNS for 194.163.155.218 looks good, as it is pointing to the hostname vps.klarys.net as it should.

You have an MX entry for klarys.com

The SPF record is there, and looks good.
https://dnschecker.org/spf-record-validation.php

DKIM look good:
default._domainkey.klarys.com
https://dmarcian.com/dkim-inspector/

DMARC is set to Reject & Strict, which is fine, but you don't have an email address entered to receive reject reports.
https://dmarcian.com/dmarc-inspector/


What where the errors mail-tester were giving to you?
Title: Re: Can receive but not send emails out
Post by: kwesiaryee on August 12, 2024, 02:59:30 PM
Seriously, I am a novice in this (with my head filled with programming languages and none of networking) so I deperately need help in this as it has become critical to my work.

Now, should i replace/add the mail.klarys.com with the vps.klarys.com (ie mail.domain.com with vps.klarys.com)??
Title: Re: Can receive but not send emails out
Post by: kwesiaryee on August 12, 2024, 03:14:11 PM
The mail tester was giving me the following errors:

Your email client, plugin or extension said "sent", and it sure did. But your email got stopped just after, and never got sent.
Why? Your SMTP or web host is probably blocking your emails. Quite common. Get in touch with them now to find out.
Title: Re: Can receive but not send emails out
Post by: Starburst on August 13, 2024, 11:02:30 AM
Contact your upstream & double check your TCP_IN & TCP_OUT in the firewall.

As it mentioned, it's being blocked somewhere.
Title: Re: Can receive but not send emails out
Post by: kwesiaryee on August 15, 2024, 10:46:33 AM
 I find the following there:

Code: [Select]
# Allow incoming TCP ports
TCP_IN = "20,21,22,25,53,80,110,143,443,465,853,587,993,995,2030,2031,2082,2083,2086,2087,2095,2096"

# Allow outgoing TCP ports
TCP_OUT = "2703,20,21,22,25,53,80,110,113,443,2030,2031,2082,2083,2086,2087,2095,2096,853,587,993,995,2080,2443"

 :-[
Title: Re: Can receive but not send emails out
Post by: Starburst on August 15, 2024, 05:37:25 PM
Try adding port 465 for SMTP.

Also try disabling csf/lfd, and if outgoing email doesn't work, then that would point to the upstream blocking ports somewhere.
Title: Re: Can receive but not send emails out
Post by: kwesiaryee on August 17, 2024, 07:36:50 AM
Can you resolve this for me for a little fee?
Title: Re: Can receive but not send emails out
Post by: Starburst on August 17, 2024, 05:02:07 PM
Try to rebuild your mail server, if that fails let me know.

If you want I can login and took a look, but won't charge you.
Title: Re: Can receive but not send emails out
Post by: kwesiaryee on August 17, 2024, 08:53:07 PM
Thanks so much, I rebuilt it and still same. Also, I don't mind if you help me out with this, i desperately have to solve this issue.
Title: Re: Can receive but not send emails out
Post by: Starburst on August 18, 2024, 04:58:17 AM
Just fought with another server tonight, nothing was wrong.

Turned out the provider was at fault...
Even though they said they had opened port 25...

CLI test wouldn't even go out.

Spoke to a 3rd support person, and don't know what they did, but the tests started flooding in after 4.5 hours...

But I can look at it.
Do you have an encrypted email account using OpenPGP?
Title: Re: Can receive but not send emails out
Post by: kwesiaryee on August 18, 2024, 05:50:05 AM
No. Honestly I don't know if I have it or not because this is the first time hearing it.
Title: Re: Can receive but not send emails out
Post by: kwesiaryee on August 18, 2024, 06:02:11 AM
I just did a small research on the openPGP and I can say I have a gmal account and I run that and all other on thunderbird which apparantly is based on the openPGP.

Is that enough?
Title: Re: Can receive but not send emails out
Post by: Starburst on August 20, 2024, 03:23:40 PM
If you have OpenPGP installed in Thunderbird, it should give you an option at the top to 'Encrypt' the email.

I never recommend sending password over PM or UnEncrypted methods.
But sometime it has to be done.

Set a temp password, and send me a PM.

Then afterwards you can reset the password.