From: richard Date: Mon, 24 Mar 2003 02:51:22 +0000 (+0000) Subject: roundup mailgw now handles apop X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d86c5c5563cbad23210cb3ead9df8fff0c9f2918;p=roundup.git roundup mailgw now handles apop git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1619 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index 18d7616..f811fcb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -51,6 +51,7 @@ Feature: - role names made case insensitive - added ability to restore retired nodes - more lenient date input and addition Interval input support (sf bug 677764) +- roundup mailgw now handles apop Fixed: diff --git a/roundup/mailgw.py b/roundup/mailgw.py index 53dc041..c7a8b68 100644 --- a/roundup/mailgw.py +++ b/roundup/mailgw.py @@ -73,7 +73,7 @@ are calling the create() method to create a new node). If an auditor raises an exception, the original message is bounced back to the sender with the explanatory message given in the exception. -$Id: mailgw.py,v 1.111 2003-02-27 05:43:01 richard Exp $ +$Id: mailgw.py,v 1.112 2003-03-24 02:51:21 richard Exp $ ''' import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri @@ -216,7 +216,12 @@ class MailGW: fcntl.flock(f.fileno(), FCNTL.LOCK_UN) return 0 - def do_pop(self, server, user='', password=''): + def do_apop(self, server, user='', password=''): + ''' Do authentication POP + ''' + self.do_pop(server, user, password, apop=1): + + def do_pop(self, server, user='', password='', apop=0): '''Read a series of messages from the specified POP server. ''' import getpass, poplib, socket @@ -236,8 +241,11 @@ class MailGW: except socket.error, message: print "POP server error:", message return 1 - server.user(user) - server.pass_(password) + if apop: + server.apop(user, password) + else: + server.user(user) + server.pass_(password) numMessages = len(server.list()[1]) for i in range(1, numMessages+1): # retr: returns diff --git a/roundup/scripts/roundup_mailgw.py b/roundup/scripts/roundup_mailgw.py index 6849a6f..7d34607 100644 --- a/roundup/scripts/roundup_mailgw.py +++ b/roundup/scripts/roundup_mailgw.py @@ -14,7 +14,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundup_mailgw.py,v 1.7 2003-01-12 00:03:11 richard Exp $ +# $Id: roundup_mailgw.py,v 1.8 2003-03-24 02:51:22 richard Exp $ # python version check from roundup import version_check @@ -67,6 +67,10 @@ POP: pop server are both valid. The username and/or password will be prompted for if not supplied on the command-line. + +APOP: + Same as POP, but using Authenticated POP + ''') return 1