Skip to content
Snippets Groups Projects
Commit 93a5d716 authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Allow multiple different destinations.

parent 8690d9ee
Branches
Tags
No related merge requests found
main.py 100644 → 100755
#!/usr/bin/env python3
import smtpd
import asyncore
from email import message_from_bytes
......@@ -17,7 +19,15 @@ class CustomSMTPServer(smtpd.SMTPServer):
print("Title missing")
return
if 'massutskick@vastgota.nation.liu.se' not in msg.get('To'):
valid_destinations = [
'massutskick@vastgota.nation.liu.se',
'massutskick@vastgota.lysator.liu.se',
]
for destination in valid_destinations:
if destination in msg.get('To'):
break
else:
print('Will only publish massutskick')
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment