From 925e96f24fe92c9d5a87efd55c2ff69a5980d082 Mon Sep 17 00:00:00 2001 From: prasad83 Date: Tue, 4 Jul 2023 01:02:53 +0530 Subject: [PATCH 1/3] Fixed zope.interface import localmail_tap.py Use (classImplements) instead of (implements) --- twisted/plugins/localmail_tap.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/twisted/plugins/localmail_tap.py b/twisted/plugins/localmail_tap.py index 5c6d154..59f60b6 100644 --- a/twisted/plugins/localmail_tap.py +++ b/twisted/plugins/localmail_tap.py @@ -13,7 +13,11 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -from zope.interface import implements +try: + from zope.interface import implements +except: + # 6.0+ + from zope.interface import classImplements as implements from twisted.application import service from twisted import plugin From 0d414bab9aade394ee9aa53a2dd3309cd9e5e38b Mon Sep 17 00:00:00 2001 From: prasad83 Date: Tue, 4 Jul 2023 01:05:34 +0530 Subject: [PATCH 2/3] Fixed zope.interface import in cred.py Use (classImplements) instead of implements --- localmail/cred.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/localmail/cred.py b/localmail/cred.py index 30acf8c..9b9d949 100644 --- a/localmail/cred.py +++ b/localmail/cred.py @@ -13,7 +13,13 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -from zope.interface import implements +try: + # old + from zope.interface import implements +except: + # 6.0+ + from zope.interface import classImplements as implements + from twisted.internet import defer from twisted.cred import portal, checkers, credentials from twisted.mail import smtp, imap4 From ccf7051403b1f0a024a5968e6ce4e37a1e45bce6 Mon Sep 17 00:00:00 2001 From: prasad83 Date: Tue, 4 Jul 2023 01:08:26 +0530 Subject: [PATCH 3/3] Updated twistd command invoke. --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index c3dc6c7..9dad087 100644 --- a/README.rst +++ b/README.rst @@ -37,7 +37,7 @@ Running localmail .. code-block:: bash - twistd localmail + twistd -y localmail mail This will run localmail in the background, SMTP on port 2025 and IMAP on 2143, It will log to a file ./twistd.log. Use the -n option if you want to run in @@ -45,14 +45,14 @@ the foreground, like so. .. code-block:: bash - twistd -n localmail + twistd -n -y localmail mail You can pass in arguments to control parameters. .. code-block:: bash - twistd localmail --imap --smtp --http --file localmail.mbox + twistd localmail --imap --smtp --http --file localmail.mbox You can have localmail use random ports if you like. The port numbers will be logged.