Edgewall Software

Changes between Version 3 and Version 4 of TracDev/Proposals/AdvancedNotification/IEmailAddressResolver


Ignore:
Timestamp:
Oct 14, 2013, 9:02:29 PM (11 years ago)
Author:
Peter Suter
Comment:

Raise some questions about the proposed interface.

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/Proposals/AdvancedNotification/IEmailAddressResolver

    v3 v4  
    1111
    1212Now plugins can add additional ways to find an email address for a Trac session that has no email address specified in the user preferences.
    13 
    14 OPEN Is this even needed? The email distributor could just contain this logic. Maybe for directory services?
    1513
    1614== Usage ==
     
    5654Only `trac.ticket.notification.mail.DefaultDomainEmailResolver` and `trac.ticket.notification.mail.SessionEmailResolver`  are part of core Trac.
    5755
    58 OPEN Are they even needed? The email distributor could just contain this logic.
    59 
    6056Various other resolvers might be part of th:AnnouncerPlugin.
    6157
     
    6763   * DONE Renamed `get_address_for_name()` to `get_address_for_session()`.
    6864   * DONE Other distributors can not use the same interface (according to comment in th:AnnouncerPlugin's `XmppDistributor`) so this is email specific.
    69    * TODO: Make it usable by distributors other than email?
     65
     66 * Related tickets:
     67   * #2766 introduced the `ignore_domains` option after so user names that look like email addresses are recognized correctly.
     68   * #4372 introduced the `admit_domains` option so email addresses with uncommon domains are recognized correctly.
     69
     70== Open Questions
     71
     72=== Integrate in email distributor?
     73
     74Is this even needed? The email distributor could just contain this logic directly.
     75
     76Counter-arguments:
     77* Plugins that for example integrate Trac with an external directory services could automatically retrieve a users email address from there using this interface.
     78* See next question.
     79
     80=== Support extendible email address recognition?
     81
     82Categorizing CC field entries as email addresses or session ids is surprisingly complex. In Trac various configuration options have already been added to help some corner cases (e.g. `admit_domains`, `ignore_domains`, `use_short_addr`). In the future, similar problems should be solvable by writing a simple plugin implementing this interface.
     83
     84Would this work with the current approach? It seems this logic would have to be executed in an earlier stage. When parsing a CC field a [wiki:TracDev/Proposals/AdvancedNotification/INotificationSubscriber subscriber] creates `session` and `authenticated` or `address` values. The IEmailAddressResolver is only invoked later, on `session` and `authenticated`.
     85
     86=== Support distributors other than email?
     87
     88Should this work with distributors other than email? Is email a special case? Because it is inherently complex? Or because there are complex compatibility issues with usage of raw email addresses in ticket fields? Or should other distributors support raw addresses too? How would these be recognized / differentiated? (XMPP addresses look similar to email addresses.)
     89
     90Would a resolver have to know the preferred transport of a session to decide if the preferred email or XMPP address should be yielded? Or would there be separate !OrderedExtensionsOptions (e.g. `email_address_resolvers` and `xmpp_address_resolvers`) in the respective distributors?