Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: DKIM vs domainkeys

2007-11-13 by Jim Hermann

--- In milter-greylist@yahoogroups.com, manu@... wrote:
>
> <manu@...> wrote:
> 
> > I'm looking at DKIM/DomainKeys.
> 
> I'm looking at libdkim and libdomainkeys, but both libs come with zero
> documentation on the API. Anyone has some experience with either 
of
> them?

Look at the HTML files in dkim-milter-2.3.2/libdkim/docs directory.

It contains this Overview, among other API documentation:

To verify a message under DKIM, make the following calls:
    1. lib = dkim_init(...);
          + initialize an instance of the library
          + this must be done once before any of the other calls are made
          + this needs to be called once when the application is started,
            but  its  result  can be reused at the start of processing of
            each message
          + the  remaining  steps  can use the same value of lib, even in
            multiple threads and over multiple messages
    2. dkim = dkim_verify(lib, ...);
          + initialize a handle set up for verifying the message
          + the  canonicalization  and  signing algorithms and public key
            were  selected  by  the agent that signed the message, and so
            don't need to be provided here
    3. stat = dkim_header(dkim, ...);
          + pass a header to libdkim
          + this  should  be  done  once  for  each header that should be
            included   in  computation  of  the  digest  to  be  verified
            (currently all of them)
    4. stat = dkim_eoh(dkim);
          + notify  libdkim  that  the  end of this message's headers has
            been reached
    5. stat = dkim_body(dkim, ...);
          + pass  to  libdkim a chunk of the body that should be included
            in computation of the digest to be verified (currently all of
            it)
    6. stat = dkim_eom(dkim);
          + notify libdkim that the end of this message has been reached
          + see   if   stat   is   DKIM_STAT_OK   (verification   OK)  or
            DKIM_STAT_BADSIG (verification failed)
    7. stat = dkim_free(dkim);
          + free resources related to this message
    8. dkim_close(lib);
          + free resources related to this library instance

DomainKeys has the same documentation linked to
dk-milter-0.6.0/libdk/docs/index.html

Jim

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.