Commons Email
  1. Commons Email
  2. EMAIL-106

STARTTLS is only enabled if an authenticator is used

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Labels:
      None

      Description

      The STARTTLS parameter is only set if an authenticator is used, whereas the two features are independent: it would also make sense to use STARTTLS without authentication, so as to protect eavesdropping of the e-mail content, for example.

      Here is a patch for src/java/org/apache/commons/mail/Email.java (rev. 1088801):

      @@ -481,9 +481,9 @@ public abstract class Email implements EmailConstants
                   properties.setProperty(MAIL_HOST, this.hostName);
                   properties.setProperty(MAIL_DEBUG, String.valueOf(this.debug));
       
      +            properties.setProperty(MAIL_TRANSPORT_TLS, tls ? "true" : "false");
                   if (this.authenticator != null)
                   {
      -                properties.setProperty(MAIL_TRANSPORT_TLS, tls ? "true" : "false");
                       properties.setProperty(MAIL_SMTP_AUTH, "true");
                   }
      

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        51d 1h 31m 1 Siegfried Goeschl 06/Sep/11 21:14
        In Progress In Progress Open Open
        25m 28s 1 Siegfried Goeschl 06/Sep/11 21:39
        Open Open Resolved Resolved
        14s 1 Siegfried Goeschl 06/Sep/11 21:40
        Resolved Resolved Closed Closed
        492d 19h 7m 1 Thomas Neidhart 11/Jan/13 15:47
        Thomas Neidhart made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Siegfried Goeschl made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.3 [ 12315052 ]
        Resolution Fixed [ 1 ]
        Hide
        Siegfried Goeschl added a comment -

        Thanks to Albrecht Görge and the first Vienna Hackergarden

        Show
        Siegfried Goeschl added a comment - Thanks to Albrecht Görge and the first Vienna Hackergarden
        Siegfried Goeschl made changes -
        Status In Progress [ 3 ] Open [ 1 ]
        Siegfried Goeschl made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Siegfried Goeschl made changes -
        Field Original Value New Value
        Assignee Siegfried Goeschl [ sgoeschl ]
        Hide
        Bruno Harbulot added a comment -

        There is a patch related to this issue in EMAIL-105 too.

        Show
        Bruno Harbulot added a comment - There is a patch related to this issue in EMAIL-105 too.
        Bruno Harbulot created issue -

          People

          • Assignee:
            Siegfried Goeschl
            Reporter:
            Bruno Harbulot
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development