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 = [email protected]
recipientAddress = [email protected]

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 = [email protected]
recipientAddress = [email protected]

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.

Reply via email to