Skip to content

Commit 7a9eaa6

Browse files
author
Richard Jones
committed
Sorry, another mega-patch:
- clarified windows service documentation (patch [SF#1597713]) - HTMLClass fixed to work with new item permissions check [SF#1602983] - support POP over SSL (patch [SF#1597703])
1 parent f642d7b commit 7a9eaa6

File tree

5 files changed

+35
-14
lines changed

5 files changed

+35
-14
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Fixed:
1111
- handling of required for boolean False and numeric 0 (sf bug 1608200)
1212
- removed bogus args attr of ConfigurationError (sf bug 1608056)
1313
- implemented start_response in roundup.cgi (sf bug 1604304)
14+
- clarified windows service documentation (sf patch 1597713)
15+
- HTMLClass fixed to work with new item permissions check (sf bug 1602983)
16+
- support POP over SSL (sf patch 1597703)
1417

1518

1619
2006-11-11 1.3.1

doc/admin_guide.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Administration Guide
33
====================
44

5-
:Version: $Revision: 1.20 $
5+
:Version: $Revision: 1.21 $
66

77
.. contents::
88

@@ -322,7 +322,7 @@ therefore may be controlled through the Services control panel. The
322322
roundup-server program may also control the service directly:
323323

324324
**install the service**
325-
``roundup-server -c install``
325+
``roundup-server -C /path/to/my/roundup-server.ini -c install``
326326
**start the service**
327327
``roundup-server -c start``
328328
**stop the service**
@@ -335,6 +335,10 @@ Windows 2000 and later
335335
Windows NT4
336336
Start/Control Panel/Services
337337

338+
You will need a server configuration file (as described in `Configuring roundup-server`_)
339+
for specifying tracker homes and other roundup-server configuration. Specify the name of this
340+
file using the ``-C`` switch when installing the service.
341+
338342
Running the Mail Gateway Script
339343
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
340344

roundup/cgi/templating.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def __getitem__(self, item):
534534
value = []
535535
else:
536536
value = None
537-
return htmlklass(self._client, self._classname, '', prop, item,
537+
return htmlklass(self._client, self._classname, None, prop, item,
538538
value, self._anonymous)
539539

540540
# no good

roundup/mailgw.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class node. Any parts of other types are each stored in separate files
7272
an exception, the original message is bounced back to the sender with the
7373
explanatory message given in the exception.
7474
75-
$Id: mailgw.py,v 1.178 2006-10-05 23:08:20 richard Exp $
75+
$Id: mailgw.py,v 1.179 2006-12-13 23:32:38 richard Exp $
7676
"""
7777
__docformat__ = 'restructuredtext'
7878

@@ -428,12 +428,17 @@ def do_imap(self, server, user='', password='', mailbox='', ssl=0):
428428
return 0
429429

430430

431-
def do_apop(self, server, user='', password=''):
431+
def do_apop(self, server, user='', password='', ssl=False):
432432
''' Do authentication POP
433433
'''
434-
self.do_pop(server, user, password, apop=1)
434+
self._do_pop(server, user, password, True, ssl)
435435

436-
def do_pop(self, server, user='', password='', apop=0):
436+
def do_pop(self, server, user='', password='', ssl=False):
437+
''' Do plain POP
438+
'''
439+
self._do_pop(server, user, password, False, ssl)
440+
441+
def _do_pop(self, server, user, password, apop, ssl):
437442
'''Read a series of messages from the specified POP server.
438443
'''
439444
import getpass, poplib, socket
@@ -449,7 +454,11 @@ def do_pop(self, server, user='', password='', apop=0):
449454

450455
# open a connection to the server and retrieve all messages
451456
try:
452-
server = poplib.POP3(server)
457+
if ssl:
458+
klass = poplib.POP3_SSL
459+
else:
460+
klass = poplib.POP3
461+
server = klass(server)
453462
except socket.error:
454463
self.logger.exception('POP server error')
455464
return 1

roundup/scripts/roundup_mailgw.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1515
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1616
#
17-
# $Id: roundup_mailgw.py,v 1.22 2006-07-15 10:08:01 schlatterbeck Exp $
17+
# $Id: roundup_mailgw.py,v 1.23 2006-12-13 23:32:39 richard Exp $
1818

1919
"""Command-line script stub that calls the roundup.mailgw.
2020
"""
@@ -78,6 +78,10 @@ def usage(args, message=None):
7878
are both valid. The username and/or password will be prompted for if
7979
not supplied on the command-line.
8080
81+
POPS:
82+
Connect to a POP server over ssl. This requires python 2.4 or later.
83+
This supports the same notation as POP.
84+
8185
APOP:
8286
Same as POP, but using Authenticated POP:
8387
apop username:password@server
@@ -154,12 +158,15 @@ def main(argv):
154158

155159
if source == 'mailbox':
156160
return handler.do_mailbox(specification)
157-
elif source == 'pop':
161+
elif source == 'pop' or source == 'pops':
158162
m = re.match(r'((?P<user>[^:]+)(:(?P<pass>.+))?@)?(?P<server>.+)',
159163
specification)
160164
if m:
165+
ssl = source.endswith('s')
166+
if ssl and sys.version_info<(2,4):
167+
return usage(argv, _('Error: a later version of python is required'))
161168
return handler.do_pop(m.group('server'), m.group('user'),
162-
m.group('pass'))
169+
m.group('pass'),ssl)
163170
return usage(argv, _('Error: pop specification not valid'))
164171
elif source == 'apop':
165172
m = re.match(r'((?P<user>[^:]+)(:(?P<pass>.+))?@)?(?P<server>.+)',
@@ -172,9 +179,7 @@ def main(argv):
172179
m = re.match(r'((?P<user>[^:]+)(:(?P<pass>.+))?@)?(?P<server>.+)',
173180
specification)
174181
if m:
175-
ssl = 0
176-
if source == 'imaps':
177-
ssl = 1
182+
ssl = source.endswith('s')
178183
mailbox = ''
179184
if len(args) > 3:
180185
mailbox = args[3]

0 commit comments

Comments
 (0)