QOS.ch JIRA

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • logback-core
  • LBCORE-225

Do not require authentication to use TLS in SMTPAppender

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 0.9.30
  • Fix Version/s: 1.0.0
  • Component/s: None
  • Labels:
    None

Description

Enabling TLS should not require authentication. Pull request submitted to remove this requirement.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • History
  • Activity
Hide
Permalink
Ceki Gulcu added a comment - 11/Oct/11 10:15 PM
For future reference, the relevant patch can be found at [1]. It consists of removing the line which set the property "mail.smtp.auth" to true within the if(isisSTARTTLS()) branch in SMTpAppednerBase class.

      if (isSTARTTLS()) {
- props.setProperty("mail.smtp.auth", "true");
         props.put("mail.smtp.starttls.enable", "true");
      }

Tests on pixie (postfix) show that for authentication disabled server, setting the aforementioned property results in

 |-ERROR in ch.qos.logback.classic.net.SMTPAppender[EMAIL] - Error occurred while sending e-mail notification. javax.mail.AuthenticationFailedException
at javax.mail.AuthenticationFailedException
at at javax.mail.Service.connect(Service.java:306)
at at javax.mail.Service.connect(Service.java:156)
at at javax.mail.Service.connect(Service.java:105)
at at javax.mail.Transport.send0(Transport.java:168)
at at javax.mail.Transport.send(Transport.java:98)
at at ch.qos.logback.core.net.SMTPAppenderBase.sendBuffer(SMTPAppenderBase.java:343)
at at ch.qos.logback.core.net.SMTPAppenderBase.append(SMTPAppenderBase.java:180)

This confirms the problem reported in this bug.

[1] https://github.com/markwoon/logback/commit/12a64f95ac0f1ba21

Show
Ceki Gulcu added a comment - 11/Oct/11 10:15 PM For future reference, the relevant patch can be found at [1]. It consists of removing the line which set the property "mail.smtp.auth" to true within the if(isisSTARTTLS()) branch in SMTpAppednerBase class.       if (isSTARTTLS()) { - props.setProperty("mail.smtp.auth", "true");          props.put("mail.smtp.starttls.enable", "true");       } Tests on pixie (postfix) show that for authentication disabled server, setting the aforementioned property results in  |-ERROR in ch.qos.logback.classic.net.SMTPAppender[EMAIL] - Error occurred while sending e-mail notification. javax.mail.AuthenticationFailedException at javax.mail.AuthenticationFailedException at at javax.mail.Service.connect(Service.java:306) at at javax.mail.Service.connect(Service.java:156) at at javax.mail.Service.connect(Service.java:105) at at javax.mail.Transport.send0(Transport.java:168) at at javax.mail.Transport.send(Transport.java:98) at at ch.qos.logback.core.net.SMTPAppenderBase.sendBuffer(SMTPAppenderBase.java:343) at at ch.qos.logback.core.net.SMTPAppenderBase.append(SMTPAppenderBase.java:180) This confirms the problem reported in this bug. [1] https://github.com/markwoon/logback/commit/12a64f95ac0f1ba21
Hide
Permalink
Ceki Gulcu added a comment - 11/Oct/11 10:54 PM
Fixed in https://github.com/ceki/logback/commit/dd63419d3e2
Show
Ceki Gulcu added a comment - 11/Oct/11 10:54 PM Fixed in https://github.com/ceki/logback/commit/dd63419d3e2

People

  • Assignee:
    Ceki Gulcu
    Reporter:
    Mark Woon
Vote (0)
Watch (0)

Dates

  • Created:
    23/Sep/11 11:07 PM
    Updated:
    11/Oct/11 10:54 PM
    Resolved:
    11/Oct/11 10:54 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for logback. Try JIRA - bug tracking software for your team.