Menu

#31 SMTP 587 TLS auth failure

v1.0_(example)
closed
support (1)
5
2024-09-03
2024-02-16
No

We are trying to configure our mailbox in a CRM software Lusha.

The SMTP connection is failing with following error message. (100.21.76.215) is the IP of Lusha system. Martin.Bandi1 is the name of mbox we are configuring.


@4000000065cf4bfc15624bec tcpserver: pid 3745885 from 100.21.76.215
@4000000065cf4bfc156852e4 tcpserver: ok 3745885 mail.softenger.com[11.0.0.92]587 [100.21.76.215]:57128:maxperip=25
@4000000065cf4bfc15685e9c tcpserver: status: 3/40 un-encrypted session, pid=3745885, IP 100.21.76.215
@4000000065cf4bfe0018ecdc qmail-smtpd: pid 3745885 from ::ffff:100.21.76.215 ssl-version=TLSv1.2
@4000000065cf4bfe310f518c qmail-smtpd: pid 3745885 from ::ffff:100.21.76.215 AUTH USER [martin.bandi1@softenger.com] status=[1] AUTH CRAM-MD5 TLS=TLSv1.2 auth failure
@4000000065cf4c0d042fad9c qmail-smtpd: pid 3745885 from ::ffff:100.21.76.215 read error: client dropped connection:


While configuring the mbox in Lusha portal, we are able to define on the server-name and port number. however option to define the 'Encryption Method' as SSL/TLS or STARTLS is not available. (this is typically visible when you configure the outlook settings)

In our mail-server for SMTP 587 configuration, the FORCE_TLS variable is not SET, STARTTLS variable is not SET,

The support person from Lusha says that error message he is able to see is mismatched TLS . He also confirmed that they use TLS 1.2. The mail-server is providing all the certificates correctly. I think he used openssl utility to test this part.

Based on our conversation with support team, I guess they are trying SSL/TLS first and giving up, before trying STARTTLS

Is there something we need to change in our configuration that will possibly offer SSL/TLS first.

Discussion

  • Manvendra Bhangui

    From the log you provided, I believe it is trying CRAM-MD5 authentication. This requires plain text password in the database. Not something I like. To make any CRAM methods work, you need to use vpasswd -C or vmoduser -C option. Also ENABLE_CRAM needs to set for the SMTP port that the CRM server is using.

    $ sudo sh -c "echo 1 > /service/qmail-smtpd.587/variables/ENABLE_CRAM"
    $ sudo svc -r /service/qmail-smtpd.587
    
     
    • Abhijit Chaphekar

      We don't have plain text passwords in the database. This change of CRAM-MD5 is this user specific or applicable for entire mail-server.

      Will ENABLE_CRAM, will work alongside LOGIN, else I will have to create a separate port for this configuration specially for Lusha.

       

      Last edit: Abhijit Chaphekar 2024-02-16
      • Manvendra Bhangui

        It can be user specific. So only those users for whom the passwords are stored in clear text will be able to login using CRAM methods (CRAM-MD5, CRAM-SHA1, CRAM-SHA256, CRAM-SHA512, etc)

         
  • Manvendra Bhangui

    • labels: --> support
    • assigned_to: Manvendra Bhangui
     
  • Abhijit Chaphekar

    Another observation in the LOGS, would it make any difference if the AUTH was LOGIN instead of CRAM-MD5?

     
    • Manvendra Bhangui

      If you can configure the CRM server to use LOGIN or PLAIN, it should be better and will work with existing password encryption. CRAM and SCRAM methods are a different animal. Though CRAM methods eliminate the real passwords being exchanged on the wire, the danger is that if someone steals your MySQL database, the person will have no difficulty in knowing the passwords.

       

      Last edit: Manvendra Bhangui 2024-02-16
  • Abhijit Chaphekar

    Will first push the Lusha team to switch to LOGIN, if that doesn't work, will try this change.

    Noted. Thank you.

     
    • Manvendra Bhangui

      You can put across few things to the Lusha team

      1. CRAM-MD5 has been officially marked as a historic method along with DIGEST-MD5 method. See this
      2. The CRAM methods that are now officially recognized are the SCRAM methods (SCRAM-SHA-1, SCRAM-SHA-256, SCRAM-SHA-512, ...).
      3. The CRAM methods have the danger of your unhashed passwords getting leaked. See this
      4. indimail supports SCRAM SCRAM AUTH methods (SCRAM-SHA-1, SCRAM-SHA-256, SCRAM-SHA-1-PLUS, SCRAM-SHA-256-PLUS) and the option is available in iwebadmin
      5. The LOGIN or PLAIN methods over TLS is a safer option as leakage of unhashed passwords is not as big a risk as when using CRAM methods.
       
  • Manvendra Bhangui

    A thing about the support for CRAM authentication methods in indimail-mta is that you can use the current encrypted password when authenticating. You can get the encrypted password from vuserinfo. However, ENABLE_CRAM needs to be set

    You can read more in the indimail wiki

    https://github.com/indimail/indimail-mta/wiki/0-IndiMail-Wiki#challenge-response-authentication-mechanisms

     
  • Abhijit Chaphekar

    Issue was resolved in a couple of days. Sorry missed closing this ticket.

     
  • Manvendra Bhangui

    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB