DKIM/Domain key signing
Posted: Wed Apr 23, 2008 12:34 pm
I did a little more hunting around and I think I've found what I need to a DKIM plugin(ok, to be perfectly honest, I don't give a dang about DKIM but it is a means to a more important end, Goodmail signing).
Looking at it, in the presend point in time, it seems I need the following functions:
From Class Swift_Message_Headers I can use the "build" method should give me the full formatted list of headers.
From Class Swift_Message_Mime do I use build or getData to get the entire contents of the body?
Than taking those two pieces of information, the proper RFC formatted file can be built and a signature generated. Than to set the signature(assuming DKIM/Goodmail/Domain Key) I simply need to insert it into the raw header information and use the very dangerous setHeaders function(adding a signature to the body of the text is much much much easier).
All in all, it looks like Swiftmail simplifies everything emensely(of course, this means modifying my target application to use swiftmail instead of phpmail, but since the functions it uses are simple that should not be a big deal)
Can anyone see any problems with the above? Other than that I'm playing with fire with that setHeaders function.
Looking at it, in the presend point in time, it seems I need the following functions:
From Class Swift_Message_Headers I can use the "build" method should give me the full formatted list of headers.
From Class Swift_Message_Mime do I use build or getData to get the entire contents of the body?
Than taking those two pieces of information, the proper RFC formatted file can be built and a signature generated. Than to set the signature(assuming DKIM/Goodmail/Domain Key) I simply need to insert it into the raw header information and use the very dangerous setHeaders function(adding a signature to the body of the text is much much much easier).
All in all, it looks like Swiftmail simplifies everything emensely(of course, this means modifying my target application to use swiftmail instead of phpmail, but since the functions it uses are simple that should not be a big deal)
Can anyone see any problems with the above? Other than that I'm playing with fire with that setHeaders function.