I have setup PostFix for receiving emails only.
I want to authenticate the received emails against their sender email addresses by using SPF or DKIM.
Is there a good java plugin available for this? or do i need to write my own in java (other preferences C, C ++) ,please reply with relevant references.
Thanks in advance
Unfortunately Postfix is not one of the mail servers that suppose SPF natively, but there are some extensions and patches for this, which can be found at http://www.openspf.org/Implementations.
While a java library is available for SPF, I'm not aware of any plugins or patches that are currently using it.
The solution I followed is as:
I attached the DKIM and SenderID milters available from Postfix add-ons list with my Postfix e-mail server.
Since these milters can be configured to add e-mail headers in the received mails about their results, so I wrote a custom mail-filter using jilter api (java mail filter api), parsed the mail headers and hence I was able to determine and act about the authentication results of SPF and SenderID according to my custom logic.