I am about to check in a new AbstractNetworkMatcher that uses the same
NetMatcher class used by the SMTP Handler for fast fail.

RemoteAddrNotInNetwork and RemoteAddrInNetwork now extend
AbstractNetworkMatcher.  Other types of network matchers are faciliated.
The RemoteAddrNotInNetwork code demonstrates how trivial it is to code a
network matcher:

public class RemoteAddrNotInNetwork extends AbstractNetworkMatcher {
    public Collection match(Mail mail) {
        return matchNetwork(mail.getRemoteAddr()) ? null :
mail.getRecipients();
    }
}

The default behavior of AbstractNetworkMatcher is to build the network
matcher from the matcher condition.  It could be subclassed, e.g., to load
the list from a file.

I've no current plans for any other subclasses, but the code is there to be
reused.

        --- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to