Skip to content
Snippets Groups Projects
Commit e496ffb6 authored by Florent Thiery's avatar Florent Thiery
Browse files

ensure that mailname contains ubicast.eu or ubicast.tv refs #20817

parent bfdbec73
No related branches found
No related tags found
No related merge requests found
......@@ -65,9 +65,9 @@ def check_relay():
if not ip:
ip = conf.get('NETWORK_IP')
with open('/etc/mailname', 'r') as f:
d = f.read()
if domain != 'ubicast.tv' and domain not in d:
print_red('/etc/mailname does not contain the server domain, emails will probably be treated as spam')
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 False
if not check_spf(ip):
print_red('ip %s is not in ubicast.eu SPF and emails sent from support@ubicast.eu will be treated as spam' % ip)
......
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