From 3cbe8700c8c6cb1ac41b506681234f995ca979ba Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Mon, 1 Feb 2016 09:09:31 +0100 Subject: cern-scripts: restructure source directory --- .../src/main/resources/bin/smtp-server.py | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100755 packages/cern-scripts/src/main/resources/bin/smtp-server.py (limited to 'packages/cern-scripts/src/main/resources/bin/smtp-server.py') diff --git a/packages/cern-scripts/src/main/resources/bin/smtp-server.py b/packages/cern-scripts/src/main/resources/bin/smtp-server.py deleted file mode 100755 index 1cfef81..0000000 --- a/packages/cern-scripts/src/main/resources/bin/smtp-server.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python -import sys, os, mailbox, email, smtpd, asyncore - -class MaildirServer(smtpd.PureProxy): - def __init__(self, localaddr, remoteaddr): - smtpd.SMTPServer.__init__(self, localaddr, remoteaddr) - self.maildir = mailbox.Maildir("./Maildir", create=True) - def _deliver(self, mailfrom, rcpttos, data): - mail = email.message_from_string(data) - maildirMail = Message(mail) - self.maildir.add(maildirMail) - -if __name__ == '__main__': - muttrc = os.path.join(os.path.dirname(__file__), "muttrc") - print("Use `mutt -F {}' to read mails".format(muttrc)) - smtpd.DEBUGSTREAM = sys.stderr - server = MaildirServer(("0.0.0.0", 8025), (None, None)) - asyncore.loop() - -# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 -- cgit v1.2.1