Repository: Mailu/Mailu

Issue:
Cannot receive email on aliases anymore.
## Environment & Versions
### Environment
 - [X] docker-compose

### Versions
master

## Description
Email sent to aliases serviced by Mailu are rejected.

`550 5.1.1 <alias@mailu-serviced.domain>: Recipient address rejected: User unknown in virtual mailbox table`

All aliases are still present in the admin panel.

## Replication Steps
Deploy current master, send email to alias.

## Expected behaviour
Email is accepted and delivered to mailbox.

## Logs
```
smtp_1       | Jul 03 00:47:21 hostname postfix/smtpd[392]: NOQUEUE: reject: RCPT from mail-wm1-x334.google.com[2a00:1450:4864:20::334]: 550 5.1.1 <alias@mailu-serviced.domain>: Recipient address rejected: User unknown in virtual mailbox table; from=<someone@googlemail.com> to=<alias@mailu-serviced.domain> proto=ESMTP helo=<mail-wm1-x334.google.com>           
```



Discussion:
I can confirm this, the same issue is happening on my instance.
The culprit seems to be this commit: https://github.com/Mailu/Mailu/commit/c24bff1c1be3980892fddb13a139b8142bb71f96

This line, and the three others regarding `cls.wildcard` (L634, L646, L649) were changed from `==` to `is`: https://github.com/Mailu/Mailu/blob/master/core/admin/mailu/models.py#L631

Changing it back to `==` fixes the issue.

Can confirm building `admin` with those lines changed back to `==` fixes the problem.

Resolving patch:
diff --git a/core/admin/mailu/models.py b/core/admin/mailu/models.py
--- a/core/admin/mailu/models.py
+++ b/core/admin/mailu/models.py
@@ -628,10 +628,10 @@ def resolve(cls, localpart, domain_name):
                 sqlalchemy.and_(cls.domain_name == domain_name,
                     sqlalchemy.or_(
                         sqlalchemy.and_(
-                            cls.wildcard is False,
+                            cls.wildcard == False,
                             cls.localpart == localpart
                         ), sqlalchemy.and_(
-                            cls.wildcard is True,
+                            cls.wildcard == True,
                             sqlalchemy.bindparam('l', localpart).like(cls.localpart)
                         )
                     )
@@ -643,10 +643,10 @@ def resolve(cls, localpart, domain_name):
                 sqlalchemy.and_(cls.domain_name == domain_name,
                     sqlalchemy.or_(
                         sqlalchemy.and_(
-                            cls.wildcard is False,
+                            cls.wildcard == False,
                             sqlalchemy.func.lower(cls.localpart) == localpart_lower
                         ), sqlalchemy.and_(
-                            cls.wildcard is True,
+                            cls.wildcard == True,
                             sqlalchemy.bindparam('l', localpart_lower).like(
                                 sqlalchemy.func.lower(cls.localpart))
                         )
diff --git a/core/admin/mailu/schemas.py b/core/admin/mailu/schemas.py
--- a/core/admin/mailu/schemas.py
+++ b/core/admin/mailu/schemas.py
@@ -590,7 +590,7 @@ def _deserialize(self, value, attr, data, **kwargs):
                 value = value[:pos]
             else:
                 footer = '-----END PRIVATE KEY-----'
-        except ValueError:
+        except ValueError as exc:
             raise ValidationError(f'invalid dkim key {bad_key!r}') from exc
 
         # remove whitespace from key data


Test patch: