• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Proplems with closing SMTP port 25

Martin73

Basic Pleskian
I have tried to harden my mail settings and did following things:

I have set in /usr/share/postfix/main.cf
smtpd_tls_auth_only = yes

This is the error log from Roundcube:
Code:
[08-Mar-2018 08:14:51 UTC] ERROR: SMTP server does not support authentication ()
[08-Mar-2018 08:14:51 +0000]: <206vkuds> SMTP Error: Authentication failure: SMTP server does not support authentication (Code: ) in /usr/share/psa-roundcube/program/lib/Roundcube/rcube.php on line 1648 (POST /?_task=mail&_unlock=loading1520496890784&_lang=de_DE&_framed=1&_action=send)

Then I removed the setting smtpd_tls_auth_only = yes and changed the file /usr/share/psa-roundcube/config/defaults.inc.php to:
Code:
// SMTP server host (for sending mails).
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
//$config['smtp_server'] = 'localhost';
$config['smtp_server'] = 'tls://localhost';

// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
// deprecated SSL over SMTP (aka SMTPS))
//$config['smtp_port'] = 25;
$config['smtp_port'] = 587;

It was not possible the send an email with Roundcube. What do I have to do? I will only use port 587 or 465. Thank you in advance.
 
Last edited:
I have changed again the setting in /etc/postfix/master.cf (the path in my first posting is wrong).
Code:
smtp_use_tls = yes
smtpd_tls_auth_only = yes

The test with my email client was successful.

After this step I changed the file /usr/share/psa-roundcube/config/defaults.inc.php to:
Code:
// SMTP server host (for sending mails).
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
//$config['smtp_server'] = 'localhost';
$config['smtp_server'] = 'tls://mail.example.com';

// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
// deprecated SSL over SMTP (aka SMTPS))
//$config['smtp_port'] = 25;
$config['smtp_port'] = 587;

This part is important:
Code:
$config['smtp_server'] = 'tls://mail.example.com';

The entry must be for the correct mailserver. Now it's possible to check the certificate. The test with Roundcube was also successful. Everything works.
 
Back
Top