Code

5ef6e2c332a3c81ca9024d8e0233aa9abe9aa1cc
[roundup.git] / roundup / mailgw.py
1 #
2 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
3 # This module is free software, and you may redistribute it and/or modify
4 # under the same terms as Python, so long as this copyright message and
5 # disclaimer are retained in their original form.
6 #
7 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR
8 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
9 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
10 # POSSIBILITY OF SUCH DAMAGE.
11 #
12 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
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"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 #
19 __doc__ = '''
20 An e-mail gateway for Roundup.
22 Incoming messages are examined for multiple parts:
23  . In a multipart/mixed message or part, each subpart is extracted and
24    examined. The text/plain subparts are assembled to form the textual
25    body of the message, to be stored in the file associated with a "msg"
26    class node. Any parts of other types are each stored in separate files
27    and given "file" class nodes that are linked to the "msg" node. 
28  . In a multipart/alternative message or part, we look for a text/plain
29    subpart and ignore the other parts.
31 Summary
32 -------
33 The "summary" property on message nodes is taken from the first non-quoting
34 section in the message body. The message body is divided into sections by
35 blank lines. Sections where the second and all subsequent lines begin with
36 a ">" or "|" character are considered "quoting sections". The first line of
37 the first non-quoting section becomes the summary of the message. 
39 Addresses
40 ---------
41 All of the addresses in the To: and Cc: headers of the incoming message are
42 looked up among the user nodes, and the corresponding users are placed in
43 the "recipients" property on the new "msg" node. The address in the From:
44 header similarly determines the "author" property of the new "msg"
45 node. The default handling for addresses that don't have corresponding
46 users is to create new users with no passwords and a username equal to the
47 address. (The web interface does not permit logins for users with no
48 passwords.) If we prefer to reject mail from outside sources, we can simply
49 register an auditor on the "user" class that prevents the creation of user
50 nodes with no passwords. 
52 Actions
53 -------
54 The subject line of the incoming message is examined to determine whether
55 the message is an attempt to create a new item or to discuss an existing
56 item. A designator enclosed in square brackets is sought as the first thing
57 on the subject line (after skipping any "Fwd:" or "Re:" prefixes). 
59 If an item designator (class name and id number) is found there, the newly
60 created "msg" node is added to the "messages" property for that item, and
61 any new "file" nodes are added to the "files" property for the item. 
63 If just an item class name is found there, we attempt to create a new item
64 of that class with its "messages" property initialized to contain the new
65 "msg" node and its "files" property initialized to contain any new "file"
66 nodes. 
68 Triggers
69 --------
70 Both cases may trigger detectors (in the first case we are calling the
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
73 an exception, the original message is bounced back to the sender with the
74 explanatory message given in the exception. 
76 $Id: mailgw.py,v 1.37 2001-11-28 21:55:35 richard Exp $
77 '''
80 import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
81 import traceback, MimeWriter
82 import hyperdb, date, password
84 class MailGWError(ValueError):
85     pass
87 class MailUsageError(ValueError):
88     pass
90 class Message(mimetools.Message):
91     ''' subclass mimetools.Message so we can retrieve the parts of the
92         message...
93     '''
94     def getPart(self):
95         ''' Get a single part of a multipart message and return it as a new
96             Message instance.
97         '''
98         boundary = self.getparam('boundary')
99         mid, end = '--'+boundary, '--'+boundary+'--'
100         s = cStringIO.StringIO()
101         while 1:
102             line = self.fp.readline()
103             if not line:
104                 break
105             if line.strip() in (mid, end):
106                 break
107             s.write(line)
108         if not s.getvalue().strip():
109             return None
110         s.seek(0)
111         return Message(s)
113 subject_re = re.compile(r'(?P<refwd>\s*\W?\s*(fwd|re)\s*\W?\s*)*'
114     r'\s*(\[(?P<classname>[^\d\s]+)(?P<nodeid>\d+)?\])'
115     r'\s*(?P<title>[^[]+)?(\[(?P<args>.+?)\])?', re.I)
117 class MailGW:
118     def __init__(self, instance, db):
119         self.instance = instance
120         self.db = db
122     def main(self, fp):
123         ''' fp - the file from which to read the Message.
124         '''
125         self.handle_Message(Message(fp))
127     def handle_Message(self, message):
128         '''Handle an RFC822 Message
130         Handle the Message object by calling handle_message() and then cope
131         with any errors raised by handle_message.
132         This method's job is to make that call and handle any
133         errors in a sane manner. It should be replaced if you wish to
134         handle errors in a different manner.
135         '''
136         # in some rare cases, a particularly stuffed-up e-mail will make
137         # its way into here... try to handle it gracefully
138         sendto = message.getaddrlist('from')
139         if sendto:
140             try:
141                 return self.handle_message(message)
142             except MailUsageError, value:
143                 # bounce the message back to the sender with the usage message
144                 fulldoc = '\n'.join(string.split(__doc__, '\n')[2:])
145                 sendto = [sendto[0][1]]
146                 m = ['']
147                 m.append(str(value))
148                 m.append('\n\nMail Gateway Help\n=================')
149                 m.append(fulldoc)
150                 m = self.bounce_message(message, sendto, m)
151             except:
152                 # bounce the message back to the sender with the error message
153                 sendto = [sendto[0][1]]
154                 m = ['']
155                 m.append('----  traceback of failure  ----')
156                 s = cStringIO.StringIO()
157                 import traceback
158                 traceback.print_exc(None, s)
159                 m.append(s.getvalue())
160                 m = self.bounce_message(message, sendto, m)
161         else:
162             # very bad-looking message - we don't even know who sent it
163             sendto = [self.ADMIN_EMAIL]
164             m = ['Subject: badly formed message from mail gateway']
165             m.append('')
166             m.append('The mail gateway retrieved a message which has no From:')
167             m.append('line, indicating that it is corrupt. Please check your')
168             m.append('mail gateway source. Failed message is attached.')
169             m.append('')
170             m = self.bounce_message(message, sendto, m,
171                 subject='Badly formed message from mail gateway')
173         # now send the message
174         try:
175             smtp = smtplib.SMTP(self.MAILHOST)
176             smtp.sendmail(self.ADMIN_EMAIL, sendto, m.getvalue())
177         except socket.error, value:
178             raise MailGWError, "Couldn't send confirmation email: "\
179                 "mailhost %s"%value
180         except smtplib.SMTPException, value:
181             raise MailGWError, "Couldn't send confirmation email: %s"%value
183     def bounce_message(self, message, sendto, error,
184             subject='Failed issue tracker submission'):
185         ''' create a message that explains the reason for the failed
186             issue submission to the author and attach the original
187             message.
188         '''
189         msg = cStringIO.StringIO()
190         writer = MimeWriter.MimeWriter(msg)
191         writer.addheader('Subject', subject)
192         writer.addheader('From', '%s <%s>'% (self.instance.INSTANCE_NAME,
193                                             self.ISSUE_TRACKER_EMAIL))
194         writer.addheader('To', ','.join(sendto))
195         writer.addheader('MIME-Version', '1.0')
196         part = writer.startmultipartbody('mixed')
197         part = writer.nextpart()
198         body = part.startbody('text/plain')
199         body.write('\n'.join(error))
201         # reconstruct the original message
202         m = cStringIO.StringIO()
203         w = MimeWriter.MimeWriter(m)
204         for header in message.headers:
205             header_name = header.split(':')[0]
206             if message.getheader(header_name):
207                 w.addheader(header_name,message.getheader(header_name))
208         body = w.startbody('text/plain')
209         try:
210             message.fp.seek(0)
211         except:
212             pass
213         body.write(message.fp.read())
215         # attach the original message to the returned message
216         part = writer.nextpart()
217         part.addheader('Content-Disposition','attachment')
218         part.addheader('Content-Transfer-Encoding', '7bit')
219         body = part.startbody('message/rfc822')
220         body.write(m.getvalue())
222         writer.lastpart()
223         return msg
225     def handle_message(self, message):
226         ''' message - a Message instance
228         Parse the message as per the module docstring.
229         '''
230         # handle the subject line
231         subject = message.getheader('subject', '')
232         m = subject_re.match(subject)
233         if not m:
234             raise MailUsageError, '''
235 The message you sent to roundup did not contain a properly formed subject
236 line. The subject must contain a class name or designator to indicate the
237 "topic" of the message. For example:
238     Subject: [issue] This is a new issue
239       - this will create a new issue in the tracker with the title "This is
240         a new issue".
241     Subject: [issue1234] This is a followup to issue 1234
242       - this will append the message's contents to the existing issue 1234
243         in the tracker.
245 Subject was: "%s"
246 '''%subject
248         # get the classname
249         classname = m.group('classname')
250         try:
251             cl = self.db.getclass(classname)
252         except KeyError:
253             raise MailUsageError, '''
254 The class name you identified in the subject line ("%s") does not exist in the
255 database.
257 Valid class names are: %s
258 Subject was: "%s"
259 '''%(classname, ', '.join(self.db.getclasses()), subject)
261         # get the optional nodeid
262         nodeid = m.group('nodeid')
264         # title is optional too
265         title = m.group('title')
266         if title:
267             title = title.strip()
268         else:
269             title = ''
271         # but we do need either a title or a nodeid...
272         if not nodeid and not title:
273             raise MailUsageError, '''
274 I cannot match your message to a node in the database - you need to either
275 supply a full node identifier (with number, eg "[issue123]" or keep the
276 previous subject title intact so I can match that.
278 Subject was: "%s"
279 '''%(classname, subject)
281         # extract the args
282         subject_args = m.group('args')
284         # If there's no nodeid, check to see if this is a followup and
285         # maybe someone's responded to the initial mail that created an
286         # entry. Try to find the matching nodes with the same title, and
287         # use the _last_ one matched (since that'll _usually_ be the most
288         # recent...)
289         if not nodeid and m.group('refwd'):
290             l = cl.stringFind(title=title)
291             if l:
292                 nodeid = l[-1]
294         # start of the props
295         properties = cl.getprops()
296         props = {}
298         # handle the args
299         args = m.group('args')
300         if args:
301             for prop in string.split(args, ';'):
302                 try:
303                     key, value = prop.split('=')
304                 except ValueError, message:
305                     raise MailUsageError, '''
306 Subject argument list not of form [arg=value,value,...;arg=value,value...]
307    (specific exception message was "%s")
309 Subject was: "%s"
310 '''%(message, subject)
311                 key = key.strip()
312                 try:
313                     proptype =  properties[key]
314                 except KeyError:
315                     raise MailUsageError, '''
316 Subject argument list refers to an invalid property: "%s"
318 Subject was: "%s"
319 '''%(key, subject)
320                 if isinstance(proptype, hyperdb.String):
321                     props[key] = value.strip()
322                 if isinstance(proptype, hyperdb.Password):
323                     props[key] = password.Password(value.strip())
324                 elif isinstance(proptype, hyperdb.Date):
325                     try:
326                         props[key] = date.Date(value.strip())
327                     except ValueError, message:
328                         raise UsageError, '''
329 Subject argument list contains an invalid date for %s.
331 Error was: %s
332 Subject was: "%s"
333 '''%(key, message, subject)
334                 elif isinstance(proptype, hyperdb.Interval):
335                     try:
336                         props[key] = date.Interval(value) # no strip needed
337                     except ValueError, message:
338                         raise UsageError, '''
339 Subject argument list contains an invalid date interval for %s.
341 Error was: %s
342 Subject was: "%s"
343 '''%(key, message, subject)
344                 elif isinstance(proptype, hyperdb.Link):
345                     props[key] = value.strip()
346                 elif isinstance(proptype, hyperdb.Multilink):
347                     props[key] = [x.strip() for x in value.split(',')]
349         #
350         # handle the users
351         #
352         author = self.db.uidFromAddress(message.getaddrlist('from')[0])
353         # reopen the database as the author
354         username = self.db.user.get(author, 'username')
355         self.db.close()
356         self.db = self.instance.open(username)
358         # re-get the class with the new database connection
359         cl = self.db.getclass(classname)
361         # now update the recipients list
362         recipients = []
363         tracker_email = self.ISSUE_TRACKER_EMAIL.lower()
364         for recipient in message.getaddrlist('to') + message.getaddrlist('cc'):
365             if recipient[1].strip().lower() == tracker_email:
366                 continue
367             recipients.append(self.db.uidFromAddress(recipient))
369         # now handle the body - find the message
370         content_type =  message.gettype()
371         attachments = []
372         if content_type == 'multipart/mixed':
373             # skip over the intro to the first boundary
374             part = message.getPart()
375             content = None
376             while 1:
377                 # get the next part
378                 part = message.getPart()
379                 if part is None:
380                     break
381                 # parse it
382                 subtype = part.gettype()
383                 if subtype == 'text/plain' and not content:
384                     # add all text/plain parts to the message content
385                     if content is None:
386                         content = part.fp.read()
387                     else:
388                         content = content + part.fp.read()
390                 elif subtype == 'message/rfc822':
391                     # handle message/rfc822 specially - the name should be
392                     # the subject of the actual e-mail embedded here
393                     i = part.fp.tell()
394                     mailmess = Message(part.fp)
395                     name = mailmess.getheader('subject')
396                     part.fp.seek(i)
397                     attachments.append((name, 'message/rfc822', part.fp.read()))
399                 else:
400                     # try name on Content-Type
401                     name = part.getparam('name')
402                     # this is just an attachment
403                     encoding = part.getencoding()
404                     if encoding == 'base64':
405                         data = binascii.a2b_base64(part.fp.read())
406                     elif encoding == 'quoted-printable':
407                         # the quopri module wants to work with files
408                         decoded = cStringIO.StringIO()
409                         quopri.decode(part.fp, decoded)
410                         data = decoded.getvalue()
411                     elif encoding == 'uuencoded':
412                         data = binascii.a2b_uu(part.fp.read())
413                     attachments.append((name, part.gettype(), data))
415             if content is None:
416                 raise MailUsageError, '''
417 Roundup requires the submission to be plain text. The message parser could
418 not find a text/plain part to use.
419 '''
421         elif content_type[:10] == 'multipart/':
422             # skip over the intro to the first boundary
423             message.getPart()
424             content = None
425             while 1:
426                 # get the next part
427                 part = message.getPart()
428                 if part is None:
429                     break
430                 # parse it
431                 if part.gettype() == 'text/plain' and not content:
432                     # this one's our content
433                     content = part.fp.read()
434             if content is None:
435                 raise MailUsageError, '''
436 Roundup requires the submission to be plain text. The message parser could
437 not find a text/plain part to use.
438 '''
440         elif content_type != 'text/plain':
441             raise MailUsageError, '''
442 Roundup requires the submission to be plain text. The message parser could
443 not find a text/plain part to use.
444 '''
446         else:
447             content = message.fp.read()
449         summary, content = parseContent(content)
451         # handle the files
452         files = []
453         for (name, mime_type, data) in attachments:
454             files.append(self.db.file.create(type=mime_type, name=name,
455                 content=data))
457         # now handle the db stuff
458         if nodeid:
459             # If an item designator (class name and id number) is found there,
460             # the newly created "msg" node is added to the "messages" property
461             # for that item, and any new "file" nodes are added to the "files" 
462             # property for the item. 
463             message_id = self.db.msg.create(author=author,
464                 recipients=recipients, date=date.Date('.'), summary=summary,
465                 content=content, files=files)
466             try:
467                 messages = cl.get(nodeid, 'messages')
468             except IndexError:
469                 raise MailUsageError, '''
470 The node specified by the designator in the subject of your message ("%s")
471 does not exist.
473 Subject was: "%s"
474 '''%(nodeid, subject)
475             messages.append(message_id)
476             props['messages'] = messages
478             # if the message is currently 'unread' or 'resolved', then set
479             # it to 'chatting'
480             if properties.has_key('status'):
481                 try:
482                     # determine the id of 'unread', 'resolved' and 'chatting'
483                     unread_id = self.db.status.lookup('unread')
484                     resolved_id = self.db.status.lookup('resolved')
485                     chatting_id = self.db.status.lookup('chatting')
486                 except KeyError:
487                     pass
488                 else:
489                     if (not props.has_key('status') or
490                             props['status'] == unread_id or
491                             props['status'] == resolved_id):
492                         props['status'] = chatting_id
494             # add nosy in arguments to issue's nosy list, don't replace
495             if props.has_key('nosy'):
496                 n = {}
497                 for nid in cl.get(nodeid, 'nosy'):
498                     n[nid] = 1
499                 for value in props['nosy']:
500                     if self.db.hasnode('user', value):
501                         nid = value
502                     else:
503                         try:
504                             nid = self.db.user.lookup(value)
505                         except:
506                             continue
507                     if n.has_key(nid): continue
508                     n[nid] = 1
509                 props['nosy'] = n.keys()
511             # now apply the changes
512             try:
513                 cl.set(nodeid, **props)
514             except (TypeError, IndexError, ValueError), message:
515                 raise MailUsageError, '''
516 There was a problem with the message you sent:
517    %s
518 '''%message
519         else:
520             # If just an item class name is found there, we attempt to create a
521             # new item of that class with its "messages" property initialized to
522             # contain the new "msg" node and its "files" property initialized to
523             # contain any new "file" nodes. 
524             message_id = self.db.msg.create(author=author,
525                 recipients=recipients, date=date.Date('.'), summary=summary,
526                 content=content, files=files)
528             # pre-set the issue to unread
529             if properties.has_key('status') and not props.has_key('status'):
530                 try:
531                     # determine the id of 'unread'
532                     unread_id = self.db.status.lookup('unread')
533                 except KeyError:
534                     pass
535                 else:
536                     props['status'] = '1'
538             # set the title to the subject
539             if properties.has_key('title') and not props.has_key('title'):
540                 props['title'] = title
542             # pre-load the messages list and nosy list
543             props['messages'] = [message_id]
544             props['nosy'] = props.get('nosy', []) + recipients
545             props['nosy'].append(author)
546             props['nosy'].sort()
548             # and attempt to create the new node
549             try:
550                 nodeid = cl.create(**props)
551             except (TypeError, IndexError, ValueError), message:
552                 raise MailUsageError, '''
553 There was a problem with the message you sent:
554    %s
555 '''%message
557 def parseContent(content, blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'),
558         eol=re.compile(r'[\r\n]+'), signature=re.compile(r'^[>|\s]*[-_]+\s*$')):
559     ''' The message body is divided into sections by blank lines.
560     Sections where the second and all subsequent lines begin with a ">" or "|"
561     character are considered "quoting sections". The first line of the first
562     non-quoting section becomes the summary of the message. 
563     '''
564     # strip off leading carriage-returns / newlines
565     i = 0
566     for i in range(len(content)):
567         if content[i] not in '\r\n':
568             break
569     if i > 0:
570         sections = blank_line.split(content[i:])
571     else:
572         sections = blank_line.split(content)
574     # extract out the summary from the message
575     summary = ''
576     l = []
577     for section in sections:
578         #section = section.strip()
579         if not section:
580             continue
581         lines = eol.split(section)
582         if lines[0] and lines[0][0] in '>|':
583             continue
584         if len(lines) > 1 and lines[1] and lines[1][0] in '>|':
585             continue
586         if not summary:
587             summary = lines[0]
588             l.append(section)
589             continue
590         if signature.match(lines[0]):
591             break
592         l.append(section)
593     return summary, '\n\n'.join(l)
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.
606 # Fixed:
607 #  . Lots of bugs, thanks Roché and others on the devel mailing list!
609 # Revision 1.35  2001/11/22 15:46:42  jhermann
610 # Added module docstrings to all modules.
612 # Revision 1.34  2001/11/15 10:24:27  richard
613 # handle the case where there is no file attached
615 # Revision 1.33  2001/11/13 21:44:44  richard
616 #  . re-open the database as the author in mail handling
618 # Revision 1.32  2001/11/12 22:04:29  richard
619 # oops, left debug in there
621 # Revision 1.31  2001/11/12 22:01:06  richard
622 # Fixed issues with nosy reaction and author copies.
624 # Revision 1.30  2001/11/09 22:33:28  richard
625 # More error handling fixes.
627 # Revision 1.29  2001/11/07 05:29:26  richard
628 # Modified roundup-mailgw so it can read e-mails from a local mail spool
629 # file. Truncates the spool file after parsing.
630 # Fixed a couple of small bugs introduced in roundup.mailgw when I started
631 # the popgw.
633 # Revision 1.28  2001/11/01 22:04:37  richard
634 # Started work on supporting a pop3-fetching server
635 # Fixed bugs:
636 #  . bug #477104 ] HTML tag error in roundup-server
637 #  . bug #477107 ] HTTP header problem
639 # Revision 1.27  2001/10/30 11:26:10  richard
640 # Case-insensitive match for ISSUE_TRACKER_EMAIL in address in e-mail.
642 # Revision 1.26  2001/10/30 00:54:45  richard
643 # Features:
644 #  . #467129 ] Lossage when username=e-mail-address
645 #  . #473123 ] Change message generation for author
646 #  . MailGW now moves 'resolved' to 'chatting' on receiving e-mail for an issue.
648 # Revision 1.25  2001/10/28 23:22:28  richard
649 # fixed bug #474749 ] Indentations lost
651 # Revision 1.24  2001/10/23 22:57:52  richard
652 # Fix unread->chatting auto transition, thanks Roch'e
654 # Revision 1.23  2001/10/21 04:00:20  richard
655 # MailGW now moves 'unread' to 'chatting' on receiving e-mail for an issue.
657 # Revision 1.22  2001/10/21 03:35:13  richard
658 # bug #473125: Paragraph in e-mails
660 # Revision 1.21  2001/10/21 00:53:42  richard
661 # bug #473130: Nosy list not set correctly
663 # Revision 1.20  2001/10/17 23:13:19  richard
664 # Did a fair bit of work on the admin tool. Now has an extra command "table"
665 # which displays node information in a tabular format. Also fixed import and
666 # export so they work. Removed freshen.
667 # Fixed quopri usage in mailgw from bug reports.
669 # Revision 1.19  2001/10/11 23:43:04  richard
670 # Implemented the comma-separated printing option in the admin tool.
671 # Fixed a typo (more of a vim-o actually :) in mailgw.
673 # Revision 1.18  2001/10/11 06:38:57  richard
674 # Initial cut at trying to handle people responding to CC'ed messages that
675 # create an issue.
677 # Revision 1.17  2001/10/09 07:25:59  richard
678 # Added the Password property type. See "pydoc roundup.password" for
679 # implementation details. Have updated some of the documentation too.
681 # Revision 1.16  2001/10/05 02:23:24  richard
682 #  . roundup-admin create now prompts for property info if none is supplied
683 #    on the command-line.
684 #  . hyperdb Class getprops() method may now return only the mutable
685 #    properties.
686 #  . Login now uses cookies, which makes it a whole lot more flexible. We can
687 #    now support anonymous user access (read-only, unless there's an
688 #    "anonymous" user, in which case write access is permitted). Login
689 #    handling has been moved into cgi_client.Client.main()
690 #  . The "extended" schema is now the default in roundup init.
691 #  . The schemas have had their page headings modified to cope with the new
692 #    login handling. Existing installations should copy the interfaces.py
693 #    file from the roundup lib directory to their instance home.
694 #  . Incorrectly had a Bizar Software copyright on the cgitb.py module from
695 #    Ping - has been removed.
696 #  . Fixed a whole bunch of places in the CGI interface where we should have
697 #    been returning Not Found instead of throwing an exception.
698 #  . Fixed a deviation from the spec: trying to modify the 'id' property of
699 #    an item now throws an exception.
701 # Revision 1.15  2001/08/30 06:01:17  richard
702 # Fixed missing import in mailgw :(
704 # Revision 1.14  2001/08/13 23:02:54  richard
705 # Make the mail parser a little more robust.
707 # Revision 1.13  2001/08/12 06:32:36  richard
708 # using isinstance(blah, Foo) now instead of isFooType
710 # Revision 1.12  2001/08/08 01:27:00  richard
711 # Added better error handling to mailgw.
713 # Revision 1.11  2001/08/08 00:08:03  richard
714 # oops ;)
716 # Revision 1.10  2001/08/07 00:24:42  richard
717 # stupid typo
719 # Revision 1.9  2001/08/07 00:15:51  richard
720 # Added the copyright/license notice to (nearly) all files at request of
721 # Bizar Software.
723 # Revision 1.8  2001/08/05 07:06:07  richard
724 # removed some print statements
726 # Revision 1.7  2001/08/03 07:18:22  richard
727 # Implemented correct mail splitting (was taking a shortcut). Added unit
728 # tests. Also snips signatures now too.
730 # Revision 1.6  2001/08/01 04:24:21  richard
731 # mailgw was assuming certain properties existed on the issues being created.
733 # Revision 1.5  2001/07/29 07:01:39  richard
734 # Added vim command to all source so that we don't get no steenkin' tabs :)
736 # Revision 1.4  2001/07/28 06:43:02  richard
737 # Multipart message class has the getPart method now. Added some tests for it.
739 # Revision 1.3  2001/07/28 00:34:34  richard
740 # Fixed some non-string node ids.
742 # Revision 1.2  2001/07/22 12:09:32  richard
743 # Final commit of Grande Splite
746 # vim: set filetype=python ts=4 sw=4 et si