Hi Srini,
I guess you cannot chain matchers as such, but you can accomplish the same
with the following in config.xml:
--- START ---
--- 'OR' CONDITION ---
<processor name="root">
<!-- If condition 'SenderIs' is met, send to isGoodMail -->
<mailet match="[EMAIL PROTECTED]"
class="ToProcessor">
<processor> isGoodMail </processor>
</mailet>
<!-- If condition 'SenderIs' is not met BUT condition 'SubjectIs'
is met, send still to isGoodMail -->
<mailet match="SubjectIs=something"
class="ToProcessor">
<processor> isGoodMail </processor>
</mailet>
<!-- else, do something (for instance, mark as spam) -->
<mailet match="All"
class="ToProcessor">
<processor> spam </processor>
</mailet>
</processor>
<processor name="isGoodMail">
<mailet match="All"
class="YourMailet">
<condition> yourCondition </condition>
</mailet>
<!-- Remember to send to 'transport' processor afterwards if you
want the mail to be delivered -->
</processor>
--- 'AND' CONDITION ---
<processor name="root">
<!-- If condition 'SenderIs' is met, send to processor
'isGoodSender' below -->
<mailet match="[EMAIL PROTECTED]"
class="ToProcessor">
<processor> isGoodSender </processor>
</mailet>
<!-- else, do something (for instance, mark as spam) -->
<mailet match="All"
class="ToProcessor">
<processor> spam </processor>
</mailet>
</processor>
<processor name="isGoodSender">
<!-- If condition 'SenderIs' is met AND condition
'SubjectIs' is met, use YourMailet to do your specific processing. -->
<mailet match="SubjectIs=something"
class="YourMailet">
<condition> yourCondition </condition>
</mailet>
<!-- Remember to send to 'transport' processor afterwards if you
want the mail to be delivered -->
<!-- else, do something (for instance, mark as spam) -->
<mailet match="All"
class="ToProcessor">
<processor> spam </processor>
</mailet>
</processor>
--- END ---
The 'AND' part can be simplified using 'IsNot' type of matchers instead of
'Is', but now you can work on this as you want to meet your expectations.
Br,
Isaac.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: jueves, 01 de abril de 2004 23:33
To: [EMAIL PROTECTED]
Subject: Chaining Matchers
Hi
Is it possible to chain a couple of matchers and direct the result in the
end to a single mailet?
For example, i want to identify the messages from a particular sender with
a specific subject and take action on it.
So using the built in "SenderIs" and the "SubjectIs" matchers, is it
possible to accomplish this without writing a new matcher?
thanks
---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure. If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]