Skip to content
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

Use email.utils to parse the from domain(s) #6

Merged
merged 3 commits into from
Oct 17, 2021
Merged

Use email.utils to parse the from domain(s) #6

merged 3 commits into from
Oct 17, 2021

Conversation

adam-iris
Copy link
Contributor

This probably isn't ready to merge!

I added a unit test, and it seems outside the scope of this fix but the test message returns dkim=fail. I probably did something wrong in how I generated the signature (although the body b= key looks right) but I could be missing something deeper.

@adam-iris
Copy link
Contributor Author

adam-iris commented Apr 3, 2020 via email

@kitterma
Copy link
Collaborator

kitterma commented Apr 3, 2020

Please do add tests. If you look in the authheaders/test directory there is a sample key you can use there. Have a look at the other tests to see how it's used.

@adam-iris
Copy link
Contributor Author

You can see the (failing) unit test in the history, the issue was that I had to create a new message for the test, but I wasn't able to generate a DKIM signature for it that validated. That validation is really outside the scope of the change -- which was mainly about switching to a standard package for parsing incoming email addresses -- so I wound up removing it.

I hadn't thought about it this way before, but I'd say this doesn't really require a separate unit test, because it already gets tested by the existing ones. That is, all the existing unit tests use the new code for parsing email addresses, so they adequately test whether this code is calling the library correctly. So all my test was adding was whether the library itself properly parses some edge cases, which isn't really relevant here.

TL;DR: I think this is ready to go

@niftylettuce
Copy link

Would love to see this added!

@shaunwarman
Copy link

+1

@niftylettuce
Copy link

I tested this and it's broken by the way, see my comments here #5 and #13, even with the latest recommended fixes (ref: https://github.com/forwardemail/authentication-headers).

@niftylettuce
Copy link

@adam-iris I have numerous other fixes in my branch, which you might want to sync up with yours and add to your pull request to make it easy for the ValiMail repo owners to merge.

e.g. #13 (comment)

See the commit history here:

https://github.com/forwardemail/authentication-headers/commits/master

@niftylettuce
Copy link

niftylettuce commented Aug 8, 2020

I have published another fix for yet another issue, forwardemail/authentication-headers@1046cd7 (see #17).

@niftylettuce
Copy link

Another fix has been published, see #18 and forwardemail/authentication-headers@b123501.

@niftylettuce
Copy link

Another fix can be found here: forwardemail/authentication-headers@54d1bc2

@kitterma
Copy link
Collaborator

kitterma commented Oct 8, 2021

OK, so over a year later, I'm back looking at this (sorry). I see the point of what you're trying to do and I agree it makes sense. I'll see about setting up the test case.

@kitterma kitterma merged commit 25862a2 into ValiMail:master Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants