Skip to content

Commit 4fc1600

Browse files
author
Richard Jones
committed
merge from HEAD
1 parent c54432c commit 4fc1600

File tree

5 files changed

+27
-9
lines changed

5 files changed

+27
-9
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Fixed:
2525
- fixed class "help" listing paging (sf bug 1106329)
2626
- nicer error looking up values of None (response to sf bug 1108697)
2727
- fallback for (list) popups if javascript disabled (sf patch 1101626)
28+
- ignore AutoReply messages (sf patch 1085051)
2829

2930

3031
2005-01-13 0.8.0b2

doc/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Wil Cooley,
7878
Joe Cooper,
7979
Kelley Dagley,
8080
Paul F. Dubois,
81+
Andrew Eland,
8182
Jeff Epler,
8283
Tom Epperly,
8384
Tamer Fahmy,

roundup/cgi/templating.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -640,10 +640,13 @@ def classhelp(self, properties=None, label=''"(list)", width='500',
640640
property = '&property=%s'%property
641641
if form:
642642
form = '&form=%s'%form
643-
return '<a class="classhelp" href="javascript:help_window(\'%s?'\
644-
'@startwith=0&amp;@template=help&amp;properties=%s%s%s\', \'%s\', \
645-
\'%s\')">%s</a>'%(self.classname, properties, property, form, width,
646-
height, self._(label))
643+
help_url = "%s?@startwith=0&amp;@template=help&amp;"\
644+
"properties=%s%s%s" % \
645+
(self.classname, properties, property, form)
646+
onclick = "javascript:help_window('%s', '%s', '%s');return false;" % \
647+
(help_url, width, height)
648+
return '<a class="classhelp" href="%s" onclick="%s">%s</a>' % \
649+
(help_url, onclick, self._(label))
647650

648651
def submit(self, label=''"Submit New Entry"):
649652
''' Generate a submit button (and action hidden element)

roundup/mailgw.py

Lines changed: 4 additions & 3 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.159.2.2 2005-02-14 02:55:30 richard Exp $
75+
$Id: mailgw.py,v 1.159.2.3 2005-02-14 05:55:20 richard Exp $
7676
"""
7777
__docformat__ = 'restructuredtext'
7878

@@ -579,8 +579,9 @@ def handle_message(self, message):
579579
if message.getheader('x-roundup-loop', ''):
580580
raise IgnoreLoop
581581

582-
# detect Precedence: Bulk
583-
if (message.getheader('precedence', '') == 'bulk'):
582+
# detect Precedence: Bulk, or Microsoft Outlook autoreplies
583+
if (message.getheader('precedence', '') == 'bulk'
584+
or message.getheader('subject', '').lower().find("autoreply") > 0):
584585
raise IgnoreBulk
585586

586587
# config is used many times in this method.

test/test_mailgw.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# but WITHOUT ANY WARRANTY; without even the implied warranty of
99
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1010
#
11-
# $Id: test_mailgw.py,v 1.73 2004-10-24 10:01:58 a1s Exp $
11+
# $Id: test_mailgw.py,v 1.73.2.1 2005-02-14 05:55:20 richard Exp $
1212

1313
# TODO: test bcc
1414

@@ -979,7 +979,6 @@ def testResentFrom(self):
979979
self.assertEqual(l, [self.richard_id, self.mary_id])
980980
return nodeid
981981

982-
983982
def testDejaVu(self):
984983
self.assertRaises(IgnoreLoop, self._handle_mail,
985984
'''Content-Type: text/plain;
@@ -1006,6 +1005,19 @@ def testItsBulkStupid(self):
10061005
Subject: Re: [issue] Testing...
10071006
10081007
Hi, I'm on holidays, and this is a dumb auto-responder.
1008+
''')
1009+
1010+
def testAutoReplyEmailsAreIgnored(self):
1011+
self.assertRaises(IgnoreBulk, self._handle_mail,
1012+
'''Content-Type: text/plain;
1013+
charset="iso-8859-1"
1014+
From: Chef <[email protected]>
1015+
1016+
Cc: richard@test
1017+
Message-Id: <dummy_test_message_id>
1018+
Subject: Re: [issue] Out of office AutoReply: Back next week
1019+
1020+
Hi, I'm back in the office next week
10091021
''')
10101022

10111023
def test_suite():

0 commit comments

Comments
 (0)