Class DKIMVerify

  • All Implemented Interfaces:
    org.apache.mailet.Mailet, org.apache.mailet.MailetConfig

    public class DKIMVerify
    extends org.apache.mailet.base.GenericMailet
    This mailet verify a message using the DKIM protocol Sample configuration:
    
     <mailet match="All" class="DKIMVerify">
     </mailet>
     
    By default the mailet assume that Javamail will use LF instead of CRLF so it will verify the hash using converted newlines. If you don't want this behaviout then set forceCRLF attribute to false.
    • Constructor Summary

      Constructors 
      Constructor Description
      DKIMVerify()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void init()  
      void service​(org.apache.mailet.Mail mail)  
      protected static List<org.apache.james.jdkim.api.SignatureRecord> verify​(org.apache.james.jdkim.DKIMVerifier verifier, javax.mail.internet.MimeMessage message, boolean forceCRLF)  
      • Methods inherited from class org.apache.mailet.base.GenericMailet

        arrayToString, checkInitParameters, destroy, getInitParameter, getInitParameter, getInitParameter, getInitParameterNames, getMailetConfig, getMailetContext, getMailetInfo, getMailetName, init, log, log
    • Field Detail

      • verifier

        protected org.apache.james.jdkim.DKIMVerifier verifier
    • Constructor Detail

      • DKIMVerify

        public DKIMVerify()
    • Method Detail

      • init

        public void init()
                  throws javax.mail.MessagingException
        Overrides:
        init in class org.apache.mailet.base.GenericMailet
        Throws:
        javax.mail.MessagingException
      • service

        public void service​(org.apache.mailet.Mail mail)
                     throws javax.mail.MessagingException
        Specified by:
        service in interface org.apache.mailet.Mailet
        Specified by:
        service in class org.apache.mailet.base.GenericMailet
        Throws:
        javax.mail.MessagingException
      • verify

        protected static List<org.apache.james.jdkim.api.SignatureRecord> verify​(org.apache.james.jdkim.DKIMVerifier verifier,
                                                                                 javax.mail.internet.MimeMessage message,
                                                                                 boolean forceCRLF)
                                                                          throws javax.mail.MessagingException,
                                                                                 org.apache.james.jdkim.exceptions.FailException
        Throws:
        javax.mail.MessagingException
        org.apache.james.jdkim.exceptions.FailException