1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-06-02 23:17:26 +02:00

As per review

This commit is contained in:
Florent Daigniere 2023-08-28 11:49:42 +02:00
parent 086c05a42c
commit bbed508e8b
2 changed files with 3 additions and 1 deletions

View File

@ -97,7 +97,7 @@ def set_env(required_secrets=[], log_filters=[], log_file=None):
for secret in required_secrets:
os.environ[f'{secret}_KEY'] = hmac.new(bytearray(secret_key, 'utf-8'), bytearray(secret, 'utf-8'), 'sha256').hexdigest()
os.system('find / -xdev -type f -name \*.pid -print -delete')
os.system('find /run -xdev -type f -name \*.pid -print -delete')
return {
key: _coerce_value(os.environ.get(key, value))

View File

@ -16,6 +16,8 @@ system.set_env(log_filters=[
r'discarding EHLO keywords\: PIPELINING$',
], log_file=os.environ.get('POSTFIX_LOG_FILE'))
os.system("flock -n /queue/pid/master.pid rm /queue/pid/master.pid")
def start_podop():
system.drop_privs_to('postfix')
os.makedirs('/dev/shm/postfix',mode=0o700, exist_ok=True)