diff -r -C4 roundup.original/mailgw.py roundup/mailgw.py
*** roundup.original/mailgw.py	2006-11-10 08:40:45.000000000 +0000
--- roundup/mailgw.py	2006-11-10 08:40:59.000000000 +0000
***************
*** 427,440 ****
  
          return 0
  
  
!     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
          try:
--- 427,445 ----
  
          return 0
  
  
!     def do_apop(self, server, user='', password='', ssl=False):
          ''' Do authentication POP
          '''
!         self._do_pop(server, user, password, True, ssl)
  
!     def do_pop(self, server, user='', password='', ssl=False):
!         ''' Do plain POP
!         '''
!         self._do_pop(server, user, password, False, ssl)
! 
!     def _do_pop(self, server, user, password, apop, ssl):
          '''Read a series of messages from the specified POP server.
          '''
          import getpass, poplib, socket
          try:
***************
*** 448,456 ****
              return 1
  
          # open a connection to the server and retrieve all messages
          try:
!             server = poplib.POP3(server)
          except socket.error:
              self.logger.exception('POP server error')
              return 1
          if apop:
--- 453,465 ----
              return 1
  
          # open a connection to the server and retrieve all messages
          try:
!             if ssl:
!                 klass = poplib.POP3_SSL
!             else:
!                 klass = poplib.POP3
!             server = klass(server)
          except socket.error:
              self.logger.exception('POP server error')
              return 1
          if apop:
diff -r -C4 roundup.original/scripts/roundup_mailgw.py roundup/scripts/roundup_mailgw.py
*** roundup.original/scripts/roundup_mailgw.py	2006-11-10 08:40:45.000000000 +0000
--- roundup/scripts/roundup_mailgw.py	2006-11-10 08:40:59.000000000 +0000
***************
*** 77,84 ****
--- 77,88 ----
      pop server
   are both valid. The username and/or password will be prompted for if
   not supplied on the command-line.
  
+ POPS:
+  Connect to a POP server over ssl. This requires python 2.4 or later.
+  This supports the same notation as POP.
+ 
  APOP:
   Same as POP, but using Authenticated POP:
      apop username:password@server
  
***************
*** 153,166 ****
                  socket.setdefaulttimeout(60)
  
          if source == 'mailbox':
              return handler.do_mailbox(specification)
!         elif source == 'pop':
              m = re.match(r'((?P<user>[^:]+)(:(?P<pass>.+))?@)?(?P<server>.+)',
                  specification)
              if m:
                  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)
--- 157,173 ----
                  socket.setdefaulttimeout(60)
  
          if source == 'mailbox':
              return handler.do_mailbox(specification)
!         elif source == 'pop' or source == 'pops':
              m = re.match(r'((?P<user>[^:]+)(:(?P<pass>.+))?@)?(?P<server>.+)',
                  specification)
              if m:
+                 ssl = source.endswith('s')
+                 if ssl and sys.version_info<(2,4):
+                     return usage(argv, _('Error: a later version of python is required'))
                  return handler.do_pop(m.group('server'), m.group('user'),
!                     m.group('pass'),ssl)
              return usage(argv, _('Error: pop specification not valid'))
          elif source == 'apop':
              m = re.match(r'((?P<user>[^:]+)(:(?P<pass>.+))?@)?(?P<server>.+)',
                  specification)
***************
*** 171,181 ****
          elif source == 'imap' or source == 'imaps':
              m = re.match(r'((?P<user>[^:]+)(:(?P<pass>.+))?@)?(?P<server>.+)',
                  specification)
              if m:
!                 ssl = 0
!                 if source == 'imaps':
!                     ssl = 1
                  mailbox = ''
                  if len(args) > 3:
                      mailbox = args[3]
                  return handler.do_imap(m.group('server'), m.group('user'),
--- 178,186 ----
          elif source == 'imap' or source == 'imaps':
              m = re.match(r'((?P<user>[^:]+)(:(?P<pass>.+))?@)?(?P<server>.+)',
                  specification)
              if m:
!                 ssl = source.endswith('s')
                  mailbox = ''
                  if len(args) > 3:
                      mailbox = args[3]
                  return handler.do_imap(m.group('server'), m.group('user'),

 	  	 
