From b7e578ad4f8c1d0f71b1ba2db6c1a5ac804b1c6b Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 24 Mar 2003 02:56:30 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1620 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/mailgw.py | 4 ++-- roundup/scripts/roundup_mailgw.py | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/roundup/mailgw.py b/roundup/mailgw.py index c7a8b68..94594de 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.112 2003-03-24 02:51:21 richard Exp $ +$Id: mailgw.py,v 1.113 2003-03-24 02:54:35 richard Exp $ ''' import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri @@ -219,7 +219,7 @@ class MailGW: def do_apop(self, server, user='', password=''): ''' Do authentication POP ''' - self.do_pop(server, user, password, apop=1): + 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. diff --git a/roundup/scripts/roundup_mailgw.py b/roundup/scripts/roundup_mailgw.py index 7d34607..891ba7f 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.8 2003-03-24 02:51:22 richard Exp $ +# $Id: roundup_mailgw.py,v 1.9 2003-03-24 02:56:30 richard Exp $ # python version check from roundup import version_check @@ -69,7 +69,8 @@ POP: not supplied on the command-line. APOP: - Same as POP, but using Authenticated POP + Same as POP, but using Authenticated POP: + apop username:password@server ''') return 1 @@ -122,8 +123,15 @@ def main(argv): return handler.do_pop(m.group('server'), m.group('user'), m.group('pass')) return usage(argv, _('Error: pop specification not valid')) + elif source == 'apop': + m = re.match(r'((?P[^:]+)(:(?P.+))?@)?(?P.+)', + specification) + if m: + return handler.do_apop(m.group('server'), m.group('user'), + m.group('pass')) + return usage(argv, _('Error: apop specification not valid')) - return usage(argv, _('Error: The source must be either "mailbox" or "pop"')) + return usage(argv, _('Error: The source must be either "mailbox", "pop" or "apop"')) finally: db.close() -- 2.30.2