CommandListservMatcherpublic class CommandListservMatcher extends org.apache.mailet.GenericRecipientMatcher CommandListservMatcher is the matcher that pairs with the {@link org.apache.james.transport.mailets.CommandListservManager}
It checks to see if the request is intended for the ListservManager, but doesn't guarantee that it is a valid command.
To configure, insert this into the config.xml inside of the root processor block.
<mailet match="CommandListservMatcher=announce@localhost" class="CommandListservManager">
...
</mailet>
|
Fields Summary |
---|
private org.apache.mailet.MailAddress | listservAddress |
Methods Summary |
---|
public void | init()
listservAddress = new MailAddress(getCondition());
| public boolean | matchRecipient(org.apache.mailet.MailAddress recipient)This doesn't perform an exact match, but checks to see if the request is at lesast
intended to go to the list serv manager.
if (recipient.getHost().equals(listservAddress.getHost())) {
if (recipient.getUser().startsWith(listservAddress.getUser() + "-")) {
return true;
}
}
return false;
|
|