Mercurial > p > roundup > code
comparison roundup/mailgw.py @ 419:831e91e23963
login_action and newuser_action return values were being ignored
Woohoo! Found that bloody re-login bug that was killing the mail gateway.
(also a minor cleanup in hyperdb)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 28 Nov 2001 21:55:35 +0000 |
| parents | a6088556e9ba |
| children | 350685601f37 |
comparison
equal
deleted
inserted
replaced
| 418:3e31e53a6ff6 | 419:831e91e23963 |
|---|---|
| 71 set() method to add the message to the item's spool; in the second case we | 71 set() method to add the message to the item's spool; in the second case we |
| 72 are calling the create() method to create a new node). If an auditor raises | 72 are calling the create() method to create a new node). If an auditor raises |
| 73 an exception, the original message is bounced back to the sender with the | 73 an exception, the original message is bounced back to the sender with the |
| 74 explanatory message given in the exception. | 74 explanatory message given in the exception. |
| 75 | 75 |
| 76 $Id: mailgw.py,v 1.36 2001-11-26 22:55:56 richard Exp $ | 76 $Id: mailgw.py,v 1.37 2001-11-28 21:55:35 richard Exp $ |
| 77 ''' | 77 ''' |
| 78 | 78 |
| 79 | 79 |
| 80 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri | 80 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri |
| 81 import traceback, MimeWriter | 81 import traceback, MimeWriter |
| 352 author = self.db.uidFromAddress(message.getaddrlist('from')[0]) | 352 author = self.db.uidFromAddress(message.getaddrlist('from')[0]) |
| 353 # reopen the database as the author | 353 # reopen the database as the author |
| 354 username = self.db.user.get(author, 'username') | 354 username = self.db.user.get(author, 'username') |
| 355 self.db.close() | 355 self.db.close() |
| 356 self.db = self.instance.open(username) | 356 self.db = self.instance.open(username) |
| 357 | |
| 358 # re-get the class with the new database connection | |
| 359 cl = self.db.getclass(classname) | |
| 360 | |
| 357 # now update the recipients list | 361 # now update the recipients list |
| 358 recipients = [] | 362 recipients = [] |
| 359 tracker_email = self.ISSUE_TRACKER_EMAIL.lower() | 363 tracker_email = self.ISSUE_TRACKER_EMAIL.lower() |
| 360 for recipient in message.getaddrlist('to') + message.getaddrlist('cc'): | 364 for recipient in message.getaddrlist('to') + message.getaddrlist('cc'): |
| 361 if recipient[1].strip().lower() == tracker_email: | 365 if recipient[1].strip().lower() == tracker_email: |
| 588 l.append(section) | 592 l.append(section) |
| 589 return summary, '\n\n'.join(l) | 593 return summary, '\n\n'.join(l) |
| 590 | 594 |
| 591 # | 595 # |
| 592 # $Log: not supported by cvs2svn $ | 596 # $Log: not supported by cvs2svn $ |
| 597 # Revision 1.36 2001/11/26 22:55:56 richard | |
| 598 # Feature: | |
| 599 # . Added INSTANCE_NAME to configuration - used in web and email to identify | |
| 600 # the instance. | |
| 601 # . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup | |
| 602 # signature info in e-mails. | |
| 603 # . Some more flexibility in the mail gateway and more error handling. | |
| 604 # . Login now takes you to the page you back to the were denied access to. | |
| 605 # | |
| 606 # Fixed: | |
| 607 # . Lots of bugs, thanks Roché and others on the devel mailing list! | |
| 608 # | |
| 593 # Revision 1.35 2001/11/22 15:46:42 jhermann | 609 # Revision 1.35 2001/11/22 15:46:42 jhermann |
| 594 # Added module docstrings to all modules. | 610 # Added module docstrings to all modules. |
| 595 # | 611 # |
| 596 # Revision 1.34 2001/11/15 10:24:27 richard | 612 # Revision 1.34 2001/11/15 10:24:27 richard |
| 597 # handle the case where there is no file attached | 613 # handle the case where there is no file attached |
