diff --git a/app/dashboard/templates/dashboard/setting.html b/app/dashboard/templates/dashboard/setting.html index 891c8b9a..4a043f5d 100644 --- a/app/dashboard/templates/dashboard/setting.html +++ b/app/dashboard/templates/dashboard/setting.html @@ -305,6 +305,31 @@ {% endif %} + +
+
+
Include sender address in reverse-alias
+
+ By default, the reverse-alias is randomly generated and doesn't contain any information about + the sender.
+ + You can however enable this option to include the sender address in the reverse-alias.
+ + This can be useful when setting up an email filter and makes the reverse-alias more readable. +
+
+ +
+ + +
+ +
+
+
+ +
Quarantine
diff --git a/app/dashboard/views/setting.py b/app/dashboard/views/setting.py index ff0762c1..4e51aeaa 100644 --- a/app/dashboard/views/setting.py +++ b/app/dashboard/views/setting.py @@ -255,6 +255,16 @@ def setting(): flash("Your preference has been updated", "success") return redirect(url_for("dashboard.setting")) + elif request.form.get("form-name") == "sender-in-ra": + choose = request.form.get("enable") + if choose == "on": + current_user.include_sender_in_reverse_alias = True + else: + current_user.include_sender_in_reverse_alias = False + db.session.commit() + flash("Your preference has been updated", "success") + return redirect(url_for("dashboard.setting")) + elif request.form.get("form-name") == "export-data": data = { "email": current_user.email,