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

Mail server rejecting emails from hudson

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • mailer-plugin
    • None
    • Platform: All, OS: All

    Description

      When sending emails from hudson, my mail server (postfix, but I'm sure others
      will behave similarly too) rejects the message because the smtp HELO message
      isn't being sent.

      This is because the system property mail.smtp.localhost hasn't been set before
      sending the email. This is described in the javadocs for com.sun.mail.smtp.

      See also: http://forum.java.sun.com/thread.jspa?threadID=482673&messageID=2252508.

      The solution is to add some code in hudson.tasks.Mailer.createSession() like:

      props.put("mail.smtp.localhost", localServerName);

      I guess some code to pull the localServerName out of config would be needed to.

      In theory, a work around might be setting a system property when running hudson,
      but I've not been able to make this work yet.

      Attachments

        Activity

          typerlc typerlc created issue -
          kohsuke Kohsuke Kawaguchi made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          kutzi kutzi made changes -
          Assignee kutzi [ kutzi ]
          kutzi kutzi made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          ircbot Jenkins IRC Bot made changes -
          Component/s mailer [ 17522 ]
          Component/s mail [ 15493 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 131225 ] JNJira + In-Review [ 186437 ]

          People

            kutzi kutzi
            typerlc typerlc
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: