Commit ab4f97fa authored by bobot's avatar bobot

Modification pour que chaques lists aient ses propres limites de scores.

darcs-hash:20061018095120-9e428-a06402e0c148ee592db468b623e2cfca057d198a.gz
parent 6c689e40
......@@ -73,22 +73,32 @@ def process(mlist, msg, msgdata):
if msgdata.get('approved'):
return
#Recuperation des parametres SpamAssassin de la liste
#Score modifie minimum pour que le message soit rejete
DISCARD_SCORE_LIST = getattr(mlist, 'SPAMASSASSIN_DISCARD_SCORE', DISCARD_SCORE)
#Score modifie minimum pour que le message soit mis en attente de moderation
HOLD_SCORE_LIST = getattr(mlist, 'SPAMASSASSIN_HOLD_SCORE', HOLD_SCORE)
#Modificateur du score de Spamassassin selon le nombre d'expediteur du message abonne a la liste.
MEMBER_BONUS_LIST = getattr(mlist, 'SPAMASSASSIN_MEMBER_BONUS', MEMBER_BONUS)
score, symbols = check_message(mlist, str(msg))
if MEMBER_BONUS != 0:
if MEMBER_BONUS_LIST != 0:
for sender in msg.get_senders():
if mlist.isMember(sender) or \
matches_p(sender, mlist.accept_these_nonmembers):
score -= MEMBER_BONUS
score -= MEMBER_BONUS_LIST
break
if score > DISCARD_SCORE:
if score > DISCARD_SCORE_LIST:
listname = mlist.real_name
sender = msg.get_sender()
syslog('vette', '%s post from %s discarded: '
'SpamAssassin score was %g (discard threshold is %g)'
% (listname, sender, score, DISCARD_SCORE))
% (listname, sender, score, DISCARD_SCORE_LIST))
raise SpamAssassinDiscard
elif score > HOLD_SCORE:
elif score > HOLD_SCORE_LIST:
Hold.hold_for_approval(mlist, msg, msgdata,
SpamAssassinHold(score, symbols))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment