Skip to content
Snippets Groups Projects
Commit eeefea97 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Fixed relay host strip in email test.

parent 3f081915
No related branches found
No related tags found
No related merge requests found
...@@ -68,7 +68,7 @@ def check_relay(): ...@@ -68,7 +68,7 @@ def check_relay():
print('Checking if SMTP relay conforms to conf.') print('Checking if SMTP relay conforms to conf.')
status, out = subprocess.getstatusoutput('grep relayhost /etc/postfix/main.cf') status, out = subprocess.getstatusoutput('grep relayhost /etc/postfix/main.cf')
if status == 0: if status == 0:
configured_relay = out[len('relayhost'):].strip().replace('[', '').replace(']', '') configured_relay = out[len('relayhost'):].strip(' \t=').replace('[', '').replace(']', '')
else: else:
configured_relay = '' configured_relay = ''
if not configured_relay: if not configured_relay:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment