Repository: Mailu/Mailu

Issue:
Cant setup forward to short-named email address. 
### Environment
 - docker-compose


### Versions
```
docker ps -a | grep mailu/admin
f14b60868ade   mailu/admin:1.9       "/bin/sh -c /start.py"   7 weeks ago   Up 7 weeks (healthy)   80/tcp                                                                                                                                                                                                                   mailu-admin-1
```

## Description
User have email-address like ab@c.de . I cant setup forward to this email via WebUI or CLI

## Replication Steps
Setup forward for user to email like ab@c.de  



Discussion:
I can replicate it as well on the demo site test.mailu.io.

The regex for checking the email addresses for this field must be invalid.
https://github.com/Mailu/Mailu/blob/cb70f10a49f5f9c67d688a1a2eb282bd966cab4f/core/admin/mailu/ui/forms.py#L40


@Diman0 You can change the regex to the following to allow one-letter domains:

re.compile(r'^([_a-z0-9\-]+)(\.[_a-z0-9\-]+)*@([a-z0-9\-]+\.)*([a-z]{2,})(,([_a-z0-9\-]+)(\.[_a-z0-9\-]+)*@([a-z0-9\-]+\.)*([a-z]{2,}))*$')

Technically a one-letter TLD it's possible but AFAIK there is none as of today. The regex could also be refined further to really only match valid domains.

Alex
> @Diman0 You can change the regex to the following to allow one-letter domains:
> 
> re.compile(r'^([_a-z0-9-]+)(.[_a-z0-9-]+)_@([a-z0-9-]+.)_([a-z]{2,})(,([_a-z0-9-]+)(.[_a-z0-9-]+)_@([a-z0-9-]+.)_([a-z]{2,}))*$')
> 
> Technically a one-letter TLD it's possible but AFAIK there is none as of today. The regex could also be refined further to really only match valid domains.
> 
> Alex

```
dig m.ht mx +short
10 mail.m.ht.
```

> ^([_a-z0-9-]+)(.[_a-z0-9-]+)_@([a-z0-9-]+.)_([a-z]{2,})(,([_a-z0-9-]+)(.[_a-z0-9-]+)_@([a-z0-9-]+.)_([a-z]{2,}))*$

^([_a-z0-9-]+)(.[_a-z0-9-]+)@([a-z0-9-]+.)([a-z]{2,})(,([_a-z0-9-]+)(.[_a-z0-9-]+)@([a-z0-9-]+.)([a-z]{2,}))*$
When I test your regex  on regex101.com it does not work.

^([_a-z0-9-]+)(.[_a-z0-9-]+)@([a-z0-9-]+.)([a-z]{2,})(,([_a-z0-9-]+)(.[_a-z0-9-]+)@([a-z0-9-]+.)([a-z]{2,}))*$
The old regex does work on regex101.com.


This adapted regex also does work for me:
`^([_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,}))*$`
I can successfully test:
`a@a.com`
`a@a.com,a@a.com,b@b.ca`

Resolving patch:
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 @@ def __init__(self,message=_('Invalid email address.')):
         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)
 


Test patch: