• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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