webmail cannot connect

Discussion in 'Installation/Configuration' started by chief, Feb 6, 2022.

  1. chief

    chief Member HowtoForge Supporter

    Thank you all for advice.. Following on from this, i found out that i hadnt changed the domain name in add website to get a certificate on mx1.tlwebservices.co.uk. I named it the domain name (Doh!!!), the dns records all showed a MX record poiting to mail.tlwebservices.co.uk.
    So, i changed the domain name under site. it updated records, made sure i had a MX record stating the
    Code:
    hostname = tlwebservices.co.uk.
    mailserver hostname = mail.tlwebservices.co.uk
    etc
    Then checked ssl shopper and it is good.
    But still cannot make it automatic as INOCRONTAB is not available.. any luck with converting the guide
    which leads me to ask this,..
    Code:
    setting up synchronisation for Rspmd
    states a hostname, i used mx1.... & mx2.. as hostname for each server as well as when adding last section about creating the sites and we add apache directives again is states a hostname...
    Is it correct to use machine hostname and not dns name? i know it states hostname, but have to make sure and ask (sorry if it sounds silly, i find better to ask and then be aware)
    Now, as i didnt originally follow the https://www.howtoforge.com/securing...server-with-a-valid-lets-encrypt-certificate/ it doesnt state to do same for mx2.. does it need to be done?
    I have also noticed, when adding a email using thunderbird, when it adds using auto find, the domain it finds is wrong..,(one of mine on the webserver and not the first of the alphabet) when i correct it to mail.tlwebservices.co.uk it then likes it..

    thanks in advance
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The hostname of a server is the name that the command:

    hostname -f

    returns. It is defined in the file /etc/hostname and also set in /etc/hosts
     
  3. chief

    chief Member HowtoForge Supporter

    Thanks, wasnt what i was aiming at. but thank you till..
    Now, the webmail server is stating
    Code:
    SMTP error (220): authentication failed
    I tail on webmail.tlwebservices.co.uk /var/log/roundcube/errors.log
    Code:
    [24-Feb-2022 15:30:40 +0000]: <qlvcbf6p> PHP Error: STARTTLS failed (POST /?_task=mail&_unlock=loading1645716640256&_framed=1&_action=send)
    [24-Feb-2022 15:30:40 +0000]: <qlvcbf6p> PHP Error: Invalid response code received from server (POST /?_task=mail&_unlock=loading1645716640256&_framed=1&_action=send)
    [24-Feb-2022 15:30:40 +0000]: <qlvcbf6p> SMTP Error: Authentication failure: STARTTLS failed (Code: ) in /usr/share/roundcube/program/lib/Roundcube/rcube.php on line 1702 (POST /?_task=mail&_unlock=loading1645716640256&_framed=1&_action=send)
    tailing on mx1.tlwebservices.co.uk /var/log/mail.log
    Code:
    Feb 24 15:32:53 mx1 postfix/submission/smtpd[5848]: connect from webmail.tlwebservices.co.uk[212.159.153.8]
    Feb 24 15:32:53 mx1 postfix/submission/smtpd[5848]: lost connection after STARTTLS from webmail.tlwebservices.co.uk[212.159.153.8]
    Feb 24 15:32:53 mx1 postfix/submission/smtpd[5848]: disconnect from webmail.tlwebservices.co.uk[212.159.153.8] ehlo=1 starttls=1 commands=2
    
    to clarify changes from first thread..
    i changed the ispconfig - sites - website ... name from mx1.tlwebservices.co.uk to mail.tlwebservices.co.uk keeping server as mx1.tlwebservices.co.uk as ssl cert had issues. now it works.
    so mail server 1 = hostname = mx1.tlwebservices.co.uk and changed the website name from mx1.tlwebservies.co.uk to mail.tlwebservices.co.uk.
    The rest of the setup - dovecot replication, Rspamd all use mx1.tlwebservices.co.uk.
    I have also created a new site on mx1.tlwebservices.co.uk called mx1.tlwebservices.co.uk, the same as mail.tlwebservices.co.uk.. with Apache directives for Rspamd stats.

    ***************
    Fixed it.
    as my cert pointed to mail.tlwebservices.co.uk and is correct. i updated the smtp server to mail.tlwebservices.co.uk from mx1.tlwebservices.co.uk and now its fine.. why it waited like 3 weeks i dont know..
     
    Last edited: Feb 24, 2022
    Th0m likes this.

Share This Page