On 06 Jul 2016, at 10:31, Thomas Mortagne
<thomas.mortagne(a)xwiki.com> wrote:
IMO ideally we should have <current wiki> -> <main wiki> for each
configuration property, not all or nothing. Exactly like standard
XWikiPreference based configuration properties.
This is what we have, it’s already per-property.
As for the 1 vs 2 I really see no reason to forbid
overwriting part of
the configuration in his own wiki for use cases like
myxwiki.org for
example.
The question is: Do we really want local admins on
myxwiki.org to be able to use their own
SMTP servers? I guess with ours we could configure some anti-spamming techniques to
prevent myxwiki users from spamming people. At least we would have the mail logs in our
SMTP server when some third party decides to blacklist us.
Thanks
-Vincent
But I don't mind too much getting rid of the two
[Backward compatibility] steps.
On Tue, Jul 5, 2016 at 5:56 PM, Vincent Massol <vincent(a)massol.net> wrote:
> Hi devs,
>
> I’m working on
http://jira.xwiki.org/browse/XWIKI-13546 ("Error in the log when
sending a mail through the Mail API”). One way to fix it would to always look for the
Mail.Config page in the main wiki instead of in the current wiki.
>
> Actually the current algorithm is the following when looking up a mail configuration
property:
>
> * <ul>
> * <li>Look in Mail.MailConfig in the current wiki</li>
> * <li>[Backward compatibility] Look in (current space).XWikiPreferences in
the current wiki</li>
> * <li>[Backward compatibility] Look in XWiki.XWikiPreferences in the current
wiki</li>
> * <li>Look in the xwiki properties file</li>
> * </ul>
>
> We also need to implement
http://jira.xwiki.org/browse/XWIKI-12435 (“Use the Main
Wiki Mail Configuration if not overridden at the subwiki level”):
> “
> Right now when sending a mail in a subwiki, the configuration is taken from that
subwiki's Mail.MailConfig document.
> In a non-farm use case, it's a pain to have to configure SMTP settings for each
subwiki.
> It would be better to look into the main wiki's mail configuration when
there's no overridden config at the subwiki's level.
> "
>
> So I can see 2 options.
>
> Option 1: Drop support for looking for configuration in subwikis
> ========
>
> * Rationale: there are few use cases that require overriding the mail config in a
subwiki
> * Potential issue: if we stop looking for *.XWikiPreferences or for <current
wiki>:Mail.Config then we won’t migrate configurations but always use the config from
the main wiki. So backward compat is theoretically broken.
> * But it’s likely that the config in subwikis is the same as the config from the main
wiki anyway. It’s also likely that if a subwikis smtp server is configured, then the main
wiki is also configured. So it could be acceptable with a message in the Release Notes.
>
> Option 2: Continue supporting overriding in subwikis
> ========
>
> * Stop bundling Mail.Config for subwikis and modify the config algorithm to be:
>
> * <ul>
> * <li>Look in Mail.MailConfig in the current wiki</li>
> * <li>[Backward compatibility] Look in (current space).XWikiPreferences in
the current wiki</li>
> * <li>[Backward compatibility] Look in XWiki.XWikiPreferences in the current
wiki</li>
> * <li>Look in Mail.MailConfig in the main wiki</li>
> * <li>Look in the xwiki properties file</li>
> * </ul>
>
>
> I’ve discussed it quickly with Denis who prefers option 1 since he even sees the
ability to configure the smtp server at the wiki level a potential issue (bypassing the
farm admin).
>
> Personally I’m hesitating and I’d hate to remove the local override and then find
some use cases where we need it.
>
> WDYT?
>
> Thanks
> -Vincent