diff roundup/scripts/roundup_mailgw.py @ 1548:c36df13925f9

*** empty log message ***
author Richard Jones <richard@users.sourceforge.net>
date Mon, 24 Mar 2003 02:56:30 +0000
parents f478c236b1f6
children 8b0bd0b897e6
line wrap: on
line diff
--- a/roundup/scripts/roundup_mailgw.py	Mon Mar 24 02:51:22 2003 +0000
+++ b/roundup/scripts/roundup_mailgw.py	Mon Mar 24 02:56:30 2003 +0000
@@ -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 @@
  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 @@
                 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()
 

Roundup Issue Tracker: http://roundup-tracker.org/