diff --git a/tests/test_email.py b/tests/test_email.py index 70aa53a146d1952fbd9c49cd9fd577b4ce3bb286..34314644c41ccfdc185c57804f36d86f2adde539 100755 --- a/tests/test_email.py +++ b/tests/test_email.py @@ -11,6 +11,7 @@ import random import time import imp +YELLOW = '\033[93m' GREEN = '\033[92m' RED = '\033[91m' DEF = '\033[0m' @@ -28,6 +29,10 @@ def print_color(txt, col): print('%s%s%s' % (col, txt, DEF)) +def print_yellow(txt): + print_color(txt, YELLOW) + + def print_red(txt): print_color(txt, RED) @@ -62,8 +67,8 @@ def check_relay(): with open('/etc/mailname', 'r') as f: d = f.read().strip() if d not in ('ubicast.tv', 'ubicast.eu'): - print_red('/etc/mailname does not contain ubicast.eu or ubicast.tv, mails will probably not be received on ubicast mailing lists') - return 2 + print_yellow('/etc/mailname does not contain ubicast.eu or ubicast.tv, mails will probably not be received on ubicast mailing lists') + return 3 # check spf status, output = subprocess.getstatusoutput('host -t TXT ubicast.eu') if ip not in output: