From 8690d9ee068238b2a623bfefd96d44aeaf32a63f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= <hugo@lysator.liu.se>
Date: Fri, 18 Sep 2020 00:06:15 +0200
Subject: [PATCH] Limit to only massutksick.

---
 main.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/main.py b/main.py
index 52ae2aa..2f3b8de 100644
--- a/main.py
+++ b/main.py
@@ -17,6 +17,10 @@ class CustomSMTPServer(smtpd.SMTPServer):
             print("Title missing")
             return
 
+        if 'massutskick@vastgota.nation.liu.se' not in msg.get('To'):
+            print('Will only publish massutskick')
+            return
+
         title = re.sub('^\[.*\] *', '', title)
 
         subprocess.run(['wp', 'post', 'create',
-- 
GitLab