Implement the sieve script name resolution pattern

master
kaiyou 6 years ago
parent 3c725bf634
commit 6ba55ee377

@ -118,8 +118,13 @@ def dovecot_quota(ns, user_email):
return flask.jsonify(None)
@internal.route("/dovecot/sieve/name/default/<user_email>")
def dovecot_sieve(script, user_email):
@internal.route("/dovecot/sieve/name/<script>/<user_email>")
def dovecot_sieve_name(script, user_email):
return flask.jsonify(script)
@internal.route("/dovecot/sieve/data/default/<user_email>")
def dovecot_sieve_data(user_email):
user = models.User.query.get(user_email) or flask.abort(404)
return flask.jsonify(flask.render_template("default.sieve", user=user))

@ -138,7 +138,8 @@ service managesieve {
plugin {
sieve = dict:proxy:/tmp/podop.socket:sieve
sieve_plugins = sieve_imapsieve sieve_extprograms
sieve_global_extensions = +spamtest +spamtestplus +vnd.dovecot.execute +editheader
sieve_extensions = +spamtest +spamtestplus +editheader
sieve_global_extensions = +vnd.dovecot.execute
# Sieve execute
sieve_execute_bin_dir = /var/lib/dovecot/bin

Loading…
Cancel
Save