Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-3681

RemoteDelivery mailet ignores timeout parameters for SMTPS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • master
    • None
    • Remote Delivery
    • None

    Description

      When configuring the RemoteDelivery mailet for SMTPS via sslEnable, it ignores any timeouts set via timeout and connectionTimeout parameters, and uses the Java Mail defaults of infinite instead. Thus when talking to a slow or faulty server, James will never break the SMTPS connection, slowly exhausting the remote delivery thread pool, stalling and ultimately halting remote delivery completely.

      Analysis: James converts its parameters to Java Mail properties "mail.smtp.x" for the remote session. But according to https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html, Java Mail expects these properties to be "mail.smtps.x" instead when using SMTPS.

      Workaround: Provide timeout (and other) Java Mail properties explicitly in the mailet configuration, e.g.

      <mailet match="All" class="RemoteDelivery">
          <sslEnable>true</sslEnable>
          ...
          <mail.smtps.timeout>180000</mail.smtps.timeout>
          <mail.smtp.connectiontimeout>60000</mail.smtp.connectiontimeout>
      </mailet> 

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kotto Karsten Otto
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m