You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Serhii Nesteruk <se...@gmail.com> on 2011/10/25 17:23:59 UTC

mathcer excluding

Hi there!

I have small question about matcher: is it possible to exclude some mails
from mailet matchers?
For example I would like to receive all mails but with subject
"VeryBadSubject". Is it correct to write something like this:
<mailet match="SubjectStartWith != VeryBadSubject" class="LogMessage">

or:
<mailet match !="SubjectStartWith=VeryBadSubject" class="LogMessage">

Thanks,
  Serhii

Re: mathcer excluding

Posted by Eric Charles <er...@apache.org>.
Hi Serhii,

The current mailet implementation does not support any EL (Expression 
Language). It's about a simple equality.

If you want such functionality now, you can implement your own 
SubjectStartsNotWith matcher. It's about a few lines of code based on 
https://svn.apache.org/repos/asf/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/SubjectStartsWith.java

Thx,

Eric

On 25/10/11 17:23, Serhii Nesteruk wrote:
> Hi there!
>
> I have small question about matcher: is it possible to exclude some mails
> from mailet matchers?
> For example I would like to receive all mails but with subject
> "VeryBadSubject". Is it correct to write something like this:
> <mailet match="SubjectStartWith != VeryBadSubject" class="LogMessage">
>
> or:
> <mailet match !="SubjectStartWith=VeryBadSubject" class="LogMessage">
>
> Thanks,
>    Serhii
>

-- 
Eric
http://about.echarles.net

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