Cant connect SMTP

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.4
Virtualmin version 7.10.0

I have installed virtualmin and ran the postconfiguration wizard (which installed Postfix and other things)
I have created a virtual server which i named host.herbsofafrica.com
The website on the server is working fine.
I have configured cloudflare to work with the server and provide SSL
I have setup DKIM, SPF, DMARC records on both server and cloudflare
I have installed roundcube and I am able to send and receive emails.

PROBLEM

  1. After passing DMARC tests, emails sent to gmail are still ending up in Spam
  2. I am trying to use SMTP Test Tool to test my SMTP connection, cos I want to also use the connection on the website to send transactional emails. This keeps failing.

Any help will be appreciated.

/var/log/mail.log is below

Blockquote
Jun 3 14:44:23 host postfix/smtpd[26944]: warning: unknown[194.169.175.20]: SASL LOGIN authentication failed: authentication failure
Jun 3 14:44:23 host postfix/smtpd[26944]: disconnect from unknown[194.169.175.20] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4

Please I think I need a step by step guide

Looks like you have the wrong password, assuming you are using the correct user. Is that ip addrees inthe previous post yours ?

Thank you @jimr1 for your response.
I doubt the password is wrong, because I am able to logout and login back to roundcube with it.
The IP address showing there, I can’t really say I understand it. Maybe its my server’s public IP. But I am sure the IP version 4 address is 176.58.96.72

So where does the above IP come from ?

I just checked the logs and thought posting its content here might help in assiting me to solve the problem quickly. I honestly don’t know where it came from

So that has no bearing on the problem, you may just have to wait a while until gmail trusts your ip address assuming the ip address your sever is using is clean

earlier you mentioned that the password could be the issue…
the username and password I am using has only email rights, its not a unix user on the system. could that be the issue?

Also, I don’t think I understand your last message, or what I am supposed to do with it.

On checking the log again, i noticed another address just now

warning: unknown[103.214.146.33]: SASL LOGIN authentication failed: authentication failure

host postfix/smtpd[35677]:
Jun 3 15:47:39 host postfix/smtpd[35677]: disconnect from unknown[103.214.146.33]

You need to make sure your server IP is clean, not on any block lists. If your IP address is clean but has never been used as a mail server before gmail may send your email sent from that server until the point the gmail trusts your IP mail server address and then send the sent email to the inbox

ok @jimr1 . So how do I solve problem number 2. SMPT connection

This is gmass, never used it, but i just did a test and it appears to work fine. Have you tried just sending a message from usermin to a gmail account ? Does that work and does it end up in the spam folder of the gmail account you sent to?
Usermin is located on yourdomain:20000

It takes less than a minute for bots to start hitting exposed port 25 addresses. Make sure you are looking at the right portion of the logs. Note time stamps and make sure you know what your IP is.

I logged in on usermin (actually was my first time, i didn’t even know it existed).
I sent an email from there to my gmail account, and it landed in my inbox (NOT SPAM)
Then i logged in same account on roundcube, and sent an email to my gmail account, it went to SPAM

@ID10T . Those things I posted from the logs are the only things I found there.
if they’re not relevant to fixing the SMTP connection, tell me what to do please

Look at the headers of both of the sent emails and see how they differ this may shed some light on what’s happening. There should be some diagnostics there

This is the original of the image sent from usermin

This is the original of the image sent from roundcube

did you find anything @jimr1

Is he using the LOGIN authentication method on the server and not plain text?

Please elaborate… @shoulders
where do I find either of those options

I am away from my computer but if you look on My Virtualmin Notes | QuantumWarp and search for test sasl and you can verify if the username and password is working via SASL.

Not sure where on the page, I am sure under the install instructions for postfix at the bottom where I mention. The config file you need to alter and then restart the Cyrus SASL authentication server.

The config file is
/etc/postfix/sasl/smtpd.conf

This email is using your servers ipv4 connection which I assume has a rDNS/PTR record with your provider.

This email is using your servers ipv6 connection and perhaps doesn’t have a rDNS/PTR record? That will land it in the spam box of google.

About the SASL LOGIN? has nothing to do with email going into a google spam box. If it is not your ip? it could be a bot testing your the waters on your email server and as you can see it failed and nothing to worry about.

In addition: The website you linked to “SMTP Test Tool” shows on their page that they are having ddos problems. Perhaps that was the ip from their servers? IDK…

This email is using your servers ipv6 connection and perhaps doesn’t have a rDNS/PTR record? That will land it in the spam box of google.

  1. What should I do about this? How can I use only ipv4
  2. Could you help me look into why SMTP is not working or how to troubleshoot? I would like to send email from (maybe outlook) to my gmail