mirror of
				https://github.com/optim-enterprises-bv/Mailu.git
				synced 2025-10-31 01:57:59 +00:00 
			
		
		
		
	RECIPIENT_DELIMITER can have several characters
(cherry picked from commit 14360f8926)
# Conflicts:
#	core/admin/mailu/configuration.py
#	core/admin/mailu/internal/views/postfix.py
			
			
This commit is contained in:
		 Florent Daigniere
					Florent Daigniere
				
			
				
					committed by
					
						 Mergify
						Mergify
					
				
			
			
				
	
			
			
			 Mergify
						Mergify
					
				
			
						parent
						
							1592f348b2
						
					
				
				
					commit
					e6a1eb828f
				
			| @@ -58,12 +58,16 @@ DEFAULT_CONFIG = { | ||||
|     'DKIM_PATH': '/dkim/{domain}.{selector}.key', | ||||
|     'DEFAULT_QUOTA': 1000000000, | ||||
|     'MESSAGE_RATELIMIT': '200/day', | ||||
| <<<<<<< HEAD | ||||
| <<<<<<< HEAD | ||||
|     'MESSAGE_RATELIMIT_EXEMPTION': '', | ||||
|     'RECIPIENT_DELIMITER': '', | ||||
| ======= | ||||
|     'RECIPIENT_DELIMITER': None, | ||||
| >>>>>>> 8c59f356 (use RECIPIENT_DELIMITER for splitting) | ||||
| ======= | ||||
|     'RECIPIENT_DELIMITER': '', | ||||
| >>>>>>> 14360f89 (RECIPIENT_DELIMITER can have several characters) | ||||
|     # Web settings | ||||
|     'SITENAME': 'Mailu', | ||||
|     'WEBSITE': 'https://mailu.io', | ||||
|   | ||||
| @@ -145,6 +145,7 @@ def postfix_sender_login(sender): | ||||
|     if localpart is None: | ||||
|         return flask.jsonify(",".join(wildcard_senders)) if wildcard_senders else flask.abort(404) | ||||
| <<<<<<< HEAD | ||||
| <<<<<<< HEAD | ||||
| <<<<<<< HEAD | ||||
|     localpart = localpart[:next((i for i, ch in enumerate(localpart) if ch in flask.current_app.config.get('RECIPIENT_DELIMITER')), None)] | ||||
|     destinations = set(models.Email.resolve_destination(localpart, domain_name, True) or []) | ||||
| @@ -159,6 +160,9 @@ def postfix_sender_login(sender): | ||||
| ======= | ||||
|     if delim := flask.current_app.config.get('RECIPIENT_DELIMITER'): | ||||
|         localpart = localpart.split(delim, 1)[0] | ||||
| ======= | ||||
|     localpart = localpart[:next((i for i, ch in enumerate(localpart) if ch in flask.current_app.config.get('RECIPIENT_DELIMITER')), None)] | ||||
| >>>>>>> 14360f89 (RECIPIENT_DELIMITER can have several characters) | ||||
|     destination = models.Email.resolve_destination(localpart, domain_name, True) | ||||
| >>>>>>> 8c59f356 (use RECIPIENT_DELIMITER for splitting) | ||||
|     destination = [*destination, *wildcard_senders] if destination else [*wildcard_senders] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user