mirror of
				https://github.com/optim-enterprises-bv/Mailu.git
				synced 2025-10-31 18:18:05 +00:00 
			
		
		
		
	Remove the dependency to mailustart, introducing socrate
This commit is contained in:
		| @@ -1,5 +1,6 @@ | ||||
| import os | ||||
| from mailustart import resolve | ||||
|  | ||||
| from socrate import system | ||||
|  | ||||
| DEFAULT_CONFIG = { | ||||
|     # Specific to the admin UI | ||||
| @@ -72,16 +73,15 @@ class ConfigManager(dict): | ||||
|         'mysql': 'mysql://{DB_USER}:{DB_PW}@{DB_HOST}/{DB_NAME}' | ||||
|     } | ||||
|  | ||||
|     HOSTS = ('HOST_IMAP', 'HOST_POP3', 'HOST_AUTHSMTP', 'HOST_SMTP', | ||||
|              'HOST_WEBMAIL') | ||||
|  | ||||
|     def __init__(self): | ||||
|         self.config = dict() | ||||
|  | ||||
|     def resolve_host(self): | ||||
|         self.config['HOST_IMAP'] = resolve(self.config['HOST_IMAP']) | ||||
|         self.config['HOST_POP3'] = resolve(self.config['HOST_POP3']) | ||||
|         self.config['HOST_AUTHSMTP'] = resolve(self.config['HOST_AUTHSMTP']) | ||||
|         self.config['HOST_SMTP'] = resolve(self.config['HOST_SMTP']) | ||||
|         if self.config['WEBMAIL'] != 'none': | ||||
|             self.config['HOST_WEBMAIL'] = resolve(self.config['HOST_WEBMAIL']) | ||||
|         for item in self.HOSTS: | ||||
|             self.config[item] = system.resolve_address(self.config[item]) | ||||
|  | ||||
|     def __coerce_value(self, value): | ||||
|         if isinstance(value, str) and value.lower() in ('true','yes'): | ||||
|   | ||||
| @@ -10,6 +10,7 @@ Flask-debugtoolbar | ||||
| Flask-limiter | ||||
| redis | ||||
| WTForms-Components | ||||
| socrate | ||||
| passlib | ||||
| gunicorn | ||||
| tabulate | ||||
| @@ -20,3 +21,4 @@ bcrypt | ||||
| tenacity | ||||
| mysqlclient | ||||
| psycopg2 | ||||
| idna | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 kaiyou
					kaiyou