Import initiale d'une page de paramtrage de Spamassassin.
darcs-hash:20061103180429-9e428-bc112ebb12819347340caf1cb19353371e016392.gz
This commit is contained in:
parent
6e8eba808e
commit
6c2764364e
1 changed files with 47 additions and 0 deletions
47
mailman/Gui/SpamAssassin.py
Normal file
47
mailman/Gui/SpamAssassin.py
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
# Copyright (C) 2001-2003 by the Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License
|
||||||
|
# as published by the Free Software Foundation; either version 2
|
||||||
|
# of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
"""MailList mixin class managing the spamassassin options.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
from Mailman import mm_cfg
|
||||||
|
from Mailman import Utils
|
||||||
|
from Mailman.i18n import _
|
||||||
|
from Mailman.Gui.GUIBase import GUIBase
|
||||||
|
|
||||||
|
try:
|
||||||
|
True, False
|
||||||
|
except NameError:
|
||||||
|
True = 1
|
||||||
|
False = 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class SpamAssassin(GUIBase):
|
||||||
|
def GetConfigCategory(self):
|
||||||
|
return 'spamassassin', _('En test :SpamAssassin options...')
|
||||||
|
|
||||||
|
def GetConfigInfo(self, mlist, category, subcat=None):
|
||||||
|
if category <> 'spamassassin':
|
||||||
|
return None
|
||||||
|
if getattr(mlist,'SPAMASSASSIN_HOLD_SCORE',None)!=None and getattr(mlist,'SPAMASSASSIN_DISCARD_SCORE',None)!=None and getattr(mlist,'SPAMASSASSIN_MEMBER_BONUS',None)!=None :
|
||||||
|
return [('SPAMASSASSIN_HOLD_SCORE',mm_cfg.Number,7,0,_('''minimum SpamAssassin score before message moderation'''),_('''If the message have a SpamAssassin score higher than this value then it is moderate.''')),
|
||||||
|
('SPAMASSASSIN_DISCARD_SCORE',mm_cfg.Number,7,0,_('''minimum SpamAssassin score before discarding the message'''),_('''If the message have a SpamAssass\in score higher than this value then it is discard.''')),
|
||||||
|
('SPAMASSASSIN_MEMBER_BONUS',mm_cfg.Number,7,0,_('''Bonus score for message coming from a member of the list'''),_('''If the message come from a member of the list then the SpamAssassin score is lessen by the value.'''))]
|
||||||
|
else:
|
||||||
|
return [_("""This feature doesn't work yet with this list.""")]
|
Loading…
Add table
Add a link
Reference in a new issue