Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-3697

Set Mail From Header depending on the sender and recipient mail domains

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.5.7
    • Fix Version/s: 12.5.9
    • Component/s: None
    • Labels:
      None

      Description

      Currently OLAT does always set the From header of outgoing mails to the configured "fromMail" property, puts the sending olat users mail address in the reply-to header and does also set the smtpFrom to this reply-to address.

      Bounce messages are being sent to the smtpFrom, but unfortunately MS Exchange always sends out of office to the address in the From header (ignoring reply-to and return-path).

      The attached patch introduces a new property "fromDomain" which does introduce a new logic for setting the "From" mail header for outgoing mails:

      A Mail Address is considered external when it ends with the configured "fromDomain" property. If the "fromDomain" property is not set, all mail addresses are considered external.

      When the sending olat users mail address is an external one AND at least ONE of the recipients mail address in an external address the From header will be set as before to prevent SPAM detection or rejects because of SPF violation.

      Otherwise (either the sending olat users mail address is not external or all the recipients addresses are not external) the "From" mail header will be set to the sending olat users mail address.

      This patch also undoes the previous patch (setting the smtpFrom to the replyTo header) as it is not needed anymore and setting the smtpFrom to an external Maildomain can lead to problems when sending a mail to a recipient with an address of that Maildomain. (e.g. the External SMTP Server requiring password authentication).

       

        Attachments

          Activity

            People

            • Assignee:
              srosse Stéphane Rossé
              Reporter:
              d.haag Daniel Haag
              Tester:
              Mandy Menzel
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 50 minutes
                50m