Stefano Bagnara schrieb:
Norman Maurer wrote:
After think more about the code we should maybe do better something
like:
<handler
class="org.apache.james.smtpserver.core.filter.fastfail.DNSRBLHandler"
onCommand="RCPT">
<action> reject </action>
</handler>
or:
<handler
class="org.apache.james.smtpserver.core.filter.fastfail.DNSRBLHandler"
onCommand="RCPT">
<action> junkScore </action>
<match> +10 </match>
<notmatch> 0 </notmatch>
</handler>
Imho match/nomatch is not so good... imho it is always better to use a
single match and put there the "match - nomatch" result.
You're simply moving the offset.. so you'd better check for a
different result at the end.
Simplicity is the key ;-)
Well with <match> and <notmatch> the admin could do more flexible
configs... It was just a idea..
So the admin can maybe substract scores if he want etc..
The JunkScore Object also needs to hold one Map with scores which
used for the whole session and one which used per message.
Maybe something like:
public Map getStoredScores();
public Map getStoredSessionScores();
public int getStoredScore(String key);
public int getStoredSessionScore(String key);
public int getCompleteStoredScores();
public int getCompleteStoredSessionScores();
public int getMergedStoredScores();
public int addStoredScore(String key,int score);
public int addStoredSessionScore(String key,int score);
public int removeStoredScore(String key);
public int removeStoredSessionScore(String key);
public int resetStoredScores();
public int resetStoredSessionScores();
Any thoughts ?
What about having a single JunkScore interface and use 2 objects (one
for the session, on the default handling) and have an utility class to
merge the score or a ComposedJunkScore(JunkScore first, JunkScore
second) that simply implement JunkScore and return results from both?
This seems much more clean to me.
Stefano
Now i think i understand what you mean.. and this makes really more
sense.. Thx for the "help"
bye
Norman
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]