You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-11-23 22:04:47 +02:00
Merge #2007
2007: allow sending emails as user+detail@domain.tld r=mergify[bot] a=ghostwheel42 ## What type of PR? bug-fix or enhancement ## What does this PR do? Allows sending emails with an added "+detail" in the local part. ### Related issue(s) closes #1948 ## Prerequisites Before we can consider review and merge, please make sure the following list is done and checked. If an entry in not applicable, you can check it or remove it from the list. - [ ] In case of feature or enhancement: documentation updated accordingly - [X] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file. Co-authored-by: Alexander Graf <ghostwheel42@users.noreply.github.com> Co-authored-by: root <ghostwheel42@users.noreply.github.com> Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
This commit is contained in:
@@ -49,6 +49,7 @@ DEFAULT_CONFIG = {
|
||||
'DKIM_PATH': '/dkim/{domain}.{selector}.key',
|
||||
'DEFAULT_QUOTA': 1000000000,
|
||||
'MESSAGE_RATELIMIT': '200/day',
|
||||
'RECIPIENT_DELIMITER': '',
|
||||
# Web settings
|
||||
'SITENAME': 'Mailu',
|
||||
'WEBSITE': 'https://mailu.io',
|
||||
|
||||
@@ -140,6 +140,7 @@ def postfix_sender_login(sender):
|
||||
localpart, domain_name = models.Email.resolve_domain(sender)
|
||||
if localpart is None:
|
||||
return flask.jsonify(",".join(wildcard_senders)) if wildcard_senders else flask.abort(404)
|
||||
localpart = localpart[:next((i for i, ch in enumerate(localpart) if ch in flask.current_app.config.get('RECIPIENT_DELIMITER')), None)]
|
||||
destination = models.Email.resolve_destination(localpart, domain_name, True)
|
||||
destination = [*destination, *wildcard_senders] if destination else [*wildcard_senders]
|
||||
return flask.jsonify(",".join(destination)) if destination else flask.abort(404)
|
||||
|
||||
Reference in New Issue
Block a user