Item13936: Need an altenate from address for wiki generated email.

Priority: Enhancement
Current State: Closed
Released In: 2.1.3
Target Release: patch
Applies To: Engine
Component: FoswikiNet, Configure
Branches: Item13936 Release02x01 master
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
Some email systems reject email messages sent to 'self". So sending the Registration message, the BCC of the confirmation message to the webmaster address

It's possible to tailor the templates, but given we already have a "RegistrationAgent" user, we could add an emailaddress for that user, and use it as the Sender / From address for registration messages. This would resolve the implicit destination errors that our foswiki-infra email list uses to reject registration messages.

  • Add an email address for the RegistrationAgent
    • $Foswki::cfg{Register}{RegistrationAgentEmail} = '$Foswiki::cfg{WebMasterEmail}';
  • Defaults to the WEBMASTER email address
  • Modify the templates to use he new address for the From: address.
  • Note that this email should be able to receive bounce messages.

-- GeorgeClark - 28 Jan 2016

Noticed that the foswiki-infra list was rejecting all the registration email with: Reason: Message has implicit destination" There are two causes:
  1. The registration confirmation message to the user is "BCC"d to the webmaster.
  2. The registration notification message is sent from webmaster, to webmaster, which is mapped to the mailing list address but was not listed as an accepted alias.

So both of these can be fixed in the infra list configuration. However I think, in addition to the above change from Webmaster, we could make a couple of other minor improvements.

  • If {Register}{Approvers} is configured, then those uses should receive a Cc of the registration even if "approval" is not enabled. This allows notification of registration to be moved off of the webmaster address.
  • Remove the BCC notifications from the registerconfirm template.

-- GeorgeClark - 28 Jan 2016

This is a bigger issue, in that some servers also reject messages to/from the same address. Rather than overloading the RegistrationAgent, I suggest creating an optional WikiAgentEmail that will default to the WebMasterEmail if not configured.

If WikiAgentEmail is configured it should be used as the From address in all email from Foswiki. And digging a bit further, most of the FROM: addresses are generated in templates from a macro, so we'd also need to add corresponding macros:

    $macros{WIKIWEBMASTER}     = sub { $Foswiki::cfg{WebMasterEmail} };
    $macros{WIKIWEBMASTERNAME} = sub { $Foswiki::cfg{WebMasterName} };
    $macros{WIKIAGENTEMAIL}     = sub { $Foswiki::cfg{WikiAgentEmail} || $Foswiki::cfg{WebMasterEmail} };
    $macros{WIKIAGENTNAME} = sub { $Foswiki::cfg{WikiAgentName}  || $Foswiki::cfg{WebMasterName} };
-- GeorgeClark - 12 Nov 2016

Committed a fix to an Item branch. Seems to work okay. Note that we probably should add a "reply-to" header in the emails, so that the agents messages go to a person.

-- GeorgeClark - 12 Nov 2016

Merged to 2.1 branch. Leaving reply-to alone for now. If desired sites can add it to the template.

-- GeorgeClark - 15 Nov 2016
Topic revision: r10 - 18 Feb 2017, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy