Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-32680

mail undeliverable bounce message when we are trying to use email archive tool in Sakai 11.2

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.2
    • Fix Version/s: 11.5 [Tentative], 12.0
    • Component/s: Email Archive
    • Labels:
      None
    • Environment:
      tomcat 8.0.33
      jdk1.8.0_60
      mysql 5.5.56
    • 11 status:
      Resolved

      Description

      We are getting mail undeliverable bounce message when we are trying to use email archive tool in Sakai 11.2
       
      The bounce message is reporting that the SubethaSMTP  daemon will not accept emails for our domain.
       
      The root cause of the issue is that mailarchive/mailarchive-subetha/src/java/org/sakaiproject/mailarchive/SakaiMessageHandlerFactory.java looks for string comparison with equals(). However, our serverName has upper and lower case but domain has only lower case

      After I change equals() to equalsIgnoreCase(), it works beautifully.

      public void recipient(String to) throws RejectException {

                      SplitEmailAddress address = SplitEmailAddress.parse(to);

       

                      if (serverConfigurationService.getServerName().equals(address.getDomain())) {

                          // || serverConfigurationService.getServerNameAliases().contains(address.getDomain())) {

                          Recipient recipient = new Recipient();

                          recipient.address = address;

                          recipient.channel = getMailArchiveChannel(address.getLocal());

                          if (recipient.channel != null) {

                              recipients.add(recipient);

                          }

                      } else {

                          // TODO Correct SMTP error?

                          throw new RejectException(551, "Don't accept mail for: " + address.getDomain());

                      }

       

      }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                farreri Miguel Pellicer
                Reporter:
                euksa99 Sanghyun Jeon
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code