We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
plus mail in auto-forward destination
The email address in `admin -> User settings -> Auto-forward -> Destination` cannot contains a '+' character (error: Invalid email address). But the '+' in email address is valid and admin should accept it.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `core/admin/mailu/ui/forms.py`
Content:
```
1 from wtforms import validators, fields, widgets
2 from wtforms_components import fields as fields_
3 from flask_babel import lazy_gettext as _
4 
5 import flask_login
6 import flask_wtf
7 import re
8 
9 LOCALPART_REGEX = "^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*$"
10 
11 class DestinationField(fields.SelectMultipleField):
12     """ Allow for multiple emails selection from current user choices and
13     additional email addresses.
14     """
15 
16     validator = re.compile(r'^.+@([^.@][^@]+)$', re.IGNORECASE)
17 
18     def iter_choices(self):
19         managed = [
20             str(email)
21             for email in flask_login.current_user.get_managed_emails()
22         ]
23         for email in managed:
24             selected = self.data is not None and self.coerce(email) in self.data
25             yield (email, email, selected)
26         for email in self.data or ():
27             if email not in managed:
28                 yield (email, email, True)
29 
30     def pre_validate(self, form):
31         for item in self.data:
32             if not self.validator.match(item):
33                 raise validators.ValidationError(_('Invalid email address.'))
34 
35 class MultipleEmailAddressesVerify(object):
36     def __init__(self,message=_('Invalid email address.')):
37         self.message = message
38 
39     def __call__(self, form, field):
40         pattern = re.compile(r'^([_a-z0-9\-]+)(\.[_a-z0-9\-]+)*@([a-z0-9\-]{2,}\.)*([a-z]{2,})(,([_a-z0-9\-]+)(\.[_a-z0-9\-]+)*@([a-z0-9\-]{2,}\.)*([a-z]{2,}))*$')
41         if not pattern.match(field.data.replace(" ", "")):
42             raise validators.ValidationError(self.message)
43 
44 class ConfirmationForm(flask_wtf.FlaskForm):
45     submit = fields.SubmitField(_('Confirm'))
46 
47 class DomainForm(flask_wtf.FlaskForm):
48     name = fields.StringField(_('Domain name'), [validators.DataRequired()])
49     max_users = fields_.IntegerField(_('Maximum user count'), [validators.NumberRange(min=-1)], default=10)
50     max_aliases = fields_.IntegerField(_('Maximum alias count'), [validators.NumberRange(min=-1)], default=10)
51     max_quota_bytes = fields_.IntegerSliderField(_('Maximum user quota'), default=0)
52     signup_enabled = fields.BooleanField(_('Enable sign-up'), default=False)
53     comment = fields.StringField(_('Comment'))
54     submit = fields.SubmitField(_('Save'))
55 
56 
57 class DomainSignupForm(flask_wtf.FlaskForm):
58     name = fields.StringField(_('Domain name'), [validators.DataRequired()])
59     localpart = fields.StringField(_('Initial admin'), [validators.DataRequired()])
60     pw = fields.PasswordField(_('Admin password'), [validators.DataRequired()])
61     pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])
62     captcha = flask_wtf.RecaptchaField()
63     submit = fields.SubmitField(_('Create'))
64 
65 
66 class AlternativeForm(flask_wtf.FlaskForm):
67     name = fields.StringField(_('Alternative name'), [validators.DataRequired()])
68     submit = fields.SubmitField(_('Save'))
69 
70 
71 class RelayForm(flask_wtf.FlaskForm):
72     name = fields.StringField(_('Relayed domain name'), [validators.DataRequired()])
73     smtp = fields.StringField(_('Remote host'))
74     comment = fields.StringField(_('Comment'))
75     submit = fields.SubmitField(_('Save'))
76 
77 
78 class UserForm(flask_wtf.FlaskForm):
79     localpart = fields.StringField(_('E-mail'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])
80     pw = fields.PasswordField(_('Password'))
81     pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])
82     quota_bytes = fields_.IntegerSliderField(_('Quota'), default=10**9)
83     enable_imap = fields.BooleanField(_('Allow IMAP access'), default=True)
84     enable_pop = fields.BooleanField(_('Allow POP3 access'), default=True)
85     displayed_name = fields.StringField(_('Displayed name'))
86     comment = fields.StringField(_('Comment'))
87     enabled = fields.BooleanField(_('Enabled'), default=True)
88     submit = fields.SubmitField(_('Save'))
89 
90 
91 class UserSignupForm(flask_wtf.FlaskForm):
92     localpart = fields.StringField(_('Email address'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])
93     pw = fields.PasswordField(_('Password'), [validators.DataRequired()])
94     pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])
95     submit = fields.SubmitField(_('Sign up'))
96 
97 class UserSignupFormCaptcha(UserSignupForm):
98     captcha = flask_wtf.RecaptchaField()
99 
100 class UserSettingsForm(flask_wtf.FlaskForm):
101     displayed_name = fields.StringField(_('Displayed name'))
102     spam_enabled = fields.BooleanField(_('Enable spam filter'))
103     spam_threshold = fields_.IntegerSliderField(_('Spam filter tolerance'))
104     forward_enabled = fields.BooleanField(_('Enable forwarding'))
105     forward_keep = fields.BooleanField(_('Keep a copy of the emails'))
106     forward_destination = fields.StringField(_('Destination'), [validators.Optional(), MultipleEmailAddressesVerify()])
107     submit = fields.SubmitField(_('Save settings'))
108 
109 
110 class UserPasswordForm(flask_wtf.FlaskForm):
111     pw = fields.PasswordField(_('Password'), [validators.DataRequired()])
112     pw2 = fields.PasswordField(_('Password check'), [validators.DataRequired()])
113     submit = fields.SubmitField(_('Update password'))
114 
115 
116 class UserReplyForm(flask_wtf.FlaskForm):
117     reply_enabled = fields.BooleanField(_('Enable automatic reply'))
118     reply_subject = fields.StringField(_('Reply subject'))
119     reply_body = fields.StringField(_('Reply body'),
120         widget=widgets.TextArea())
121     reply_startdate = fields.html5.DateField(_('Start of vacation'))
122     reply_enddate = fields.html5.DateField(_('End of vacation'))
123     submit = fields.SubmitField(_('Update'))
124 
125 
126 class TokenForm(flask_wtf.FlaskForm):
127     displayed_password = fields.StringField(
128         _('Your token (write it down, as it will never be displayed again)')
129     )
130     raw_password = fields.HiddenField([validators.DataRequired()])
131     comment = fields.StringField(_('Comment'))
132     ip = fields.StringField(
133         _('Authorized IP'), [validators.Optional(), validators.IPAddress(ipv6=True)]
134     )
135     submit = fields.SubmitField(_('Save'))
136 
137 
138 class AliasForm(flask_wtf.FlaskForm):
139     localpart = fields.StringField(_('Alias'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])
140     wildcard = fields.BooleanField(
141         _('Use SQL LIKE Syntax (e.g. for catch-all aliases)'))
142     destination = DestinationField(_('Destination'))
143     comment = fields.StringField(_('Comment'))
144     submit = fields.SubmitField(_('Save'))
145 
146 
147 class AdminForm(flask_wtf.FlaskForm):
148     admin = fields.SelectField(_('Admin email'), choices=[])
149     submit = fields.SubmitField(_('Submit'))
150 
151 
152 class ManagerForm(flask_wtf.FlaskForm):
153     manager = fields.SelectField(_('Manager email'))
154     submit = fields.SubmitField(_('Submit'))
155 
156 
157 class FetchForm(flask_wtf.FlaskForm):
158     protocol = fields.SelectField(_('Protocol'), choices=[
159         ('imap', 'IMAP'), ('pop3', 'POP3')
160     ])
161     host = fields.StringField(_('Hostname or IP'), [validators.DataRequired()])
162     port = fields.IntegerField(_('TCP port'), [validators.DataRequired(), validators.NumberRange(min=0, max=65535)])
163     tls = fields.BooleanField(_('Enable TLS'))
164     username = fields.StringField(_('Username'), [validators.DataRequired()])
165     password = fields.PasswordField(_('Password'))
166     keep = fields.BooleanField(_('Keep emails on the server'))
167     submit = fields.SubmitField(_('Submit'))
168 
169 
170 class AnnouncementForm(flask_wtf.FlaskForm):
171     announcement_subject = fields.StringField(_('Announcement subject'),
172         [validators.DataRequired()])
173     announcement_body = fields.StringField(_('Announcement body'),
174         [validators.DataRequired()], widget=widgets.TextArea())
175     submit = fields.SubmitField(_('Send'))
176
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/core/admin/mailu/ui/forms.py b/core/admin/mailu/ui/forms.py
--- a/core/admin/mailu/ui/forms.py
+++ b/core/admin/mailu/ui/forms.py
@@ -37,7 +37,7 @@
         self.message = message
 
     def __call__(self, form, field):
-        pattern = re.compile(r'^([_a-z0-9\-]+)(\.[_a-z0-9\-]+)*@([a-z0-9\-]{2,}\.)*([a-z]{2,})(,([_a-z0-9\-]+)(\.[_a-z0-9\-]+)*@([a-z0-9\-]{2,}\.)*([a-z]{2,}))*$')
+        pattern = re.compile(r'^([_a-z0-9\-\+]+)(\.[_a-z0-9\-\+]+)*@([a-z0-9\-]{1,}\.)*([a-z]{1,})(,([_a-z0-9\-\+]+)(\.[_a-z0-9\-\+]+)*@([a-z0-9\-]{1,}\.)*([a-z]{2,}))*$')
         if not pattern.match(field.data.replace(" ", "")):
             raise validators.ValidationError(self.message)

{"golden_diff": "diff --git a/core/admin/mailu/ui/forms.py b/core/admin/mailu/ui/forms.py\n--- a/core/admin/mailu/ui/forms.py\n+++ b/core/admin/mailu/ui/forms.py\n@@ -37,7 +37,7 @@\n         self.message = message\n \n     def __call__(self, form, field):\n-        pattern = re.compile(r'^([_a-z0-9\\-]+)(\\.[_a-z0-9\\-]+)*@([a-z0-9\\-]{2,}\\.)*([a-z]{2,})(,([_a-z0-9\\-]+)(\\.[_a-z0-9\\-]+)*@([a-z0-9\\-]{2,}\\.)*([a-z]{2,}))*$')\n+        pattern = re.compile(r'^([_a-z0-9\\-\\+]+)(\\.[_a-z0-9\\-\\+]+)*@([a-z0-9\\-]{1,}\\.)*([a-z]{1,})(,([_a-z0-9\\-\\+]+)(\\.[_a-z0-9\\-\\+]+)*@([a-z0-9\\-]{1,}\\.)*([a-z]{2,}))*$')\n         if not pattern.match(field.data.replace(\" \", \"\")):\n             raise validators.ValidationError(self.message)\n", "issue": "plus mail in auto-forward destination\nThe email address in `admin -> User settings -> Auto-forward -> Destination` cannot contains a '+' character (error: Invalid email address). But the '+' in email address is valid and admin should accept it.\n", "before_files": [{"content": "from wtforms import validators, fields, widgets\nfrom wtforms_components import fields as fields_\nfrom flask_babel import lazy_gettext as _\n\nimport flask_login\nimport flask_wtf\nimport re\n\nLOCALPART_REGEX = \"^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*$\"\n\nclass DestinationField(fields.SelectMultipleField):\n    \"\"\" Allow for multiple emails selection from current user choices and\n    additional email addresses.\n    \"\"\"\n\n    validator = re.compile(r'^.+@([^.@][^@]+)$', re.IGNORECASE)\n\n    def iter_choices(self):\n        managed = [\n            str(email)\n            for email in flask_login.current_user.get_managed_emails()\n        ]\n        for email in managed:\n            selected = self.data is not None and self.coerce(email) in self.data\n            yield (email, email, selected)\n        for email in self.data or ():\n            if email not in managed:\n                yield (email, email, True)\n\n    def pre_validate(self, form):\n        for item in self.data:\n            if not self.validator.match(item):\n                raise validators.ValidationError(_('Invalid email address.'))\n\nclass MultipleEmailAddressesVerify(object):\n    def __init__(self,message=_('Invalid email address.')):\n        self.message = message\n\n    def __call__(self, form, field):\n        pattern = re.compile(r'^([_a-z0-9\\-]+)(\\.[_a-z0-9\\-]+)*@([a-z0-9\\-]{2,}\\.)*([a-z]{2,})(,([_a-z0-9\\-]+)(\\.[_a-z0-9\\-]+)*@([a-z0-9\\-]{2,}\\.)*([a-z]{2,}))*$')\n        if not pattern.match(field.data.replace(\" \", \"\")):\n            raise validators.ValidationError(self.message)\n\nclass ConfirmationForm(flask_wtf.FlaskForm):\n    submit = fields.SubmitField(_('Confirm'))\n\nclass DomainForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Domain name'), [validators.DataRequired()])\n    max_users = fields_.IntegerField(_('Maximum user count'), [validators.NumberRange(min=-1)], default=10)\n    max_aliases = fields_.IntegerField(_('Maximum alias count'), [validators.NumberRange(min=-1)], default=10)\n    max_quota_bytes = fields_.IntegerSliderField(_('Maximum user quota'), default=0)\n    signup_enabled = fields.BooleanField(_('Enable sign-up'), default=False)\n    comment = fields.StringField(_('Comment'))\n    submit = fields.SubmitField(_('Save'))\n\n\nclass DomainSignupForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Domain name'), [validators.DataRequired()])\n    localpart = fields.StringField(_('Initial admin'), [validators.DataRequired()])\n    pw = fields.PasswordField(_('Admin password'), [validators.DataRequired()])\n    pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])\n    captcha = flask_wtf.RecaptchaField()\n    submit = fields.SubmitField(_('Create'))\n\n\nclass AlternativeForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Alternative name'), [validators.DataRequired()])\n    submit = fields.SubmitField(_('Save'))\n\n\nclass RelayForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Relayed domain name'), [validators.DataRequired()])\n    smtp = fields.StringField(_('Remote host'))\n    comment = fields.StringField(_('Comment'))\n    submit = fields.SubmitField(_('Save'))\n\n\nclass UserForm(flask_wtf.FlaskForm):\n    localpart = fields.StringField(_('E-mail'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])\n    pw = fields.PasswordField(_('Password'))\n    pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])\n    quota_bytes = fields_.IntegerSliderField(_('Quota'), default=10**9)\n    enable_imap = fields.BooleanField(_('Allow IMAP access'), default=True)\n    enable_pop = fields.BooleanField(_('Allow POP3 access'), default=True)\n    displayed_name = fields.StringField(_('Displayed name'))\n    comment = fields.StringField(_('Comment'))\n    enabled = fields.BooleanField(_('Enabled'), default=True)\n    submit = fields.SubmitField(_('Save'))\n\n\nclass UserSignupForm(flask_wtf.FlaskForm):\n    localpart = fields.StringField(_('Email address'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])\n    pw = fields.PasswordField(_('Password'), [validators.DataRequired()])\n    pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])\n    submit = fields.SubmitField(_('Sign up'))\n\nclass UserSignupFormCaptcha(UserSignupForm):\n    captcha = flask_wtf.RecaptchaField()\n\nclass UserSettingsForm(flask_wtf.FlaskForm):\n    displayed_name = fields.StringField(_('Displayed name'))\n    spam_enabled = fields.BooleanField(_('Enable spam filter'))\n    spam_threshold = fields_.IntegerSliderField(_('Spam filter tolerance'))\n    forward_enabled = fields.BooleanField(_('Enable forwarding'))\n    forward_keep = fields.BooleanField(_('Keep a copy of the emails'))\n    forward_destination = fields.StringField(_('Destination'), [validators.Optional(), MultipleEmailAddressesVerify()])\n    submit = fields.SubmitField(_('Save settings'))\n\n\nclass UserPasswordForm(flask_wtf.FlaskForm):\n    pw = fields.PasswordField(_('Password'), [validators.DataRequired()])\n    pw2 = fields.PasswordField(_('Password check'), [validators.DataRequired()])\n    submit = fields.SubmitField(_('Update password'))\n\n\nclass UserReplyForm(flask_wtf.FlaskForm):\n    reply_enabled = fields.BooleanField(_('Enable automatic reply'))\n    reply_subject = fields.StringField(_('Reply subject'))\n    reply_body = fields.StringField(_('Reply body'),\n        widget=widgets.TextArea())\n    reply_startdate = fields.html5.DateField(_('Start of vacation'))\n    reply_enddate = fields.html5.DateField(_('End of vacation'))\n    submit = fields.SubmitField(_('Update'))\n\n\nclass TokenForm(flask_wtf.FlaskForm):\n    displayed_password = fields.StringField(\n        _('Your token (write it down, as it will never be displayed again)')\n    )\n    raw_password = fields.HiddenField([validators.DataRequired()])\n    comment = fields.StringField(_('Comment'))\n    ip = fields.StringField(\n        _('Authorized IP'), [validators.Optional(), validators.IPAddress(ipv6=True)]\n    )\n    submit = fields.SubmitField(_('Save'))\n\n\nclass AliasForm(flask_wtf.FlaskForm):\n    localpart = fields.StringField(_('Alias'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])\n    wildcard = fields.BooleanField(\n        _('Use SQL LIKE Syntax (e.g. for catch-all aliases)'))\n    destination = DestinationField(_('Destination'))\n    comment = fields.StringField(_('Comment'))\n    submit = fields.SubmitField(_('Save'))\n\n\nclass AdminForm(flask_wtf.FlaskForm):\n    admin = fields.SelectField(_('Admin email'), choices=[])\n    submit = fields.SubmitField(_('Submit'))\n\n\nclass ManagerForm(flask_wtf.FlaskForm):\n    manager = fields.SelectField(_('Manager email'))\n    submit = fields.SubmitField(_('Submit'))\n\n\nclass FetchForm(flask_wtf.FlaskForm):\n    protocol = fields.SelectField(_('Protocol'), choices=[\n        ('imap', 'IMAP'), ('pop3', 'POP3')\n    ])\n    host = fields.StringField(_('Hostname or IP'), [validators.DataRequired()])\n    port = fields.IntegerField(_('TCP port'), [validators.DataRequired(), validators.NumberRange(min=0, max=65535)])\n    tls = fields.BooleanField(_('Enable TLS'))\n    username = fields.StringField(_('Username'), [validators.DataRequired()])\n    password = fields.PasswordField(_('Password'))\n    keep = fields.BooleanField(_('Keep emails on the server'))\n    submit = fields.SubmitField(_('Submit'))\n\n\nclass AnnouncementForm(flask_wtf.FlaskForm):\n    announcement_subject = fields.StringField(_('Announcement subject'),\n        [validators.DataRequired()])\n    announcement_body = fields.StringField(_('Announcement body'),\n        [validators.DataRequired()], widget=widgets.TextArea())\n    submit = fields.SubmitField(_('Send'))\n", "path": "core/admin/mailu/ui/forms.py"}], "after_files": [{"content": "from wtforms import validators, fields, widgets\nfrom wtforms_components import fields as fields_\nfrom flask_babel import lazy_gettext as _\n\nimport flask_login\nimport flask_wtf\nimport re\n\nLOCALPART_REGEX = \"^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*$\"\n\nclass DestinationField(fields.SelectMultipleField):\n    \"\"\" Allow for multiple emails selection from current user choices and\n    additional email addresses.\n    \"\"\"\n\n    validator = re.compile(r'^.+@([^.@][^@]+)$', re.IGNORECASE)\n\n    def iter_choices(self):\n        managed = [\n            str(email)\n            for email in flask_login.current_user.get_managed_emails()\n        ]\n        for email in managed:\n            selected = self.data is not None and self.coerce(email) in self.data\n            yield (email, email, selected)\n        for email in self.data or ():\n            if email not in managed:\n                yield (email, email, True)\n\n    def pre_validate(self, form):\n        for item in self.data:\n            if not self.validator.match(item):\n                raise validators.ValidationError(_('Invalid email address.'))\n\nclass MultipleEmailAddressesVerify(object):\n    def __init__(self,message=_('Invalid email address.')):\n        self.message = message\n\n    def __call__(self, form, field):\n        pattern = re.compile(r'^([_a-z0-9\\-\\+]+)(\\.[_a-z0-9\\-\\+]+)*@([a-z0-9\\-]{1,}\\.)*([a-z]{1,})(,([_a-z0-9\\-\\+]+)(\\.[_a-z0-9\\-\\+]+)*@([a-z0-9\\-]{1,}\\.)*([a-z]{2,}))*$')\n        if not pattern.match(field.data.replace(\" \", \"\")):\n            raise validators.ValidationError(self.message)\n\nclass ConfirmationForm(flask_wtf.FlaskForm):\n    submit = fields.SubmitField(_('Confirm'))\n\nclass DomainForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Domain name'), [validators.DataRequired()])\n    max_users = fields_.IntegerField(_('Maximum user count'), [validators.NumberRange(min=-1)], default=10)\n    max_aliases = fields_.IntegerField(_('Maximum alias count'), [validators.NumberRange(min=-1)], default=10)\n    max_quota_bytes = fields_.IntegerSliderField(_('Maximum user quota'), default=0)\n    signup_enabled = fields.BooleanField(_('Enable sign-up'), default=False)\n    comment = fields.StringField(_('Comment'))\n    submit = fields.SubmitField(_('Save'))\n\n\nclass DomainSignupForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Domain name'), [validators.DataRequired()])\n    localpart = fields.StringField(_('Initial admin'), [validators.DataRequired()])\n    pw = fields.PasswordField(_('Admin password'), [validators.DataRequired()])\n    pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])\n    captcha = flask_wtf.RecaptchaField()\n    submit = fields.SubmitField(_('Create'))\n\n\nclass AlternativeForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Alternative name'), [validators.DataRequired()])\n    submit = fields.SubmitField(_('Save'))\n\n\nclass RelayForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Relayed domain name'), [validators.DataRequired()])\n    smtp = fields.StringField(_('Remote host'))\n    comment = fields.StringField(_('Comment'))\n    submit = fields.SubmitField(_('Save'))\n\n\nclass UserForm(flask_wtf.FlaskForm):\n    localpart = fields.StringField(_('E-mail'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])\n    pw = fields.PasswordField(_('Password'))\n    pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])\n    quota_bytes = fields_.IntegerSliderField(_('Quota'), default=10**9)\n    enable_imap = fields.BooleanField(_('Allow IMAP access'), default=True)\n    enable_pop = fields.BooleanField(_('Allow POP3 access'), default=True)\n    displayed_name = fields.StringField(_('Displayed name'))\n    comment = fields.StringField(_('Comment'))\n    enabled = fields.BooleanField(_('Enabled'), default=True)\n    submit = fields.SubmitField(_('Save'))\n\n\nclass UserSignupForm(flask_wtf.FlaskForm):\n    localpart = fields.StringField(_('Email address'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])\n    pw = fields.PasswordField(_('Password'), [validators.DataRequired()])\n    pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])\n    submit = fields.SubmitField(_('Sign up'))\n\nclass UserSignupFormCaptcha(UserSignupForm):\n    captcha = flask_wtf.RecaptchaField()\n\nclass UserSettingsForm(flask_wtf.FlaskForm):\n    displayed_name = fields.StringField(_('Displayed name'))\n    spam_enabled = fields.BooleanField(_('Enable spam filter'))\n    spam_threshold = fields_.IntegerSliderField(_('Spam filter tolerance'))\n    forward_enabled = fields.BooleanField(_('Enable forwarding'))\n    forward_keep = fields.BooleanField(_('Keep a copy of the emails'))\n    forward_destination = fields.StringField(_('Destination'), [validators.Optional(), MultipleEmailAddressesVerify()])\n    submit = fields.SubmitField(_('Save settings'))\n\n\nclass UserPasswordForm(flask_wtf.FlaskForm):\n    pw = fields.PasswordField(_('Password'), [validators.DataRequired()])\n    pw2 = fields.PasswordField(_('Password check'), [validators.DataRequired()])\n    submit = fields.SubmitField(_('Update password'))\n\n\nclass UserReplyForm(flask_wtf.FlaskForm):\n    reply_enabled = fields.BooleanField(_('Enable automatic reply'))\n    reply_subject = fields.StringField(_('Reply subject'))\n    reply_body = fields.StringField(_('Reply body'),\n        widget=widgets.TextArea())\n    reply_startdate = fields.html5.DateField(_('Start of vacation'))\n    reply_enddate = fields.html5.DateField(_('End of vacation'))\n    submit = fields.SubmitField(_('Update'))\n\n\nclass TokenForm(flask_wtf.FlaskForm):\n    displayed_password = fields.StringField(\n        _('Your token (write it down, as it will never be displayed again)')\n    )\n    raw_password = fields.HiddenField([validators.DataRequired()])\n    comment = fields.StringField(_('Comment'))\n    ip = fields.StringField(\n        _('Authorized IP'), [validators.Optional(), validators.IPAddress(ipv6=True)]\n    )\n    submit = fields.SubmitField(_('Save'))\n\n\nclass AliasForm(flask_wtf.FlaskForm):\n    localpart = fields.StringField(_('Alias'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])\n    wildcard = fields.BooleanField(\n        _('Use SQL LIKE Syntax (e.g. for catch-all aliases)'))\n    destination = DestinationField(_('Destination'))\n    comment = fields.StringField(_('Comment'))\n    submit = fields.SubmitField(_('Save'))\n\n\nclass AdminForm(flask_wtf.FlaskForm):\n    admin = fields.SelectField(_('Admin email'), choices=[])\n    submit = fields.SubmitField(_('Submit'))\n\n\nclass ManagerForm(flask_wtf.FlaskForm):\n    manager = fields.SelectField(_('Manager email'))\n    submit = fields.SubmitField(_('Submit'))\n\n\nclass FetchForm(flask_wtf.FlaskForm):\n    protocol = fields.SelectField(_('Protocol'), choices=[\n        ('imap', 'IMAP'), ('pop3', 'POP3')\n    ])\n    host = fields.StringField(_('Hostname or IP'), [validators.DataRequired()])\n    port = fields.IntegerField(_('TCP port'), [validators.DataRequired(), validators.NumberRange(min=0, max=65535)])\n    tls = fields.BooleanField(_('Enable TLS'))\n    username = fields.StringField(_('Username'), [validators.DataRequired()])\n    password = fields.PasswordField(_('Password'))\n    keep = fields.BooleanField(_('Keep emails on the server'))\n    submit = fields.SubmitField(_('Submit'))\n\n\nclass AnnouncementForm(flask_wtf.FlaskForm):\n    announcement_subject = fields.StringField(_('Announcement subject'),\n        [validators.DataRequired()])\n    announcement_body = fields.StringField(_('Announcement body'),\n        [validators.DataRequired()], widget=widgets.TextArea())\n    submit = fields.SubmitField(_('Send'))\n", "path": "core/admin/mailu/ui/forms.py"}]}