Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-4820

Reportd JavaMailDeliveryService always copies address in sendmail-message "to" attribute or root@localhost

    XMLWordPrintable

    Details

      Description

      Steps to reproduce:
      1. Configure the designated default <sendmail-message> in javamail-configuration.properties to have no "to" attribute. Set a valid mailHost in both javamail-configuration.properties and javamail-configuration.xml (not fully certain how these two sets of settings interact in all cases...).

      2. Configure a valid report in reportd-configuration.xml with one valid e-mail recipient specified, e.g.:

      <report report-name="Early-Morning-Report" report-template="Early-Morning-Report.jrxml" report-engine="jdbc" report-format="pdf">
      <cron-schedule>0 0 0 * * ? *</cron-schedule> <!-- daily, at midnight -->
      <recipient>jdoe@example.com</recipient>
      </report>

      3. Wait until midnight

      Expected result:

      Report gets e-mailed to jdoe@example.com only

      Actual result:

      Report gets e-mailed to both jdoe@example.com and root@localhost. If the configured mailHost rejects the latter address, the report does not get mailed at all.

      Hypothesis:

      The default value for the "to" attribute of the <sendmail-message> in the javamail-configuration schema is "root@localhost", I think that's where the extra address is sneaking in.

        Attachments

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              jeffg Jeff Gehlbach
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: