Encrypted password for smtp authentication

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nicola883
    Junior Member
    • Dec 2017
    • 15

    Encrypted password for smtp authentication

    We use a smtp server that requires an encrypted password as authentication method.
    In details, our smtp configuration is:
    connection security: startssl
    Authentication method: encrypted password
    Port: 587

    With this configuration on espocrm outgoing smpt email we get the error "Authentication failed". I guess that the problem is the password that has not been encrypted. How can I set this feature?

    Thank you.

    Nicola.
  • nicola883
    Junior Member
    • Dec 2017
    • 15

    #2
    I have checked the code after that I did some test with the zend framework. I have seen that to configure an authentication with encrypted password it is necessary set the parameter 'connection_class' to crammd5. This parameter is not configurable in espocrm and it is hard coded in application/Espo/Core/Mail/Sender.php and it is set to 'login'. Therefore, I have changed the line 99 and 138:
    from
    PHP Code:
    $opts['connection_class'] = 'login'; 
    
    to
    PHP Code:
    $opts['connection_class'] = 'crammd5'; 
    
    and everything worked.

    However, a configuration of the parameter in interface or, at least, in config.php should be done.
    Last edited by nicola883; 03-13-2018, 08:05 PM.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8440

      #3
      Will be done for default system smtp. Not sure what to do with users smtps. They can use different auth mechanism. I checked multiple web applications and didn't find that one has an ability to specify auth mechanism via UI. Is this used very rarely.

      Thanks.
      Last edited by yuri; 12-18-2017, 10:32 AM.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      Working...