1) The log for matchers/mailets should be written in mailet-*.log files.
2) The "return null" will make the matcher to not match everything.
3) What is the "All" mailet you use in pair with HelloWorld matcher?
4) IIRC there is a known issue between dnsjava (a library used by James)
and some JVM for OSX, quoting a recent message from Mike Bryant:
----
James 2.3 uses DNSJava, and DNSJava has known issues with the JVM
that comes with OS X 10.3. Hopefully you will be using OS X 10.4 and
will be able to verify that the issue is solved by OS X 10.4.
----
Stefano
Dan Jacob ha scritto:
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 !
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]