If you are on James 3 then you can't use mailetpackages anymore (it is a 2.x thing). You simply have to use the fully qualified class name in the mailet configuration:
<mailet match="RecipientIsLocal" class="com.high5software.smo.james.SMOMailet"/> Stefano 2012/1/19 Garvice Eakins <[email protected]>: > I must be missing something.... > > In theWriting a custom Mailet section it has: > > 1c. Place a jar file containing the custom class files in > /path/to/james/conf/lib/ subdirectory. > > 2. After this is done get sure you add the mailet package to the > mailetcontainer.xml. For example: > > <!-- Set the Java packages from which to load mailets and matchers --> > <mailetpackages> > <mailetpackage>org.apache.james.transport.mailets</mailetpackage> > <mailetpackage>org.apache.james.transport.mailets.smime</mailetpackage> > <mailetpackage>your.costum.package.transport-mailets</mailetpackage> > </mailetpackages> > > However my Mailetcontainer.xml file does not contain this section... Is > that an oversight? > > I added my mailetpackeges section here: > > <context> > > <postmaster>Postmaster@localhost</postmaster> > > </context> > > <spooler> > > <threads> 20 </threads> > > </spooler> > > <!-- Set the Java packages from which to load mailets and matchers --> > > <mailetpackages> > > <mailetpackage>com.high5software.smo.james</mailetpackage> > > </mailetpackages> > > <processors> > > <processor state="root" enableJmx="true"> > > ~~~~~~~~~~~ > > Then the Mailet config section it has: > > Consider the following simple *mailet* tag: > <mailet match="RemoteAddrNotInNetwork=127.0.0.1" class="ToProcessor"> > <processor>spam</processor> > </mailet> > > > So I added <mailet match="RecipientIsLocal" class="SMOMailet"/> > > in the > > <processor state="transport" enableJmx="true"> > > section... > > However this doesn't work. > > Can someone give me some more direction as to what I need to put where? > > I've also added my jar file and the Jar files it uses. > > I know my SMOMailet.Jar file works as I have created a project to test it's > functionality and it works just fine. > > Here is the MailetContainer.log file which shows the messages coming > through. > > INFO 16:40:44,792 | james.mailetcontext | Local delivered mail > Mail1326933644394-b0feafe3-f1cc-4eea-b3fd-4fec3f42a198 sucessfully from > [email protected] to [email protected] > > INFO 17:21:06,392 | james.mailetcontext | Local delivered mail > Mail1326936066151-5a9a8da9-2772-41f3-814f-47e30f79779e sucessfully from > [email protected] to [email protected] > > INFO 17:39:28,668 | james.mailetcontext | Local delivered mail > Mail1326937168427-b0750d2c-a860-47f7-94d8-acb9c5e2ef9b sucessfully from > [email protected] to [email protected] > > INFO 17:59:45,282 | james.mailetcontext | Local delivered mail > Mail1326938385018-c91070db-f6fd-4ca8-826e-a3a3e22a67ad sucessfully from > [email protected] to [email protected] > > INFO 18:17:20,838 | james.mailetcontext | Local delivered mail > Mail1326939440572-47be5d98-c980-4cec-af64-eaf39fd74201 sucessfully from > [email protected] to [email protected] > > INFO 18:23:19,708 | james.mailetcontext | Local delivered mail > Mail1326939799557-ccc2f003-cdcc-4444-a229-9d38f0dd1a25 sucessfully from > [email protected] to [email protected] > > INFO 18:55:37,547 | james.mailetcontext | Local delivered mail > Mail1326941737255-0efd2440-fdd1-4589-a885-355a07042790 sucessfully from > [email protected] to [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
