Skip to content

Commit 0f8962a

Browse files
Mailgw: Improves diagnostic messages for DEBUG.
* Adds debug log messages for bounce mails to aid tracing of emails.
1 parent 7446519 commit 0f8962a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

roundup/mailgw.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,6 +1519,7 @@ def handle_Message(self, message):
15191519
return self.handle_message(message)
15201520
except MailUsageHelp:
15211521
# bounce the message back to the sender with the usage message
1522+
self.logger.debug("MailUsageHelp raised, bouncing.")
15221523
fulldoc = '\n'.join(string.split(__doc__, '\n')[2:])
15231524
m = ['']
15241525
m.append('\n\nMail Gateway Help\n=================')
@@ -1527,6 +1528,7 @@ def handle_Message(self, message):
15271528
subject="Mail Gateway Help")
15281529
except MailUsageError, value:
15291530
# bounce the message back to the sender with the usage message
1531+
self.logger.debug("MailUsageError raised, bouncing.")
15301532
fulldoc = '\n'.join(string.split(__doc__, '\n')[2:])
15311533
m = ['']
15321534
m.append(str(value))
@@ -1538,6 +1540,7 @@ def handle_Message(self, message):
15381540
self.mailer.bounce_message(message, [sendto[0][1]], m, crypt=crypt)
15391541
except Unauthorized, value:
15401542
# just inform the user that he is not authorized
1543+
self.logger.debug("Unauthorized raised, bouncing.")
15411544
m = ['']
15421545
m.append(str(value))
15431546
if self.parsed_message:

0 commit comments

Comments
 (0)