-
-
Notifications
You must be signed in to change notification settings - Fork 47
fix: Remove Authentication-Results header and correct header iteration #799
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
base: main
Are you sure you want to change the base?
Conversation
Header indices start from 0
| end | ||
|
|
||
| -- Delete first and presumably only occurence | ||
| odkim.del_header(ctx, "Authentication-Results", 0) |
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.
there can be multiple Authentication-Results headers IIRC see https://datatracker.ietf.org/doc/html/rfc7601#appendix-B.5
It's best to remove all.
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.
There is no mechanism to count these, as opposed to the DKIM headers; so the last commit just tries to delete up to 10 headers.
There can be more than one header
hpk42
left a comment
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, looks good but a test is missing and would be useful also after we phase in the dkim-milter approach. Test would need to:
-
use "maildomain2" to create an address and then send a message to mail_domain. See test_securejoin in test_2_deltachat.py
-
use eg "imap_tools" (grep for it) to retrieve the headers and checking if authentication-results or dkim signature headers are present in the mailbox (on maildomain).
could you try to add such a test?
Header indices start with 0; fix loop for purging DKIM headers, and also remove Authentication-Results header