-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #50 remove unnecessary rewrite_from_domains
config
#54
Conversation
rewrite_from_domains
config
896494e
to
97e4ef5
Compare
97e4ef5
to
f3d7c72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. One question. Merge as you see fit. @moellep will need to generate a release. Maybe wait after Schwab is out of beta.
Mail/Outgoing.pm
Outdated
@@ -407,11 +407,6 @@ sub _rewrite_from { | |||
return 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something about the above code bothers me. I think it's only necessary for test, but it seems like if the allow_resend_re fails to match, it should fall through to the rewrite lookup. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, if $cfg->{allow_resend_from_re} && $old_email !~ $cfg->{allow_resend_from_re}
, then the rewrite will occur, but the dmarc check (_rewrite_from_lookup
) wouldn't have occurred. Is the lack of the dmarc check in that case what's bothering you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there should always be a dmarc check unless allow_resend_from_re matches. At least that's how I read the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You understand the intent of this code better than I, but that would seem to make sense. In that case, 405-407 could be changed to:
if ($cfg->{allow_resend_from_re} && $old_email =~ $cfg->{allow_resend_from_re}) {
return 1;
(it won't let me do a multi-line code suggestion here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't use code suggestions. :) I don't think that's quite right. I think the else
has to get removed so that it falls through if the pattern doesn't match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the change in my previous comment, the _rewrite_from_lookup
dmarc check would get evaluated if the allow_resend_from_re
didn't match. I'm not sure what you're saying should change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6e5b2c6 is what i mean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, that's what I would have figured you meant. I wasn't sure because, with the change to the if
clause and return from that block, the code is functionally equivalent whether the else
is removed or not. The intent is probably more clear with the else
removed, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah i see what you mean now... sorry.
No description provided.