Hi

Write a custom mailet by extending GenericMailet with matcher configured as
ALL & perform your validation in custom mailet.

On Tue, Apr 26, 2016 at 1:41 PM, Benjamin Yeo <ro4drun...@gmail.com> wrote:

> So I am trying to write a matcher which is Blacklist/Whitelist.
>
> Blacklist and whitelist will have two columns.
> senderAddress
> recipientAddress
>
> For example for whitelist
> senderAddress = us...@captcha.com
> recipientAddress = us...@captcha.com
>
> if user1 sends an email to user2, the matcher will check upon the database
> and then if user1 is in user2's whitelist, email will get through.
>
> For blacklist
> senderAddress = us...@captcha.com
> recipientAddress = us...@captcha.com
>
> if user1 sends an email to user3, matcher will check with the database and
> if user1 is in user3's blacklist, email will be discarded.
>
> I tried my best and replicated IsInWhiteList.java and into
> IsInBlackList.java, compiled with source and everything could work.
>
> So I added this in config.xml which is
>
> <mailet match="IsInBlackList=db://maildb" class="ToProcessor"
> onMatchException="matchAll">
> <processor> spam </processor>
> </mailet>
>
> Am I doing the right thing or can someone help me on how do I write my own
> simple matcher for this to work?
>
> Regards,
> Ben.
>



-- 
Thanks
Muhammad Ismail
cell (PAK) : +92.322.5100362
cell (Sweden): +46 700-321-521
e-mail: it.is.ism...@gmail.com

This message may contain confidential and/or privileged information.  If
you are not the addressee or authorized to receive this for the addressee,
you must not use, copy, disclose or take any action based on this message
or any information herein.  If you have received this message in error,
please advise the sender immediately by reply e-mail and delete this
message.  Thank you for your cooperation.

Reply via email to