Hi Benjamin ! The way you do it seems fine. If you have a valid JDBC configuration. You should pay attention to use different tables. And you might have to add some queries to classpath:sqlResources.xml ...
Also, how do us...@captcha.com adds us...@captcha.com to its white/black list ? I have some personal troubles with AbstractSQLWhitelistMatcher, though... Because its storage is not abstracted behind its interface, but handled directly in the mailet. The interface used to store information in James server should rather be defined in data-api and implemented in data-*... Cheers, Benoit Le 26/04/2016 à 15:41, Benjamin Yeo a écrit : > 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 = user1@captcha.comow > 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. > --------------------------------------------------------------------- To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org