Mercurial > p > roundup > code
comparison roundup/mailgw.py @ 2698:b2fd52ba7ffa
fix argument order in call to hasPermission;
remove meaningless comment that looks like vim modeline (but is not, actually)
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Wed, 29 Sep 2004 07:05:57 +0000 |
| parents | 437775793d8e |
| children | 3ebbb8111503 |
comparison
equal
deleted
inserted
replaced
| 2697:d138df58b0c3 | 2698:b2fd52ba7ffa |
|---|---|
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # vim: ts=4 sw=4 expandtab | |
| 19 # | |
| 20 | 18 |
| 21 """An e-mail gateway for Roundup. | 19 """An e-mail gateway for Roundup. |
| 22 | 20 |
| 23 Incoming messages are examined for multiple parts: | 21 Incoming messages are examined for multiple parts: |
| 24 . In a multipart/mixed message or part, each subpart is extracted and | 22 . In a multipart/mixed message or part, each subpart is extracted and |
| 72 set() method to add the message to the item's spool; in the second case we | 70 set() method to add the message to the item's spool; in the second case we |
| 73 are calling the create() method to create a new node). If an auditor raises | 71 are calling the create() method to create a new node). If an auditor raises |
| 74 an exception, the original message is bounced back to the sender with the | 72 an exception, the original message is bounced back to the sender with the |
| 75 explanatory message given in the exception. | 73 explanatory message given in the exception. |
| 76 | 74 |
| 77 $Id: mailgw.py,v 1.155 2004-09-14 22:09:48 richard Exp $ | 75 $Id: mailgw.py,v 1.156 2004-09-29 07:05:57 a1s Exp $ |
| 78 """ | 76 """ |
| 79 __docformat__ = 'restructuredtext' | 77 __docformat__ = 'restructuredtext' |
| 80 | 78 |
| 81 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri | 79 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri |
| 82 import time, random, sys | 80 import time, random, sys |
| 767 # handle the users | 765 # handle the users |
| 768 # | 766 # |
| 769 # Don't create users if anonymous isn't allowed to register | 767 # Don't create users if anonymous isn't allowed to register |
| 770 create = 1 | 768 create = 1 |
| 771 anonid = self.db.user.lookup('anonymous') | 769 anonid = self.db.user.lookup('anonymous') |
| 772 if not self.db.security.hasPermission('Create', 'user', anonid): | 770 if not self.db.security.hasPermission('Create', anonid, 'user'): |
| 773 create = 0 | 771 create = 0 |
| 774 | 772 |
| 775 # ok, now figure out who the author is - create a new user if the | 773 # ok, now figure out who the author is - create a new user if the |
| 776 # "create" flag is true | 774 # "create" flag is true |
| 777 author = uidFromAddress(self.db, from_list[0], create=create) | 775 author = uidFromAddress(self.db, from_list[0], create=create) |
