webmail issue

Discussion in 'ISPConfig 3 Priority Support' started by jpcyrenne, Nov 1, 2020.

  1. jpcyrenne

    jpcyrenne Member HowtoForge Supporter

    Good day,

    I've set up a new box (Ubuntu 20.04.1 LTS (Focal Fossa)) ISPConfig 3.2dev20201031
    Seems I always get a dev version until I set up a site and upgrade? Never understood why.
    This mail server will replace an existing server once it's good and tested.

    I'm trying to get emails working and it's not sending through webmail (did work through command line / good server in mail header)?
    I followed the 'Perfect Server'
    - /etc/postfix/master.cf seems OK
    - main.cf has the same myhostname as the hostname.
    - service postfix status = OK Active: active (exited)
    - service dovecot status = OK Active: active (running)
    - service amivis status = OK Active: active (running)

    When I send an email through webmail I get this error in browser : SMTP Error (250): Authentication failed.

    These show up in logs:
    # tail -f /var/log/mail.log
    Nov 1 15:33:32 mailer postfix/submission/smtpd[381259]: connect from localhost[127.0.0.1]
    Nov 1 15:33:32 mailer postfix/submission/smtpd[381259]: disconnect from localhost[127.0.0.1] ehlo=1 quit=1 commands=2

    # uname -a
    Linux mailer.XYZDOMAIN.com 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

    What else could I check?

    Thanks,
    JP
     
  2. jpcyrenne

    jpcyrenne Member HowtoForge Supporter

    I launched an update (ispconfig_update.sh), reboot the VPS and still can't send.
    The ISPConfig did change version :
    Server: mailer.XYZDOMAIN.com (Ubuntu 20.04.1 LTS (Focal Fossa)) ISPConfig 3.2
     
  3. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    In the perfect server guide, the nightly version is downloaded. We still have to change that. You should use
    Code:
    cd /tmp
    wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
    tar xfz ISPConfig-3-stable.tar.gz
    cd ispconfig3_install/install/
    now.

    Can you share your roundcube config?
     
  4. jpcyrenne

    jpcyrenne Member HowtoForge Supporter

    OK than you for the precision on the Dev version.

    For Rouncube, I can log in (FYI).

    /etc/apache2/conf-enabled/roundcube.conf
    # Those aliases do not work properly with several hosts on your apache server
    # Uncomment them to use it or adapt them to your configuration
    Alias /roundcube /var/lib/roundcube
    Alias /webmail /var/lib/roundcube

    <Directory /var/lib/roundcube/>
    AddType application/x-httpd-php .php
    Options +FollowSymLinks
    # This is needed to parse /var/lib/roundcube/.htaccess. See its
    # content before setting AllowOverride to None.
    AllowOverride All
    <IfVersion >= 2.3>
    Require all granted
    </IfVersion>
    <IfVersion < 2.3>
    Order allow,deny
    Allow from all
    </IfVersion>
    </Directory>

    # Protecting basic directories:
    <Directory /var/lib/roundcube/config>
    Options -FollowSymLinks
    AllowOverride None
    </Directory>

    <Directory /var/lib/roundcube/temp>
    Options -FollowSymLinks
    AllowOverride None
    <IfVersion >= 2.3>
    Require all denied
    </IfVersion>
    <IfVersion < 2.3>
    Order allow,deny
    Deny from all
    </IfVersion>
    </Directory>

    <Directory /var/lib/roundcube/logs>
    Options -FollowSymLinks
    AllowOverride None
    <IfVersion >= 2.3>
    Require all denied
    </IfVersion>
    <IfVersion < 2.3>
    Order allow,deny
    Deny from all
    </IfVersion>
    </Directory>

    ----------------------
    /etc/roundcube/config.inc.php
    /*
    +-----------------------------------------------------------------------+
    | Local configuration for the Roundcube Webmail installation. |
    | |
    | This is a sample configuration file only containing the minimum |
    | setup required for a functional installation. Copy more options |
    | from defaults.inc.php to this file to override the defaults. |
    | |
    | This file is part of the Roundcube Webmail client |
    | Copyright (C) The Roundcube Dev Team |
    | |
    | Licensed under the GNU General Public License version 3 or |
    | any later version with exceptions for skins & plugins. |
    | See the README file for a full license statement. |
    +-----------------------------------------------------------------------+
    */

    $config = array();

    // Do not set db_dsnw here, use dpkg-reconfigure roundcube-core to configure database!
    include_once("/etc/roundcube/debian-db-roundcube.php");

    // The IMAP host 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.
    // 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
    $config['default_host'] = 'localhost';

    // SMTP server host (for sending mails).
    // Enter hostname with prefix ssl:// to use Implicit TLS, or use
    // prefix tls:// to use STARTTLS.
    // Supported replacement variables:
    // %h - user's IMAP hostname
    // %n - hostname ($_SERVER['SERVER_NAME'])
    // %t - hostname without the first part
    // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
    // %z - IMAP domain (IMAP hostname without the first part)
    // For example %n = mail.domain.tld, %t = domain.tld
    $config['smtp_server'] = 'localhost';

    // SMTP port. Use 25 for cleartext, 465 for Implicit TLS, or 587 for STARTTLS (default)
    $config['smtp_port'] = 587;


    // SMTP username (if required) if you use %u as the username Roundcube
    // will use the current username for login
    $config['smtp_user'] = '%u';

    // SMTP password (if required) if you use %p as the password Roundcube
    // will use the current user's password for login
    $config['smtp_pass'] = '%p';

    // provide an URL where a user can get support for this Roundcube installation
    // PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
    $config['support_url'] = '';

    // Name your service. This is displayed on the login screen and in the window title
    $config['product_name'] = 'Roundcube Webmail';

    // this key is used to encrypt the users imap password which is stored
    // in the session record (and the client cookie if remember password is enabled).
    // please provide a string of exactly 24 chars.
    // YOUR KEY MUST BE DIFFERENT THAN THE SAMPLE VALUE FOR SECURITY REASONS
    $config['des_key'] = 'BLEEPED';

    // List of active plugins (in plugins/ directory)
    // Debian: install roundcube-plugins first to have any
    $config['plugins'] = array(
    );

    // skin name: folder from skins/
    $config['skin'] = 'elastic';

    // Disable spellchecking
    // Debian: spellshecking needs additional packages to be installed, or calling external APIs
    // see defaults.inc.php for additional informations
    $config['enable_spellcheck'] = false;

    Thanks,
    JP
     
  5. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    If the server mailserver and webmail are on the same server, change
    Code:
    $config['smtp_port'] = 587;
    to
    Code:
    $config['smtp_port'] = 25;
    By the way, please put commands and config between code tags next time (in the editor: insert -> code) so it is readable for us :)
     
  6. jpcyrenne

    jpcyrenne Member HowtoForge Supporter

    Thank you Th0m. This seems to have fixed it. I have never had to change this value with my other installs?
    Code:
    Code test for next time.
    Thanks you once again kind Sir,
    JP
     
  7. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I think it has been changed in recent Roundcube versions, so that might explain it.

    I removed the DES key from your post by the way, as it is insecure to make it public.

    No problem :)
     
  8. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    When using port 587 you might need to include 'tls:' in the smtp_server setting. You might also want to use the actual hostname matching the SMTP certificate name rather than localhost, if you run into a certificate error.
    I don't have any Ubuntu 20 servers, but perhaps the default config changed?
     
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Yes, you could use the external hostname with tls: aswell, but this could count for your ISP traffic quota, unless you change the hosts file. More work :)
     

Share This Page