Hey there, Matt here.

So, I wrote a test matcher to see what the different methods return. I got three results:

- mail from localhost for localuser
- mail from localhost for external target
- mail from external source for localuser

I user InetAddress.getByName and as I set up sendmail as "nullclient,127.0.0.1", remoteHost returns localhost, remoteAddr returns 127.0.0.1. For some strange reason, only InetAddress.isLoopbackAddress() returns true, but that's ok as it is what I want to check.

As for getting xml-paramters I found the MailetConfig.getInitParameter(String) for configure the mailet - is there some these lines for the MatcherConfig? Or is there another way to provide parameters for a Matcher?

I guess now it's just on how to correctly filter for "from localhost for localuser", shouldn't be that hard, and figure out what to return from Matcher.match() so the provided Mailet is only acted on those mails. The Mailet to rewrite the recipient should be as simple as just call Mail.setRecipients(Collection<MailAddress>).

I'll report back when I got something usefull.

Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org

Reply via email to