Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-1285

Custom mailet not working

    XMLWordPrintableJSON

    Details

      Description

      Hello

      I have recently created a new server where I have got James 3.0-M2 running. I was able to start up James normally and send emails from it before I configured the custom mailet in mailetcontainer.xml.

      This is what I did:

      I have modified mailercontainer.xml to include custom mailerpackage and matcherpackage.
      -----------------------
      <mailetcontainer>

      <threads> 25 </threads>

      <mailetpackages>
      <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
      <mailetpackage>org.apache.james.mailet.crypto.mailet</mailetpackage>
      <mailetpackage>org.apache.james.imapserver.sieve</mailetpackage>
      <mailetpackage>com.intelliun.util.james.maillet.VECallBack</mailetpackage>
      </mailetpackages>

      <matcherpackages>
      <matcherpackage>org.apache.james.transport.matchers</matcherpackage>
      <matcherpackage>org.apache.james.mailet.crypto.matchers</matcherpackage>
      <matcherpackage>org.apache.james.mailetcontainer.lib.matchers</matcherpackage>
      <matcherpackage>com.intelliun.util.james.matcher.NewsletterBounceMatcher</matcherpackage>
      </matcherpackages>

      <processor name="root">
      <mailet match="All" class="PostmasterAlias"/>
      <mailet match="RelayLimit=30" class="Null"/>
      <mailet match="NewsletterBounceMatcher=webopnp" class="VECallBack">
      <callbackurl>http://webop.mywebsite.net/~web/newsletter/trackEmailBounce.v</callbackurl>
      </mailet>
      <mailet match="SMTPAuthSuccessful" class="ToProcessor">
      <processor>transport</processor>
      </mailet>
      ---------------

      I have included the jar file in /conf/lib folder. This was used in James 2.3.2 version and worked fine.

      When I restart the server after I made these modifications, I get the following error:

      ......................

      ERROR 11:45:40,037 | james.mailetcontainer | Unable to init matcher NewsletterBounceMatcher=cpwebopnp: org.apache.mailet.MailetException: Could not load matcher (NewsletterBounceMatcher);
      nested exception is:
      java.lang.ClassNotFoundException: Requested matcher not found: NewsletterBounceMatcher. Package searched: org.apache.james.transport.matchers. org.apache.james.mailet.crypto.matchers. org.apache.james.mailetcontainer.lib.matchers. com.intelliun.util.james.matcher.NewsletterBounceMatcher.
      org.apache.mailet.MailetException: Could not load matcher (NewsletterBounceMatcher);
      nested exception is:
      java.lang.ClassNotFoundException: Requested matcher not found: NewsletterBounceMatcher. Package searched: org.apache.james.transport.matchers. org.apache.james.mailet.crypto.matchers. org.apache.james.mailetcontainer.lib.matchers. com.intelliun.util.james.matcher.NewsletterBounceMatcher.
      at org.apache.james.mailetcontainer.lib.AbstractLoader.loadFailed(AbstractLoader.java:138)
      ......................

      Can please let me know how I could resolve this?

      • Raju

        Attachments

          Activity

            People

            • Assignee:
              norman Norman Maurer
              Reporter:
              raju.buchi Raju Buchi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: