Authentification SMTP failed

Discussion in 'Installation/Configuration' started by Oitsuki, Jul 27, 2024.

  1. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    ensure your /etc/postfix/main.cf contains the following
    Code:
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtp_sasl_password_maps = proxy:mysql:/etc/postfix/mysql-virtual_sender-relayauth.cf, texthash:/etc/postfix/sasl_passwd
    smtp_sasl_auth_enable = yes
    smtp_sasl_security_options = noanonymous, noplaintext
    smtp_sasl_tls_security_options = noanonymous
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/auth
    ensure the credentials in /etc/dovecot/dovecot-sql.conf are working
    it contains a line like this
    Code:
    connect = host=localhost dbname=dbispconfig user=ispconfig password=herbert port=3306
    so I test with
    Code:
    mysql -p -uispconfig dbispconfig
    
    command, it will ask for the password and grant me access if everything's correct.

    restart services
    Code:
    systemctl restart dovecot
    systemctl restart postfix
    
     
  2. Oitsuki

    Oitsuki Member

    I added that
    // IMAP host chosen to perform the log-in.
    // See defaults.inc.php for the option description.
    $config['imap_host'] = ["localhost:143"];

    the difference is here :
    $config['smtp_host'] = 'localhost:25'; I have smtp_port on my side

    // IMAP host chosen to perform the log-in.
    // See defaults.inc.php for the option description.
    $config['imap_host'] = ["localhost:143"];

    the difference is here :
    $config['smtp_host'] = 'localhost:25'; I have smtp_port on my side


    mysql -p -uispconfig dbispconfig ===> ok works
    systemctl restart dovecot
    systemctl restart postfix

    Roundcude do not want to work.

    my /etc/postfix/main.cf ==> Yes I have everything.
     
  3. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    Attached Files:

  4. Oitsuki

    Oitsuki Member

    Roundcube Webmail 1.6.6
    here the difference for postfix
    #smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    smtpd_banner = vps.clicshopping.eu ESMTP $mail_name (Ubuntu)
    ....

    message_size_limit = 0 ==> end of file
     
  5. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    maybe its just a borked session storage in roundcube?
    you checked the main.cf not the master.cf
     
  6. Oitsuki

    Oitsuki Member

    It was main.cf, (sorry)
     
  7. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    It might also be way more simple.

    I remember roundcube had an issue with old sessions or something when the des key changed or whatever.

    I wonder what happens, if you create a new testing mailbox in ispconfig, and try sending form that one - basically creating a fresh roundcube profile.
     
  8. Oitsuki

    Oitsuki Member

    I just do that, but the problem is the same.
     
  9. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    Have you checked your mail log if roundcube uses port 587 still?
    Are you using apache or nginx and what does the url look like you are accessing roundcube?
     
  10. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    Like you said, using the account from google did work, right? So external access is authenticated, just roundcube does not seem to play well?
     
  11. Oitsuki

    Oitsuki Member

    yes 587
    Apache
    I can create for you a test email ?
     
    Last edited: Jul 30, 2024
  12. Oitsuki

    Oitsuki Member

    Yes it's exact, with google or thunderbird no problem, It's just roundcube
     
  13. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    so either you did not change the config accordingly to the posted one or
    roundcube dir not pick up the config file, what is more likely?

    please delete that, your mail server works perfectly fine on port 25 and port 587 using tls
     
  14. Oitsuki

    Oitsuki Member

    Thank you for the test
    ......roundcube dir not pick up the config file, what is more likely? no idea
     
  15. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    I was really asking:
    is the configuration file of your roundcube looking exactly like the one shown before / linked by me?
    I assume you make backups.

    If you indeed have no port 587 in your roundcube config, it is fetching it from somewhere else, might get overwritten or it
    is in another way borked roundcube setup.

    if you insist in using port 587, it comes with some extra steps to check,

    like using
    $config['smtp_auth_type'] = 'LOGIN';
    or how well you want to check the servers tls certificate and so on.

    so for simple testing use the original config like linked and quoted.


    As I could verify your roundcube is indeed running on ispconfig port 8081 I assume the rest is fine, too.
    /var/lib/roundcube
    would be the directory for roundcube then and should look like this

    Code:
    root@ispai:/etc/apache2# ls -Alah /var/lib/roundcube/
    total 24K
    drwxr-xr-x  6 root     root     4.0K Jul 30 16:33 .
    drwxr-xr-x 64 root     root     4.0K Jul 30 16:33 ..
    lrwxrwxrwx  1 root     root       14 Mar 14 18:28 config -> /etc/roundcube
    lrwxrwxrwx  1 root     root       23 Mar 14 18:28 .htaccess -> /etc/roundcube/htaccess
    lrwxrwxrwx  1 root     root       30 Mar 14 18:28 index.php -> /usr/share/roundcube/index.php
    lrwxrwxrwx  1 root     root       19 Mar 14 18:28 logs -> ../../log/roundcube
    drwxr-xr-x  2 root     root     4.0K Jul 30 16:33 plugins
    lrwxrwxrwx  1 root     root       28 Mar 14 18:28 program -> /usr/share/roundcube/program
    drwxr-xr-x  3 root     root     4.0K Jul 30 16:33 public_html
    drwxr-xr-x  2 root     root     4.0K Jul 30 16:33 skins
    lrwxrwxrwx  1 root     root       24 Mar 14 18:28 SQL -> /usr/share/roundcube/SQL
    drwxr-x---  2 www-data www-data 4.0K Mar 14 18:28 temp
    
    take not to the config folder pointing to /etc/roundcube
    if it does not look like that, that'd be bad.

    When was the last time you rebooted your server?
    My intention is to restart php / redis solely but this answer is so long already :D
     
  16. Oitsuki

    Oitsuki Member

    Yes,
    I updated the config
    $config['default_host'] = 'localhost';
    $config['smtp_auth_type'] = 'LOGIN';// %z - IMAP domain (IMAP hostname without the first part)
    $config['imap_host'] = ["localhost:143"];
    $config['smtp_server'] = 'localhost:25';

    When was the last time you rebooted your server? Yesterday


    Code:
    ls -Alah /var/lib/roundcube/
    total 24K
    drwxr-xr-x  6 root     root     4.0K Jul 25 19:35 .
    drwxr-xr-x 72 root     root     4.0K Jul 25 19:43 ..
    lrwxrwxrwx  1 root     root       23 Mar 14 18:28 .htaccess -> /etc/roundcube/htaccess
    lrwxrwxrwx  1 root     root       24 Oct 23  2021 SQL -> /usr/share/roundcube/SQL
    lrwxrwxrwx  1 root     root       14 Oct 23  2021 config -> /etc/roundcube
    lrwxrwxrwx  1 root     root       30 Mar 14 18:28 index.php -> /usr/share/roundcube/index.php
    lrwxrwxrwx  1 root     root       19 Oct 23  2021 logs -> ../../log/roundcube
    drwxr-xr-x  2 root     root     4.0K Jul 25 19:35 plugins
    [QUOTE="ztk.me, post: 459081, member: 151237"]using[/QUOTE]
    
    drwxr-xr-x  3 root     root     4.0K Jul 25 19:35 public_html
    drwxr-xr-x  2 root     root     4.0K Jul 25 19:36 skins
    drwxr-x---  2 www-data www-data 4.0K Oct 23  2021 temp
    
     
  17. Oitsuki

    Oitsuki Member

    Ok restart the server and roundcube works !!!!!

    My god !!!!!
    Thank you very much
     
    ahrasis and ztk.me like this.
  18. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    ahahaha we better don't tell anyone :D gz
     
    Oitsuki likes this.
  19. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I remember @Th0m always reminds us to do this, if we read his signature... :D
     
  20. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    <3
     

Share This Page