Merge pull request #73 from diresi/junk_filter

dovecot: use rspamd X-Spamd-Result percentage to evaluate spam
This commit is contained in:
kaiyou
2016-10-02 09:46:48 +02:00
committed by GitHub
5 changed files with 52 additions and 12 deletions

View File

@@ -143,7 +143,7 @@ class User(Email):
# Settings
displayed_name = db.Column(db.String(160), nullable=False, default="")
spam_enabled = db.Column(db.Boolean(), nullable=False, default=True)
spam_threshold = db.Column(db.Numeric(), nullable=False, default=10.0)
spam_threshold = db.Column(db.Numeric(), nullable=False, default=80.0)
# Flask-login attributes
is_authenticated = True

View File

@@ -13,8 +13,8 @@ User settings
{{ form.hidden_tag() }}
{{ macros.form_field(form.displayed_name) }}
{{ macros.form_field(form.spam_enabled) }}
{{ macros.form_field(form.spam_threshold, step=1, max=15,
prepend='<span class="input-group-addon"><span id="threshold">'+(form.spam_threshold.data).__int__().__str__()+'</span>&nbsp;/&nbsp;15</span>',
{{ macros.form_field(form.spam_threshold, step=1, max=100,
prepend='<span class="input-group-addon"><span id="threshold">'+(form.spam_threshold.data).__int__().__str__()+'</span>&nbsp;/&nbsp;100</span>',
oninput='$("#threshold").text(this.value);') }}
{{ macros.form_field(form.submit) }}
</form>