http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5662





------- Additional Comments From [EMAIL PROTECTED]  2007-10-05 14:28 -------
In view of the coming next version of Mail::DKIM (expected to provide
official API access to a list of all signatures of a message, such list
is already kept internally), I invested a day and modified DKIM plugin to 
finally support whitelisting on all valid signatures found in a message
(e.g. DKIM and DomainKeys signed, or original and mailing-list signatures)
No changes to user interface or to functionality in single-signature
or for no-signature mail, 20 lines lengthier code, of which 10 lines
are an added POD section. 

First code drafts were rather ugly, lengthy and inefficient, until I
decided to turn loops traversing whitelists inside-out, the outer loop
now walks across a list of signatures found, and the inner loop walks
across entries from all four relevant whitelists. This is to avoid
repeating the same code sections for every wl entry, avoids calling
a subroutine for each wl entry, and to avoid duplicating code - with
a goal of keeping debug logging similar to its behavior so far,
hopefully even more informative at first glance.

I also added a tag DKIMIDENTITY, which provides access to a signing
identity of a valid signature. It is a cheap addition, and I'll be
needing it some place else - but this is another story.

One problem I have with this tag is that in principle it should be
a LIST of signatures, not necessarily a single entry, and that in
principle any character (except few like CR and NUL) could show up in
an identity, so a space-separated or a comma-separated single string is
not a clean solution. Perhaps tags could be allowed to contain lists
in 3.3.0, some other tags might benefit too (e.g. LANGUAGES, etc).
When accessed as usual scalars list entries could be 'joined' with
spaces or whatever separator.

Hint: instead of looking at diff of both last revisions, it would
probably be gentler to eyes to look at the final code, or just at
a debugging output with a debug area 'dkim'. Take it or leave it
( or shoot :) .

$ svn -m 'Support multiple signatures in DKIM plugin, add tag DKIMIDENTITY' ci
Sending lib/Mail/SpamAssassin/Plugin/DKIM.pm
Committed revision 582397.

There may be a need for some small adjustment when Mail::DKIM 0.29
finally comes out in few days. I'll keep code compatible with 0.28
(and earlier).



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to