Author Topic: Failed Test SMTP config  (Read 1964 times)

Offline wp.rauchholz

  • Newbie
  • *
  • Posts: 9
Failed Test SMTP config
« on: February 14, 2023, 01:37:56 PM »
Hello I am trying to install roundcube on my home server (Rocky Linux 8.7, php 8.0)
I am stuck at the SMTP test. IMAP test is a pass. I am saying this because username and password are identical.
But it gives me the error
"SMTP send:  NOT OK(Authentication failure: <fqdn>"
PIPELINING
SIZE 52428800
VRFY
ETRN
STARTTLS
ENHANCEDSTATUSCODES
8BITMIME
DSN (Code: 250))

Interesting enough, there is a webmail client in Nextcloud that works just fine with these same credentials.
The only difference btw the Nextcloud config and roundcube is that in Nextcloud I entered the domain name as server whilst in roundcube there is only a drop down window that lets me chose "localhost".
I can't find anything special in /var/log/maillog.


Thanks for helping!

Wolfgang

Offline Dmitry42

  • Full Member
  • ***
  • Posts: 232
Re: Failed Test SMTP config
« Reply #1 on: February 14, 2023, 08:56:18 PM »
Hi!
Check your RC config.
What you have in $config['imap_host'] = ?

// The IMAP host (and optionally port number) chosen to perform the log-in.
// Leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// Enter hostname with prefix ssl:// to use Implicit TLS, or use
// prefix tls:// to use STARTTLS.
// If port number is omitted it will be set to 993 (for ssl://) or 143 otherwise.
// Supported replacement variables:
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %s - domain name after the '@' from e-mail address provided at login screen
// For example %n = mail.domain.tld, %t = domain.tld
// WARNING: After hostname change update of mail_host column in users table is
//          required to match old user data records with the new host.
$config['imap_host'] = 'localhost:143';

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: Failed Test SMTP config
« Reply #2 on: February 15, 2023, 02:12:08 AM »
The relevant option is smtp_host.

Offline Dmitry42

  • Full Member
  • ***
  • Posts: 232
Re: Failed Test SMTP config
« Reply #3 on: February 15, 2023, 02:30:32 AM »
you right - smtp!

Offline wp.rauchholz

  • Newbie
  • *
  • Posts: 9
Re: Failed Test SMTP config
« Reply #4 on: February 15, 2023, 03:31:52 AM »
Hello.

thank you for picking up the topic.
I tried several things and none of the worked:
1) $config['smtp_host'] = '10.5.2.1:587';
2) $config['smtp_host'] = 'localhost:587';
3) $config['smtp_[host'] = 'wo-lar.com:587';

The one with my domain name is the ine that works on Nextcloud just find

Wolfgang

Offline Dmitry42

  • Full Member
  • ***
  • Posts: 232
Re: Failed Test SMTP config
« Reply #5 on: February 15, 2023, 08:52:38 AM »
Quote
1) $config['smtp_host'] = '10.5.2.1:587';
2) $config['smtp_host'] = 'localhost:587';
Sometimes it can work (depend your smtp server config), but in more cases its incorrect settings.

This partially correct:
If you use 465 or 587 port - you must use SSL:// or TLS:// prefix before hostname, for example like this
$config['smtp_[host'] = 'ssl://wo-lar.com:587';
or
$config['smtp_[host'] = 'ssl://wo-lar.com:465';
or
$config['smtp_[host'] = 'tls://wo-lar.com:587';
or
$config['smtp_[host'] = 'tls://wo-lar.com:465';