Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28444

Invalid cc:, bcc: recipients handling when mail address contains a dot

    Details

    • Similar Issues:

      Description

      I have a strange behaviour with e-mail addresses having dot. Presumably Ext plugin has a typo in inet-address parsing in ListProvider.

      Case 1:
      Project Recipient List: adonai.elohim, cc:master.maker, bcc:lich.king
      In this case Ext plugin only sends E-mail to adonai.elohim$suffix
      CC and BCC are ignored

      Case 2:
      Project Recipient List: adonai.elohim, cc:"master.maker", bcc:lich.king
      In this case Ext plugin sends E-mail to adonai.elohim$suffix
      and CC's to "master.maker"$suffix,
      BCC is ignored
      (btw I see these quotes around names when reading with mail-client)

      Case 3:
      Project Recipient List: adonai.elohim, cc:"master.maker", bcc:"lich.king"
      In this case Ext plugin sends E-mail to adonai.elohim$suffix
      and CC's to "master.maker"$suffix and "lich.king"$suffix,
      no BCC is sent, all recipients are visible

        Attachments

          Activity

          Hide
          adonai Adonai Elohim added a comment -

          Sorry for my previous comment from day before, at first I thought the problem was with triggers really. I'm really sorry for inconveniences caused.

          Show
          adonai Adonai Elohim added a comment - Sorry for my previous comment from day before, at first I thought the problem was with triggers really. I'm really sorry for inconveniences caused.
          Hide
          slide_o_mix Alex Earl added a comment -

          Does this only happen if you leave off the suffix? I tried with a few of my email addresses and they worked just fine. What version of Jenkins and email-ext?

          Show
          slide_o_mix Alex Earl added a comment - Does this only happen if you leave off the suffix? I tried with a few of my email addresses and they worked just fine. What version of Jenkins and email-ext?
          Hide
          adonai Adonai Elohim added a comment - - edited

          No, it happens with explicit suffixing too, I tried that. I didn't try only bcc:"master.maker$suffix" .
          Regarding versions, it's only at Monday that I'll be able to post jenkins version and debug output from plugin

          Plugin version is 2.40.2, I'm pretty confident with it.

          What I should also mention, the mail server is Microsoft Exchange and I am sending mails through the DavMail gate on my machine. But according to debug output I saw the invalid recipient list is composed before even connecting to SMTP.

          Show
          adonai Adonai Elohim added a comment - - edited No, it happens with explicit suffixing too, I tried that. I didn't try only bcc:"master.maker$suffix" . Regarding versions, it's only at Monday that I'll be able to post jenkins version and debug output from plugin Plugin version is 2.40.2, I'm pretty confident with it. What I should also mention, the mail server is Microsoft Exchange and I am sending mails through the DavMail gate on my machine. But according to debug output I saw the invalid recipient list is composed before even connecting to SMTP.
          Hide
          slide_o_mix Alex Earl added a comment -

          Can you enable debug mode in the global config for email-ext and attach the build log? (Make sure to remove anything that is sensitive).

          Show
          slide_o_mix Alex Earl added a comment - Can you enable debug mode in the global config for email-ext and attach the build log? (Make sure to remove anything that is sensitive).
          Hide
          adonai Adonai Elohim added a comment -

          Already did it, I'll attach the build log tomorrow when I'm at work again

          Show
          adonai Adonai Elohim added a comment - Already did it, I'll attach the build log tomorrow when I'm at work again
          Hide
          adonai Adonai Elohim added a comment -

          Attached build log (names masked)

          Show
          adonai Adonai Elohim added a comment - Attached build log (names masked)
          Hide
          slide_o_mix Alex Earl added a comment -

          Everything looks ok in the log. Which users from the list didn't receive the email?

          Show
          slide_o_mix Alex Earl added a comment - Everything looks ok in the log. Which users from the list didn't receive the email?
          Hide
          adonai Adonai Elohim added a comment -

          At least BCC became CC

          I'll attach another log without quotes shortly.

          Show
          adonai Adonai Elohim added a comment - At least BCC became CC I'll attach another log without quotes shortly.
          Hide
          slide_o_mix Alex Earl added a comment -

          Does your mail server support bcc? I sent to addresses with dots in cc and bcc to gmail with no problems. I even put quotes around some addresses like you have.

          Show
          slide_o_mix Alex Earl added a comment - Does your mail server support bcc? I sent to addresses with dots in cc and bcc to gmail with no problems. I even put quotes around some addresses like you have.
          Hide
          adonai Adonai Elohim added a comment -

          Just sent mail to myself and BCC'd to colleague through Outlook
          He got it and does not see himself as a recipient

          Anyways, I see Ext plugin adds it as explicit RCPT, this should not happen if the person is BCC'd, does it?

          Show
          adonai Adonai Elohim added a comment - Just sent mail to myself and BCC'd to colleague through Outlook He got it and does not see himself as a recipient Anyways, I see Ext plugin adds it as explicit RCPT, this should not happen if the person is BCC'd, does it?
          Hide
          slide_o_mix Alex Earl added a comment -

          I meant DavMail, not Outlook. See "How SMTP actually works" on http://stackoverflow.com/questions/2750211/sending-bcc-emails-using-a-smtp-server. Based on that, you would still see the BCC person as a RCPT entry with the mailserver.

          Show
          slide_o_mix Alex Earl added a comment - I meant DavMail, not Outlook. See "How SMTP actually works" on http://stackoverflow.com/questions/2750211/sending-bcc-emails-using-a-smtp-server . Based on that, you would still see the BCC person as a RCPT entry with the mailserver.
          Hide
          adonai Adonai Elohim added a comment -

          Ok, I'll go take a look at DavMail source. Don't close this issue, I'll update it with non-quoted version soon

          Show
          adonai Adonai Elohim added a comment - Ok, I'll go take a look at DavMail source. Don't close this issue, I'll update it with non-quoted version soon
          Hide
          slide_o_mix Alex Earl added a comment -

          I won't close until resolved.

          Show
          slide_o_mix Alex Earl added a comment - I won't close until resolved.
          Hide
          slide_o_mix Alex Earl added a comment -

          This actually has nothing to do with dots in the email address. It has to do with a bug I introduced that parsed the cc and bcc stuff incorrectly. I was not seeing it on the code I was using because I had already fixed it. I should have run earlier with the released version of the code. Should have a fix in the next version.

          Show
          slide_o_mix Alex Earl added a comment - This actually has nothing to do with dots in the email address. It has to do with a bug I introduced that parsed the cc and bcc stuff incorrectly. I was not seeing it on the code I was using because I had already fixed it. I should have run earlier with the released version of the code. Should have a fix in the next version.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Alex Earl
          Path:
          src/main/java/hudson/plugins/emailext/EmailRecipientUtils.java
          http://jenkins-ci.org/commit/email-ext-plugin/cea631c421b7964ba710d21c3a4131d7a881f739
          Log:
          Fix JENKINS-28444

          Fix incorrect check for > 0 size on the bcc an cc lists.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: src/main/java/hudson/plugins/emailext/EmailRecipientUtils.java http://jenkins-ci.org/commit/email-ext-plugin/cea631c421b7964ba710d21c3a4131d7a881f739 Log: Fix JENKINS-28444 Fix incorrect check for > 0 size on the bcc an cc lists.
          Hide
          adonai Adonai Elohim added a comment -

          Oh!
          Very sorry for not providing logs.
          Suddenly got very sick.

          Thanks for sorting this out anyways!

          Show
          adonai Adonai Elohim added a comment - Oh! Very sorry for not providing logs. Suddenly got very sick. Thanks for sorting this out anyways!

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              adonai Adonai Elohim
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: