I have a custom matcher, which basically just writes to log:
package com.myapp.james.matchers;
import org.apache.mailet.GenericMatcher;
import org.apache.mailet.Mail;
import javax.mail.MessagingException;
import java.util.Collection;
public class HelloWorld extends GenericMatcher {
public Collection match(Mail mail) throws MessagingException {
log("Hello, World");
return null;
}
}
This is registered in config.xml thus:
<mailet match="HelloWorld" class="All" />
Matcher compiles fine, and I have added the correct package to
<matcherpackages>.
I have also set the log level to DEBUG for all logs in environment.xml.
Restarting the server, two things happen:
1. HelloWorld matcher does not write anything to the log;
2. spoolmanager.log stops writing entries at the point HelloWorld
matcher is instantiated (just after the PostmasterAlias
matcher/mailet):
12/04/07 08:01:25 INFO spoolmanager: JamesSpoolManager init...
12/04/07 08:01:25 INFO spoolmanager: Matcher All instantiated.
12/04/07 08:01:25 INFO spoolmanager: Mailet PostmasterAlias instantiated.
<END OF FILE>
The mailet.log file is empty.
Sending mails through James works fine, so it's up and running, but
HelloWorld does not seem to work and I cannot find where it is logging
to.
Using Mac OS X, James 2.3.0, JDK 1.5.0_07.
Thanks in advance !
--
Dan Jacob
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]