(Sorry, I realise that's two things in one patch, but they go together.)

This is a very useful module, but the way in which it uses a single field for the distinct purposes of reroute recipient and address whitelist is very limiting.

I've read the comment in #1162138: rerouting to multiple addresses?, but when a project has multiple developers, QA, clients, etc, there is a genuine need to be more flexible than that.

This patch adds a new REROUTE_EMAIL_TO list, which allows for multiple recipients.

The existing field then becomes purely a whitelist of addresses to which delivery is permitted (except in the absence of a recipient list, in which case the original behaviour is retained).

Lastly, an additional domain whitelist is also added, such that delivery is permitted to any address at that domain. (I notice that #1351012: Implement passthrough domain(s) does something similar to that, but perhaps this approach is more agreeable, given the last comment on that one.)

For the recipient list and address whitelist, I changed the fields to textareas and added support for separation by newline, as I felt that was more readable.

CommentFileSizeAuthor
#77 reroute_email-whitelists-1571500-77--interdiff-vs-66.patch26.42 KBjedihe
#77 reroute_email-whitelists-1571500-77.patch40.8 KBjedihe
#76 reroute_email-whitelists-1571500-76-interdiff-vs-66.patch24.19 KBjedihe
#76 reroute_email-whitelists-1571500-76.patch40.8 KBjedihe
#75 reroute_email-whitelists-1571500-75-interdiff-vs-66.patch24.27 KBjedihe
#75 reroute_email-whitelists-1571500-75.patch40.88 KBjedihe
#72 1571500-72-config-form.png80.17 KBjedihe
#71 reroute_email-whitelists-1571500-71-interdiff.patch24.15 KBjedihe
#71 reroute_email-whitelists-1571500-71.patch40.76 KBjedihe
#69 reroute_email-whitelists-1571500-69-interdiff.patch24.13 KBjedihe
#69 reroute_email-whitelists-1571500-69.patch40.75 KBjedihe
#66 reroute_email-whitelists-1-1571500-66.patch27.58 KBDYdave
#62 reroute_email-whitelists-1571500-62.patch27.55 KBDYdave
#59 reroute_email-whitelists-1571500-59.patch27.58 KBDYdave
#59 interdiff-1571500-44-59.txt24.23 KBDYdave
#55 reroute_email-whitelists-1571500-55.patch19.37 KBDYdave
#55 interdiff-1571500-44-55.txt14.34 KBDYdave
#51 interdiff-1571500-44-51.txt11.5 KBDYdave
#51 reroute_email-whitelists-1571500-51.patch16.21 KBDYdave
#50 reroute_email-whitelists-1571500-50.patch16.21 KBDYdave
#44 reroute_email-whitelists-1571500-44.patch13.57 KBjweowu
#41 interdiff-1571500-34-41.txt2.88 KBjweowu
#41 reroute_email-whitelists-1571500-41.patch12.76 KBjweowu
#35 reroute_email-whitelists-1571500-34.patch12.61 KBjoshf
#33 reroute_email-whitelists-1571500-33.patch12.68 KBbrad.bulger
#26 whitelists-1571500-26.patch11.53 KBshrop
#24 whitelists-1571500-24.patch11.81 KBshrop
#21 whitelists-1571500-21.patch10.38 KBjweowu
#20 whitelists-1571500-20.patch8.77 KBshrop
#14 whitelists-1571500-14.patch7.09 KBshrop
#9 whitelists-1571500-9.patch8.18 KBjweowu
#8 whitelists-1571500-8.patch8.17 KBjweowu
#4 whitelists-1571500-4.patch8.25 KBjweowu
#1 whitelists-1571500.patch7.77 KBjweowu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jweowu’s picture

Status: Active » Needs review
FileSize
7.77 KB

Status: Needs review » Needs work

The last submitted patch, whitelists-1571500.patch, failed testing.

jweowu’s picture

Ah, I never looked at the SimpleTest file :/

jweowu’s picture

FileSize
8.25 KB

This looks like it might be a simple fix to at least get the existing tests to run, but I had no luck using drush to run the tests. The local test run was a far bigger failure, though, so I'll try uploading it for the testbot.

(If this fails, some assistance would be greatly appreciated.)

jweowu’s picture

Status: Needs work » Needs review
jemond’s picture

+1

rfay’s picture

@jemond, if you like it, please test it (and review) and report your results rather than "+1".

jweowu’s picture

FileSize
8.17 KB

Very trivial re-roll to no longer remove the trailing blank line at the end of the file, because that prevented git from being able to cleanly apply both this and #1571502: Add email test form

jweowu’s picture

FileSize
8.18 KB

Fixed a bug in the backwards-compatibility code.

johnennew’s picture

Status: Needs review » Reviewed & tested by the community

I have spent a lot of time with the patch in #9 above.

It works really well, thanks for sharing. Hope this can be included in the reroute email module proper.

Kind regards,

John

Pete B’s picture

Thanks for the patch, this is just what reroute email needs! I'd love to see it committed to the module.

Thanks,
Pete

shrop’s picture

I can also confirm that the patch in #9 works well for re-routing to multiple addresses. I have not tested the whitelist options at this point though. I will try to setup another Drupal install where I can test whitelisting a bit more.

Here are some other thoughts I have on this issue:

+++ b/reroute_email.moduleundefined
@@ -5,15 +5,12 @@
+define('REROUTE_EMAIL_WHITELIST', 'reroute_email_address'); // historical reasons

"historical reasons"?

It looks like settings for variable "reroute_email_address" should be moved to "reroute_email_to". It didn't help me by having my reroute addresses moved to the email whitelist settings. I am thinking that some variable cleanup needs to be done in the .install file for variables that need data migration and variables which should be deleted from the database.

The direction here seems to be a good one. The UI side of things look okay to me so far.

jweowu’s picture

That comment is there as an indication that the naming mis-match between constant name and variable name is intentional. The "historical reasons" being that the reroute_email_address variable originally had a dual-purpose: the entire value was an address white-list, and the first address (only) was used as the redirection recipient.

I've retained this variable as a white-list, and have split out the recipient functionality into a new variable (note that we can't do it the other way around). I was careful about backwards compatibility, though, so in the absence of a value for the new recipient list variable, the patched code will use the reroute_email_address value for both purposes, exactly like the original code. See reroute_email_destination().

I'm confused about your comment that "It didn't help me by having my reroute addresses moved to the email whitelist settings", because if you have not updated the settings then the behaviour of the module should remain unchanged. That is to say, your configured addresses were already white-listed (but only the first address was receiving redirected email). The updated settings form makes the configuration more explicit.

Note also that we can't just rename the variable in an update hook. With this module it is critical that any settings.php files which hard-code $config['reroute_email_address'] will continue to work without reconfiguration or database updates.

shrop’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
7.09 KB

@jweowu

Thanks for the quick response to my questions and comments. Okay, I think all of my confusion was because I didn't understand how whitelisting worked in the current stable release. I also get what you are saying and after more code review and I see how you are reusing the reroute_email_address variable.

I noticed that the patch in #9 will not apply to the 7.x-1.x branch. I have re-rolled your code into a new patch what now cleanly applies to 7.x-1.x. I have also updated the new variables which need to be deleted during the module's uninstall process.

I manually tested that redirection works. I also tested multiple whitelist email addresses and domains. Everything seemed to work well.

Please review and let's get this into the module. :)

Status: Needs review » Needs work

The last submitted patch, whitelists-1571500-14.patch, failed testing.

shrop’s picture

Status: Needs work » Needs review

#14: whitelists-1571500-14.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, whitelists-1571500-14.patch, failed testing.

jweowu’s picture

Cheers shrop, and thanks for fixing up the uninstall.

Just diffing the two patches, it looks like you've missed the reroute_email_settings_validate() changes in the re-roll, and you've also left in the old EMAIL_SPLIT_RE constant (possibly because it's used by that old validation code?)

Everything else is intact.

shrop’s picture

Thanks so much for the quick review. I will fix those up into a new patch!

shrop’s picture

Status: Needs work » Needs review
FileSize
8.77 KB

jweowu,

You were right. I definitely missed removing the constant due to its use in the validate function. Very perceptive :)

See the attached patch which includes these changes from your original work.

Thanks!

jweowu’s picture

FileSize
10.38 KB

That looks good.

However I've just noticed that a recent commit added a new file to support https://drupal.org/project/variable, which basically redeclares all the variables from the admin settings form, so we now need to support that as well.

I've updated reroute_email.variable.inc accordingly.

I've also made a change to the default address generation. Comment #2 in #1964070: Add Variable module integration. had requested that the indicated default value should check the site_mail variable first, and then fall back to ini_get('sendmail_from'), and this was done, but the module itself was never modified to match, which is clearly inconsistent.

As this patch changes how this is configured and used, I've made this additional change here, but I'll cross-post in the other issue for verification that this is correct.

I did ascertain that the variable module does have an example of using variable_get() to obtain a 'default' value for a variable specification, so that aspect is obviously fine.

Those two things aside, this patch is the same as #20.

If someone could review the new variable module support, and the site_mail usage, I think we can safely move this back to RTBC again.

shrop’s picture

Status: Needs review » Reviewed & tested by the community

I completed the following review and testing:

  • Reviewed code using diff between patch #20 and #21. Looks right to me. The site_mail variable is used for the reroute_email_address and reroute_email_to variables as a start. sendmail_form is only used if site_mail is not set.
  • Disabled and uninstalled reroute_email.
  • I then installed the module with patch #21 included.
  • Checked the "Enable rerouting" checkbox on the reroute_email config page.
  • I confirmed that the "Email address whitelist" and "Destination email addresses" fields defaulted to the site_mail variable.
  • I next repeated the uninstall and enabling of the reroute_email module to check the configuration page behavior when the site_mail variable did not exist in the database. I can confirm that ini_get('sendmail_from') is used in that case. Note that ini_get('sendmail_from') is not used as the default if site_mail

So I think this looks right based on the findings by jweowu in comment #21. I don't think I should be changing this issue to RTBC, but I figured I could at least do some review and manual testing to confirm the changes. Thanks!

shrop’s picture

Issue tags: +Guardr

Tagging for Guardr

shrop’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
11.81 KB

Updated patch which merges recent commits to 7.x-1.x (5a9329 through 6bea0e).

Please review. Thanks!

jweowu’s picture

Thanks for doing that, shrop.

This isn't a full review; just a few minor points from comparing #24 with #21...


+define('REROUTE_EMAIL_WHITELIST', 'reroute_email_address'); // historical reasons

vs

+
+// Historical reasons.
+define('REROUTE_EMAIL_WHITELIST', 'reroute_email_address');
+

I guess this change is to do with coding standards discouraging end-of-line comments? The more verbose version wouldn't be my preference, but it's not a big deal; however if we're going to take up a full line, we might as well take advantage and be more descriptive? Something like:

// This constant name does not match the variable name for historical reasons.


+      $to_domain = array_pop(explode('@', $to));

vs

+      $to_domain = explode('@', $to);
+      $to_domain = array_pop($to_domain);

Really? I don't think that needed splitting into two statements.


@@ -56,7 +56,7 @@ class RerouteEmailTestCase extends DrupalWebTestCase {
   /**
    * Helper function to configure Reroute Email Settings.
    *
-   * @param string $reroute_destination
+   * @param string $reroute_email_to
    *   (optional) The email address to which emails should be rerouted.
    *   Defaults to $this->rerouteDestination if set to NULL.
    * @param bool $reroute_email_enable
@@ -71,7 +71,7 @@ class RerouteEmailTestCase extends DrupalWebTestCase {
     }
     // Configure to Reroute Email settings form.
     $post = array(
-      'reroute_email_address' => $reroute_destination,
+      'reroute_email_to' => $reroute_destination,

The documentation change looks like a mistake; the parameter is $reroute_destination

shrop’s picture

FileSize
11.53 KB

Thanks for the quick review jweowu!

  • See updated patch below
  • That comment line change was for coding standards. I took your suggested comment and completely agree. I also went ahead and did a coding standards review of the module. Found a few minor things and fixed them in this updated patch.
  • I broke out the explode and array_pop because I was getting "Only variables should be passed by reference" exceptions when running simpletests.
  • Yep. That comment change was a complete mistake on my part. I restored it to the original in this patch.
hitfactory’s picture

Have tested patch in #26. All good!

shrop’s picture

Thanks @kidrobot! @jweowu, what's the best way to get some visibility on this one to get it committed?

jweowu’s picture

As I understand it, this isn't going to make it into the next release, but it will be looked at subsequently (see https://drupal.org/node/1964070#comment-7729971).

DYdave’s picture

Hi @shrop and @jweowu,

Thank you so much for all your work on this issue, it is surely greatly appreciated.

what's the best way to get some visibility on this one to get it committed?

I can surely understand your concerns of seeing this patch/issue open for so long without getting any feedback from any maintainer. This ticket has always had all my attention and I have actually been following it for a while.

However, since it is one of the largest patches and feature request in the bug tracker, I had assumed I could first go through other issues and come back to this one a little bit later.

In short, after a lot of work on other open issues, we managed getting down to a last one to be fixed before being able to release a new version: #1722572: What happens if it's enabled with no email added?.
I have already got @jweowu's feedback, came up with patch to review in that issue and that's pretty much where we are currently.

As soon as issue #1722572: What happens if it's enabled with no email added? will have been fixed, I assumed it might be a good idea to tag a new release and update project's page with all the latest additions (and there are a few nice ones, like the Test Email form).

Once the new release is out, it would allow us to focus on this issue and get it processed.

Therefore, I would greatly appreciate to have any of your help, feedbacks, comments, ideas, testing, reviews or concerns on the patch and the issue at: #1722572: What happens if it's enabled with no email added?.

I am certainly trying my best, like I told @jweowu before, to get these other issues out of the way as soon as possible, so that we could all focus more on the very interesting features discussed in this ticket.

Any questions, feedback, testing, changes, ideas or recommendations would be highly appreciated.
Thanks to all in advance.

shrop’s picture

@DYdave,

Thanks all the details. Makes sense to me. As I have time, I will take a look at #1722572: What happens if it's enabled with no email added? and at least test out the latest patch by @jweowu.

DYdave’s picture

@shrop,

Your help would be really greatly appreciated, especially since we're going to be hitting 2 weeks inactivity from #1722572-5: What happens if it's enabled with no email added?, very soon (tomorrow, I think)...
I wanted to actually reach out some more, for some feedback and had hoped @jweowu or you could have perhaps got back to me on the patch, so that sounds like very good timing.

Thanks very much in advance for sharing with us your opinion, all your feedback, reviews and testing.
Cheers!

brad.bulger’s picture

reroll against the current 1.x-dev code. the underlying code changed a fair amount, so this may not be the best implementation of the original intent. it is working for me in initial testing.

Status: Needs review » Needs work

The last submitted patch, 33: reroute_email-whitelists-1571500-33.patch, failed testing.

joshf’s picture

Status: Needs work » Needs review
FileSize
12.61 KB

Reroll of #33.

Status: Needs review » Needs work

The last submitted patch, 35: reroute_email-whitelists-1571500-34.patch, failed testing.

brad.bulger’s picture

Status: Needs work » Reviewed & tested by the community

we have been running this patch for a while without problems. i tried running the simpletest suite on the standard 1.2 release and hit all the same failures as i did when i ran it on the patched version. so i don't know what that means, really.

joshf’s picture

Thanks, Brad; I didn't realize that.

We've also been running this patch for quite some time so +1 RTBC for me.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 35: reroute_email-whitelists-1571500-34.patch, failed testing.

jweowu’s picture

Version: 7.x-1.x-dev » 7.x-1.2
FileSize
12.76 KB
2.88 KB

Here's a re-roll against 7.x-1.2 (specifically; does not apply to the current HEAD, so I'm setting the issue version here for the testbot).

I've fixed a minor regression in a description, and I've removed a redundant trim() as the values returned by reroute_email_split_string will never have any surrounding whitespace (nor will there be whitespace-only values), so there is no need to modify its output.

reroute_email_destination() then either uses a value from there, or a value which was validated by valid_email_address() (which also disallows such whitespace).

That leaves people hard-coding bad values in their settings files (or otherwise forcibly setting) as the only way for this to occur, and I don't think we need to take special action against that possibility (but if we did, we should do it in reroute_email_destination() in any case).

jweowu’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 41: reroute_email-whitelists-1571500-41.patch, failed testing.

jweowu’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Status: Needs work » Needs review
FileSize
13.57 KB

Apparently the testbot doesn't care about the issue version selector!

In any case, I've now re-rolled the patch against 7.x-1.x HEAD.

I've added in form field comments in the admin file, similar to the comments added since 7.x-1.2. That was the only conflicting code when merging with HEAD; so these additional comments are the only proper differences between the patch in #41 and this one.

Status: Needs review » Needs work

The last submitted patch, 44: reroute_email-whitelists-1571500-44.patch, failed testing.

jweowu’s picture

It would be good to get some input from others on the test failures. I'm not very familiar with the test code in general, and I'm not sure whether they are indicating issues with the patch or issues with the tests (and if the latter, whether or not the failures pre-date the patch?)

n.b. I note that these are the same failures from #35, and #37 suggests that they were happening with the unpatched 7.x-1.2.

rfay’s picture

So tests on the 7.x-1.x branch are succeeding, https://www.drupal.org/node/161854/qa - That means that there is a problem with tests. You can see the problems by looking at the "view" link above, https://qa.drupal.org/pifr/test/1175608

It looks to me like you have to adjust the test to handle the change you've made to the logic.

DYdave’s picture

Hi guys!

Please give me a few days to get back to you on this issue.
I have applied the patch from #46 without any errors (thanks for the rerolls @jweowu).
Code seems clear with inline comments.
There are a few minor things I might change, but overall the implementation is pretty straight forward.

However, I'm very worried about the simple tests :))) ... damn, I'm gonna have to almost rewrite the entire file :)
This is going to be a problem... takes time... might have to do this in several steps, we'll see.

This is definitely coming at the top of my priorities for this module:

  • It would help closing almost all current issues in the queue (a LOT of them are related either with multiple reroute recipients or larger fields...).
  • So much collaborative efforts have been put into this, for such a long time.
  • Ideally, this should go in before porting to D8 (especially with the growing pressure hammering the issue queue for a D8 Port)
  • Certainly a very substantial new feature.

 
Thanks again very much to everyone for all the great work that has been put into this, the testing/reporting and feedback.
Cheers!

jweowu’s picture

Thanks DYdave. I'm afraid I'll probably leave the simpletest side of things to you, as usual. You're way more familiar with that code than I am. Would it be useful to enumerate the changes which are needed? I'm thinking that maybe someone else could chip in if they can see what needs doing -- but of course I wouldn't count on that happening, so you might find it easier not to bother (although ticking items off a visible to-do list might be satisfying regardless :)

DYdave’s picture

Status: Needs work » Needs review
FileSize
16.21 KB

New attempt to pass tests: submitting new patch.
Let's see if this works....

DYdave’s picture

Hi guys,

Good news! We're finally seeing the end of the tunnel :)

Very smart patch and approach I have to say. Not surprised at all, since it was initially submitted by @jweowu, whose contributions have always been of great quality.

Just one point of discomfort though :)

define('REROUTE_EMAIL_WHITELIST', 'reroute_email_address');

which was discussed very early at #13, and I understand there's nothing we can do about this unless we agree to break ascending compatibility (due to settings.php). In terms of standards it seems a bit "loose" and it might perhaps be a bit confusing to some readers, so I've added extra comments.
But that's nothing we can't live with, especially as we start moving on to D8. I assume this is something we will probably change and strictly align once this gets ported to D8.
 
Alright, straight to the patch:
Please find attached to this comment an updated patch against reroute_email-7.x-1.x at 65e12c2 (along with its interdiff file), which should fix the last remaining issues to successfully pass all tests on QA.
Files attached as:

 
What's changed from #44?
For complete details, I made sure an interdiff would be attached to this comment.
 
Minor changes:
I allowed myself to change the wording of a few inline comments and also add a few more (mostly for myself... it's so easy to forget about the code you've written).
Just a personal preference, I thought we could also change the uninstall process to use a wildcard. This should prevent any more changes in reroute_email_uninstall, in the future, in case any more variables are added/removed/modified.

Major changes:
Actually fixing the tests wasn't that bad. Looking at the details of the tests on QA, only 3 tests failed, which was a great sign of the compatibility of this patch with module's legacy behaviour.
The failing tests were indeed very tricky and I'm glad you left that to me, since I spent quite some time fixing this part of the code a while ago, at #1722572-10: What happens if it's enabled with no email added?.

In detail (mostly for me):
1 - REROUTE_EMAIL_DEFAULT_ADDRESS can't be a constant and has to be dynamically instantiated.
I know this is very unlikely to happen on a real site and it could seem to be only purely theoritical, but as a bottom line, nothing tells us that the system variable site_mail might not be changed during the execution flow.
Defining the constant REROUTE_EMAIL_DEFAULT_ADDRESS as site_mail:

define('REROUTE_EMAIL_DEFAULT_ADDRESS', variable_get('site_mail', ini_get('sendmail_from')));

"freezes" its value whether site_mail is altered in the execution flow or not.
Which is exactly what happens in the SimpleTests, see reroute_email.test, line 472:

variable_del('site_mail');

resulting in 2 different values for: variable_get('site_mail') (which is NULL) and REROUTE_EMAIL_DEFAULT_ADDRESS (not NULL, containing the initial site_mail testing value), returned by reroute_email_destination().

Therefore, I replaced all instances of the constant with a one line function reroute_email_default_address().

2 - Destination needs to be tested against an empty string.
Very tricky one, but according to our discussions at #1722572: What happens if it's enabled with no email added?, the "abort message" behaviour should only occur when the value of the reroute email address (REROUTE_EMAIL_TO, or, reroute_email_destination()) is set to an empty string '', which is slightly more specific than being empty.
Reverting the if statement to what it was: if ($destination === '') fixed the failing tests.

You just got to love SimpleTests!
How could these small/tricky issues have been detected without these test cases?! Additionally, it appears I didn't do too much of a bad job enforcing new behaviours in SimpleTests each time module's code was modified.

Moving forward: what's left?
0 - Your reviews/feedback on this patch.
Also, I wanted to know if it would be worth removing REROUTE_EMAIL_ADDRESS and just replacing all occurances with REROUTE_EMAIL_WHITELIST.
I'm thinking we should.

1 - Crediting and committing the patch:
Obviously many people have been working on this and I'd like to give credits, as much as possible, to those who really tried helping, keeping this feature moving and therefore deserve seeing their name on their work.
I'm thinking of @jweowu (first and foremost, who did most of the work), @shrop, @brad.bulger and @joshf. So I was thinking of perhaps breaking this into 2 commits, one credited to @jweowu, another one credited to @shrop and mentioning @brad.bulger and @joshf in commit messages.
What do you think? Would that seem fair to you guys?

2 - New test cases for the new features:
Alright, so current tests have passed, which is great. But none of these tests actually take into account some of the new and key features added with this patch, in particular: multiple recipients and whitelist/domain whitelist (or only partially tested as part of the legacy tests).
So I'm most likely going to have to follow up on this, probably in another related issue, and create one or more new cases.

3 - Documentation:
I've already updated reroute_email.info to take into account these changes, but we're most likely going to have to rewrite the project page and update the README.txt file accordingly.

Obvisouly, once points 0 and 1 are settled, this is getting committed.

Feel free to let me know at anytime if you would have any further issues, questions, objections, suggestions or concerns on any aspects of this comment or attached patch, I would certainly try answering as soon as possible and providing more information.
Thanks again very much to everyone for your testing/reporting, comments and feedback!
Almost there... Cheers!

jweowu’s picture

That's excellent, thanks DYdave.

Initial notes...

1. Changes to the comments are obviously all good. Whatever is clearest to you is best!

2. I have misgivings about the uninstall function removing variables by wildcard, as that raises the possibility (unlikely as it may be), of removing variables created some other module. Drupal is somewhat notorious for module "foo" being enhanced by module "foo_bar", with the consequent potential for name-space clashes, which one does observe in practice every now and then. Convenient though the wildcard approach is, I would recommend that we explicitly remove only the variables we have created.

3. define('REROUTE_EMAIL_WHITELIST', 'reroute_email_address');. Yeah. It's important that the reroute_email_address variable continues to work; but it occurs to me that we could defer to a new reroute_email_whitelist -- such that we look for the new variable first and foremost, and fall back to the old one only if the new one wasn't set? My personal feeling is that the module's own code is ok as-is, given that we use the constant name everywhere else, and the definition of the constant is well-commented. It's less nice for people to continue to need to use $conf['reroute_email_address'] to set a whitelist in their settings files, though -- it would be good if they could use/convert to $conf['reroute_email_whitelist'], and then we can promote the latter (and document the former as deprecated). We couldn't also write an update hook to automatically set the new variable from the old, as that would prevent the pre-existing settings file overrides from having any effect.

4. Great work on the simpletest catches and changes! I'll need to review that other issue regarding the abort-on-empty-string vs just empty(). What happens now when it's empty in a non-string way?

5. Your suggestions for crediting are certainly fine by me, and it's very good of you to offer to do it that way. Much appreciated.

6. When looking at reroute_email_destination() again, I decided my code was not as clear as it could be. Your new comments help, but if we restructure it to avoid doing any of the fallback processing unless it's needed, I think that makes everything much more obvious?

function reroute_email_destination() {
  $destination = variable_get(REROUTE_EMAIL_TO);
  if (is_null($destination)) {
    // For legacy compatibility reasons, the first address in the whitelist is
    // the default reroute email destination when REROUTE_EMAIL_TO is not set.
    $whitelist = variable_get(REROUTE_EMAIL_WHITELIST, reroute_email_default_address());
    $whitelist = reroute_email_split_string($whitelist);
    $destination = array_shift($whitelist);
  }
  return $destination;
}

7.

Also, I wanted to know if it would be worth removing REROUTE_EMAIL_ADDRESS and just replacing all occurances with REROUTE_EMAIL_WHITELIST. I'm thinking we should.

I was a little confused by this until I grepped the files and checked the patch history again, and noticed that REROUTE_EMAIL_ADDRESS was reinstated in the patches at #24, which I presume must have been on account of those test file instances having been introduced? I would agree with updating those other instances to use the new constant, and then removing the old constant definition again.

8. It's really great to see this patch near to being committed!

jweowu’s picture

hook_uninstall could use the keys of reroute_email_variable_info() to obtain all the variables to remove. That at least reduces the number of places in which an explicit list of the variable names needs to be maintained.

You'd then need to either maintain any old/deprecated variables permanently in that function (I'm not sure whether that would make sense or not), or else continue to delete those explicitly in hook_uninstall.

I notice that REROUTE_EMAIL_ENABLE_DSM is not registered in reroute_email_variable_info().

jweowu’s picture

DYdave: Let me know if you'd like me to re-roll the patch with any/all of the changes I've suggested?

DYdave’s picture

Thanks again so much @jweowu for your very constructive feedback and great guidance.
Sorry for this slow reply.
Overall, I'm very happy to see that we were able to make a significant step in the right direction.

Alright, straight to the patch and your comments:

#52.2. and #53:
Thank you very much for putting down these very interesting arguments.
However, I believe now I have perhaps been overeaching (a bit) on this :).
If possible, I'd like to maybe roll back on this to your version of the patch (#44), which would be the closest to the actual version, mostly because I'd like to keep my focus on some of the more essential aspects of this feature.
I personally liked very much your suggested approach in #53, but I am afraid this might end up in dragging us into a different discussion... Maybe we could create a different issue for that? I personally think it wouldn't really be necessary since keeping the current approach works just fine. Additionally, we should keep in mind that many of these variables management issues will be gone with Drupal 8.

3.

My personal feeling is that the module's own code is ok as-is

Me too :) (as said previously: nothing we can't live with).
Although I like the approach you suggested, I think we might all benefit from keeping things a bit more simple in the end, even if coding is a bit "loose".
Thanks again very much for providing more details and clarifying this issue (especially the reason why we couldn't use an update hook).
I totally agree with your concerns on documentation and we'll have to get that changed as well.

One thought though, we could potentially create a new branch for this patch, given the importance of the change and features: reroute_email-7.x-2.x and mark 7.x-1.x as bug fix only/deprecated.
In this case, we could perhaps break the compatibility with 7.x-1.x variables and let users know this is a branch update which may require manual changes. A new branch would also be consistent with the extensive documentation changes as well as the ones to be made to the project page.
I guess it would be completely acceptable to ask from users to manually update their settings.php if they really wanted to update to the new version.
They would still have the choice not to update and stick to the 7.x-1.x branch.
I'm personally thinking this would be the right way to go... what do you think?

4. Funny you're asking because I was thinking exactly the same while working on this particular test, hahaha.
But I didn't want to dig into this as I was afraid I would start drifting away.
I went back quickly to the test file to check the comments and found in reroute_email.test, line 437:

  /**
   * Test reroute email address is set to site_mail, sendmail_from or empty.
   *
   * When reroute email addresses field is not configured and settings haven't
   * been configured yet, check if the site email address or the sendmail_from
   * system variable are properly used as fallbacks. Additionally, check that
   * emails are aborted and a watchdog entry logged if reroute email address is
   * set to an empty string.
   */

I think the NULL value was used to fallback and the empty string used to trigger the particular abort behaviour.
Ultimately, if there is no fallback, like on the QA server, we might want to still abort the message... again, something to be discussed in a different ticket, #1722572: What happens if it's enabled with no email added? I believe.
 
5. Great! Glad we're settled on this. With your constant presence and after all the work everyone has been putting into this, it seems to be the very least I could do :). If others, mentioned in the credits, have any objections, suggestions of concerns, please let us know.
 
6. Not sure why your PHP syntax/code highlight didn't go through in your comment.... strange...
Agreed! Your updated version is much better! I think it's much clearer and probably a bit more optimized.
 
7. Got it! All occurrences of REROUTE_EMAIL_ADDRESS to be replaced with REROUTE_EMAIL_WHITELIST.
 
8. REROUTE_EMAIL_ENABLE_DSM is not registered in reroute_email_variable_info()

I notice that REROUTE_EMAIL_ENABLE_DSM is not registered in reroute_email_variable_info().

Nice catch... Not sure how we could have missed that in #2473245-8: Add simple option to display message when mail was rerouted.

I have committed the necessary changes at 8efc15f and updated corresponding ticket, see #2473245-12: Add simple option to display message when mail was rerouted.

Summary of the changes: For complete details, see interdiff attached to this comment

  1. Rolled back the install file.
  2. Basic update of the code snippet in the README.txt file.
  3. Replaced function as suggested in point 6.
  4. Removed all instances of REROUTE_EMAIL_ADDRESS

 
Please find attached to this comment an updated patch against reroute_email-7.x-1.x at 8efc15f (along with its interdiff file), which implements the changes detailed in the list above.
Files attached as:

 
Feel free to let me know at anytime if you would have any further issues, questions, objections, suggestions or concerns on any aspects of this comment or attached patch, I would certainly try answering as soon as possible and providing more information.
Thanks again very much to everyone for your testing/reporting, comments and feedback!
Cheers!

jweowu’s picture

I thought I'd see what was needed to enable us to deprecate reroute_email_address and allow people to use reroute_email_whitelist. I think it would look something like the following (along with making the existing code call this function as appropriate, of course).

The benefit is cleaning up that bit of untidy naming (particularly for people hard-coding the values in settings files), and with this approach we can use an update hook to convert any database values for the old variable to use the new name, because we'll always catch the case where the deprecated value is set outside of the database (which in retrospect I think was always going to be necessary, and I just hadn't thought it through sufficiently earlier).

The trade-off is in having this sort of logic in the code-base at all, and it's your call as to whether or not you're happy to do that. I really just wanted to establish whether we could handle the name change without introducing a new 7.x-2.x branch or requiring some users to make manual changes to their settings files.

I would normally spend more time reviewing this code before posting it, but this is just to give you a general idea. If you'd like to go with this approach, I'll spend more time convincing myself that it's correct, and re-roll the patch with all the appropriate changes.

/**
 * Return the whitelist of email addresses to which delivery will be permitted.
 *
 * Here we handle the possible scenarios caused by splitting the original
 * REROUTE_EMAIL_ADDRESS_DEPRECATED variable into the separate
 * REROUTE_EMAIL_TO and REROUTE_EMAIL_WHITELIST variables.
 *
 * If the deprecated variable does NOT exist, this is equivalent to using
 * variable_get(REROUTE_EMAIL_WHITELIST, reroute_email_default_address());
 *
 * @param boolean $split
 *   TRUE to return an array of values rather than the original string.
 *
 * @return string|array
 */
function reroute_email_whitelist($split = FALSE) {
  $whitelist = &drupal_static(__FUNCTION__);
  if (isset($whitelist)) {
    return $split ? reroute_email_split_string($whitelist) : $whitelist;
  }

  global $conf;
  $conf_address_exists = isset($conf[REROUTE_EMAIL_ADDRESS_DEPRECATED]);
  $conf_whitelist_exists = isset($conf[REROUTE_EMAIL_WHITELIST]);

  if (!$conf_address_exists) {
    // The deprecated variable does not exist anywhere, so we can safely
    // ignore it and use the modern REROUTE_EMAIL_WHITELIST variable.
    if ($conf_whitelist_exists) {
      $whitelist = $conf[REROUTE_EMAIL_WHITELIST];
    }
  }
  else {
    // The deprecated variable exists somewhere, so we may need to defer to it.
    // Obtain the (cached) database-only values to compare against.
    $db_conf = variable_initialize(array());
    $db_address_exists = isset($db_conf[REROUTE_EMAIL_ADDRESS_DEPRECATED]);
    $db_whitelist_exists = isset($db_conf[REROUTE_EMAIL_WHITELIST]);
    $address_set_outside_db = $conf_address_exists && !$db_address_exists;
    $whitelist_set_outside_db = $conf_whitelist_exists && !$db_whitelist_exists;

    if ($address_set_outside_db) {
      // The deprecated variable is set outside the database.
      // We must use this value, unless REROUTE_EMAIL_WHITELIST is also set
      // outside the database (which would be a conflict, so we'll also log
      // a warning in that situation).
      if ($whitelist_set_outside_db) {
        // Use the new value, but log the conflict
        $whitelist = $conf[REROUTE_EMAIL_WHITELIST];
        watchdog('reroute_email', "Both the deprecated '@address' variable and the new '@whitelist' variable are set outside of the database (typically in settings.php). All uses of '@address' should be replaced with '@whitelist' and '@to'.", array('@address' => REROUTE_EMAIL_ADDRESS_DEPRECATED, '@whitelist' => REROUTE_EMAIL_WHITELIST, '@to' => REROUTE_EMAIL_TO), WATCHDOG_NOTICE, l(t('Refer to documentation'), 'https://www.drupal.org/node/1571500'));
      }
      else {
        // Defer to the deprecated value, as it has been set outside of the
        // database, and REROUTE_EMAIL_WHITELIST has not.
        $whitelist = $conf[REROUTE_EMAIL_ADDRESS_DEPRECATED];
      }
    }
    else {
      // The deprecated variable is set, but only in the database.
      // We will only use it if REROUTE_EMAIL_WHITELIST is not set.
      if ($conf_whitelist_exists) {
        $whitelist = $conf[REROUTE_EMAIL_WHITELIST];
      }
      else {
        $whitelist = $conf[REROUTE_EMAIL_ADDRESS_DEPRECATED];
      }
    }
  }

  // Set the fallback value if necessary.
  if (!isset($whitelist)) {
    $whitelist = reroute_email_default_address();
  }

  return $split ? reroute_email_split_string($whitelist) : $whitelist;
}
DYdave’s picture

Wow @jweowu!

This really looks great! You're definitely amazing and an incredible Drupal coder! :D

I haven't tested your code yet, but I read it carefully and understood your approach very well (thanks to the great inline comments).
The way you managed getting the deprecated address is so ingenious hahaha.

Perhaps it would need a bit of testing/debugging, like with every fresh code, but ultimately, I think your idea and this code could totally work.

The trade-off is in having this sort of logic in the code-base at all, and it's your call as to whether or not you're happy to do that.

I guess it all comes down to me, hey?! :D

What do you think about creating a 7.x-2.x branch?

Personally, I'm still leaning towards creating a new branch, for many reasons other than code. I just believe it would allow us to have a smoother/softer updating process for such an important change and improvement.

I keep on trying to play out the different scenarios that could be resulting in problematic situations if we were to create another branch and I can't seem to find anything significant enough that it would prevent us from doing so.
It would allow us to keep both versions of the module co-existing (marking the former as obsolete/deprecated/bug fix only, when the latter is ready). We would only need to add an update hook, other than that, module's 7.x-1.x code would essentially stay exactly as it is right now (and we know it works fine with very few outstanding bug reports).

As for my real life personal experience, in terms of the projects using the module in our organization: I wouldn't see any problem at all.

Projects currently using the 7.x-1.x branch could keep doing so, as if no other alternative existed (which has always been the case until the new version) and has always been satisfying (otherwise why would the module have been used in the first place?!).
New projects to start could use the new branch as the recommended release (whatever change would be needed in makefiles or any other automatic project checkout process).
Development teams that would like to update the module (miraculously discovered the new features) would have to go through the project update notes, among which running update.php and manually updating their settings.php would be clearly specified.
If the notes were to be skipped (which would be rather naive for a developer, at least for the first update) and just the update run (at the very least run update.php), the only negative impact I could see would be that the line:

$conf['reroute_email_address'] = "example@example.com";

in project's settings.php would simply become useless (and harmless).
 
However, through the update process, we could still set the config based on the deprecated variable, maintaining the rerouting behavior (nothing to worry about: emails would still be intercepted - whether on shared DB/different settings.php files setups, or more complicated ones, the variables would still get initalized).
Speaking for myself, I would be very surprised if any of my colleagues actually updated the module in one of their projects ... hahaha :D
Once again, we're talking about a development module here, which works very well in its current state and seems to be satisfying for a lot of people and projects.
 
Now, since I took over the maintenance of the module, you and I have been working together at numerous occasions, for a long time, on many issues (it's almost like you have been my only real interlocutor in the project :D and you know the module extremely well).
If I recall properly, in many cases (if not all of them) I chose to listen to your opinion/advice (even reverted a commit haha #2241857: Revert module weight = 99 and implement reroute_email_module_implements_alter()).
So before stepping forward with a new branch, it would still be very important for me to have your green light (your blessing haha).
 
If we were to move forward with a new branch, we would still need to do the following tasks before committing the patch:

  1. Make a few adjustments to the patch from #55, among which reroute_email_destination() and REROUTE_EMAIL_WHITELIST.
  2. Add an update hook for the 7.x-1.x branch.
  3. Add update notes (I've never done that for any module before, but I guess it wouldn't be hard to find a few examples around).

 
Overall, what do you think?
 
Thanks again so much for sharing your great code and going one step further into something that we thought wouldn't actually be possible...
Looking forward to your feedback.
Cheers!

jweowu’s picture

Regarding a new branch, I don't actually have a strong opinion either way, so I'm happy to go along with your preference. As much as I've contributed to the module, you have a much greater load as the maintainer, so whatever will make life easiest for you is best IMO; and I don't disagree with any of the benefits/scenarios you've outlined.

My inclination had been to stay as 1.x on the basis that we're making the upgrade path very clean for existing users, and consequently it didn't seem like the kind of compatibility-breaking change that would necessitate a new branch.

With a clean upgrade path in place, though, I don't believe it makes any difference to the end users whether the upgrade option is 1.3 or 2.0. Some users will be disinclined to investigate major version changes (for any contrib module) without having a good reason to do so in advance; but, as you point out, there's no actual harm in them staying with the version that's already working for them; and if they are after new features at any point, they'll upgrade quickly enough. I also agree that users are more likely to read the release notes for a major version change (even if we're doing our best here to ensure that it doesn't matter if they don't read the notes :)

It certainly doesn't affect me either way, and if the 1.x branch is deprecated then I doubt you'd be making too much extra work for yourself by creating a new branch, so I can't see any particular problems with doing that.

So if this feels like a 2.0 to you, that's fine with me :)

I'll go ahead and make the new changes when I get a chance. It might take me a few days to get to them, as I have a deadline approaching, but hopefully within the next week.

DYdave’s picture

Hi @jweowu,

Thank you very much once again for your great and very helpful feedback.

I'm very happy we are able to move forward with the new branch :D

Then, straight back to the patch:

Please find attached to this comment an updated patch against reroute_email-7.x-1.x at 8efc15f (along with its interdiff file), which implements the necessary changes for the new branch.
Files attached as:

Since, we are now clear about the distinction of the code in two major versions, we don't necessarily need to worry that much about deprecated variables or behavior.
We don't need to fallback on the legacy behavior anymore, relieving the function reroute_email_destination from its initial duties (removed).

Most of the work needed in this updated patch was for the implementation of hook_update_N.
I have already tested this patch and the update multiple times, with 5 different cases (whether reroute_email_address was set in settings.php, db, both, or empty string). So I have already done quite a bit of debugging and clean up, giving me enough confidence to get this patch submitted for your reviews.
(I have to say testing update scripts is very annoying :D hahaha, having to install/uninstall and run the update script all the time, manually...)

One thing I found out though:
In fact there is no real way to tell whether a variable has been set in settings.php or in the database.
If the variable pulled from the db and the one pulled from the settings.php have the same value, how do we actually differentiate them?
This could correspond to the same result as if the variable had been set in the db and not in the settings.php...
It is impossible to tell users precisely in which case potential code snippets should be cleaned up from their settings.php.
Therefore, we display the message in all cases:
Important warning: It is strongly advised that you update module's $conf variables in site's settings.php file. In particular, you may have to remove the line of code with $conf['reroute_email_address'].
The variable reroute_email_address is deprecated and has been removed.

Additionally, I seized the opportunity to revamp almost entirely the README.txt file to be consistent with the new version (note the section about "key contributors").

Personally, I think this patch could be committed.
So I'm very much looking forward to your reviews and comments (especially @jweowu) on the update hook, the README file and any change that have been done since #44 (see interdiff).

Lastly, feel free to let me know at anytime if you would have any further issues, questions, objections, suggestions or concerns on any aspects of this comment or attached patch, I would certainly try answering as soon as possible and providing more information.
Thanks again very much to everyone for your testing/reporting, comments and feedback!
Cheers!

Status: Needs review » Needs work

The last submitted patch, 59: reroute_email-whitelists-1571500-59.patch, failed testing.

The last submitted patch, 59: reroute_email-whitelists-1571500-59.patch, failed testing.

DYdave’s picture

Status: Needs work » Needs review
FileSize
27.55 KB

Blessed be these simple tests!
Caught a couple of poor logical find/replace mistakes... replaced with the wrong constant variables.
New attempt for this updated patch, reroute_email.test was the only file changed from #59.

Status: Needs review » Needs work

The last submitted patch, 62: reroute_email-whitelists-1571500-62.patch, failed testing.

The last submitted patch, 62: reroute_email-whitelists-1571500-62.patch, failed testing.

DYdave’s picture

ah... too bad, won't be able to fix that today unfortunately.

But please start reviewing and testing if you have time.
I'll get the Tests fixed whenever possible.

Thanks!

DYdave’s picture

Status: Needs work » Needs review
FileSize
27.58 KB

Following up on the failing test cases for the patch at #62:

It appears the problem actually came from the call to ini_get('sendmail_from'), resolving on the QA server to '' an empty string, and not NULL.
Therefore, in order to keep the existing logic enforced by #1722572: What happens if it's enabled with no email added?, and its related test case RerouteEmailDefaultAddressTestCase, the value of the field REROUTE_EMAIL_TO has to be tested against an empty string and not $destination (see patch at #62, reroute_email.module, line 193).

<?php
    // Abort sending of the email only if the address is an empty string.
    if (variable_get(REROUTE_EMAIL_TO, NULL) === '') {
?>

Please find attached to this comment an updated patch against reroute_email-7.x-1.x at 8efc15f, which restores the compatibility with the existing logic and tests.
File attached as: reroute_email-whitelists-1-1571500-66.patch
 
Back to Needs review and marking helper issue #2695825: Make patch-1571500 pass existing SimpleTests as fixed.
 
Feel free to let me know at anytime if you would have any further issues, questions, objections, suggestions or concerns on any aspects of this comment or attached patch, I would certainly try answering as soon as possible and providing more information.
Thanks again very much to everyone for your testing/reporting, comments and feedback!
Cheers!

DYdave’s picture

No feedback on this for 2 months, for such a substantial and interesting feature....
I would have expected a little bit more replies.

Would be fantastic if anyone could please give this patch a shot?

Thanks in advance to everyone for your replies, testing/reporting, feedback and participation in this module's issue tracker.
Cheers!

joshf’s picture

#66 works well for me. Thanks @DYdave!

Tested basic rerouting and the domain whitelist.

jedihe’s picture

This patch adds 90% of what I need for a ticket I'm working on right now :). Thx for the great work!

Before implementing the missing 10% (rerouting only specific mail keys), I first needed to tidy up the code a bit. So, I'm attaching a patch + interdiff with my improvements:

  • Refactored business logic to live in a separate function: reroute_email_choose_action($message).
  • Refactored hook_mail_alter() to just call the new function to get the action and perform it (with a switch statement).
  • Changed the domain whitelist input field (config form) to be a textarea; this is more consistent, IMO.
  • Added a new header: X-Rerouted-Action; used to signal which action was chosen for the message. Only case where it's not used is when a message is blocked for delivery (aborted).
  • Print different Drupal messages depending on the action, even address/domain whitelisting bypass action have a separate message.
  • Updated testing suite to accomodate some small changes.
  • Improved wording on description for various fields in config form.
  • Fixed various coding standards.
  • Updated entries in .variable.inc to match what is defined in the form constructor.

Tests are running fine in a local test site (vanilla Drupal 7.50). Let's see what the testbot has to say.

jedihe’s picture

I just did some manual testing of #69 (which should be almost functionally equivalent to #66) and found this:

- Leaving "Destination email addresses" empty causes otherwise-rerouted messages to be aborted; whitelisting still works in this case; this is different from #66, but if this doesn't break existing sites I think the new behavior is better.
- Whitelisting a single e-mail address works fine.
- Whitelisting a single domain or multiple domains works fine. I even tried with mixed delimiters (comma and newline) and it's resillient enough to handle that scenario correctly!.

jedihe’s picture

Minor update: adjusted description text to account for whitelisting being active even if "Destination email addresses" is empty. Interdiff is still against #66.

jedihe’s picture

FileSize
80.17 KB

And this is a screenshot of the config form as it renders with #71:

Config form for reroute email with patch #71 applied

jweowu’s picture

Hi jedihe. I haven't looked carefully at what your new patch is doing, but personally I'm very keen to not expand the scope of this issue at this stage in proceedings.

(Admittedly I've not helped lately by not finding any time to work on this...)

It's DYdave's call, but my suggestion is to open a new issue with a patch which simply depends upon this patch having been applied first?

(But either way, any assistance with getting this issue over the line is appreciated!)

jedihe’s picture

Hi @jweowu!. Patch in #71 is almost functionally equivalent to #66, only change is the one I mentioned on whitelisting still being followed even if "Destination email addresses" is empty; the testing suite from #66 required only very minor tweaks for #71 to pass. Additionally, getting the blocking behavior to override whitelisting is *very* easy to do.

Please have a closer look at the list of improvements I posted in #69, there you'll see I identified some cases where #66 is definitely needing polish and I did just that :).

As for the additional scope I mentioned, my plan is to generate clearly separated patches for the refactor I did and for the new functionality. No work has been done yet on the extra 10% I mentioned, but now that you mention it I think your idea on opening a separate ticket for that is better to not disrupt the patch being worked in here :).

jedihe’s picture

Adding useful comment about RFC spec sections for setting multiple addresses in To: header.

@DYdave: this info came from viktar_pryshchepa (#2627274: Ability to reroute email to several recipients), so I think it may be good to credit that person here too.

jedihe’s picture

Updating patch with very minor update for X-Rerouted-Action header, it now uses the raw action selected for the message.

jedihe’s picture

New patch with minor update to make coder happy when parsing .install file.

I apologize for posting so many patches, I'm just in a rush trying to get this to a working state ASAP.

DYdave’s picture

Hi @jedihe,

Sorry for the slow reply...

Gonna have to catch back up on this issue and your patch.
Please give me a few days to go over the patch and the latest comments.

Thanks again for your contribution.

jedihe’s picture

Hi @DYDave! great to see you back on this issue :). I'll keep an eye on this, to provide adjustments/feedback as needed.

LNakamura’s picture

#77 works for me (applied to 8efc15fe557fd6c88ef0067d6d4a1626ec5e1b88).

  • bohart committed 964ee41 on 7.x-1.x authored by jweowu
    Issue #1571500 by jedihe, jweowu, DYdave, shrop, joshf, brad.bulger,...

  • bohart committed 8cc6a03 on 8.x-1.x authored by jedihe
    Issue #1571500 by jedihe, jweowu, DYdave, shrop, joshf, brad.bulger,...
bohart’s picture

Status: Needs review » Fixed
Issue tags: -Guardr

Hi, @all,

It was a kind of challenge to read and investigate all thread :)


1) Rerouting by a domain and multiple recipients features were done in:
#2924078: Update settings form to have 2 emails fields.
Additional tests were done and update paths via hook_update_N are handled as well.
Committed to both 7.x and 8.х branches.

2) There was a discussion about supporting of variables module.
It's a part of 7.x branch already.

3) Readme file was updated according to the proposed changes.

4) Rerouting by mail key mode will be discussed further in #2790143: Add an ability to filter by mail keys.


All changes were committed to both 7.x and 8.х branches.
One commit authored to @jweowu, another one to @jedihe, all others are credited.

I’m going to mark this one is fixed.
Please reopen otherwise or create separate (smaller) issues.


The age of this issue 5.5 years. Some children born on creation date are going to school already :)

Thanks everyone for yours effort!

I guess we will have almost clear issue queue in 2 weeks,
and we will be able to create new releases for both 7.x and 8.х.

Cheers!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.