summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d86c5c5)
raw | patch | inline | side by side (parent: d86c5c5)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 24 Mar 2003 02:56:30 +0000 (02:56 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Mon, 24 Mar 2003 02:56:30 +0000 (02:56 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1620 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/mailgw.py | patch | blob | history | |
roundup/scripts/roundup_mailgw.py | patch | blob | history |
diff --git a/roundup/mailgw.py b/roundup/mailgw.py
index c7a8b68f75913961e1619c1391b437b4faa38492..94594de1a938d88703409e2c841be2f9998ba8c5 100644 (file)
--- a/roundup/mailgw.py
+++ b/roundup/mailgw.py
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
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.
index 7d34607a56e47bdf9b2c906ac70dbe6f88aed9b8..891ba7f0c8dde4071c9435cc4d8b08b9284e1176 100644 (file)
# 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
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
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<user>[^:]+)(:(?P<pass>.+))?@)?(?P<server>.+)',
+ 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()