diff options
| author | mailman | 1998-02-27 16:10:31 +0000 |
|---|---|---|
| committer | mailman | 1998-02-27 16:10:31 +0000 |
| commit | 46d178b98b5ae3c6b164258bdba01b9598cc73dc (patch) | |
| tree | 26641a348a8a51a120524bebc3e347488901f738 /modules/mm_mbox.py | |
| parent | 34424e63e8008c267dd7eeaf15c6453e246ec966 (diff) | |
| download | mailman-46d178b98b5ae3c6b164258bdba01b9598cc73dc.tar.gz mailman-46d178b98b5ae3c6b164258bdba01b9598cc73dc.tar.zst mailman-46d178b98b5ae3c6b164258bdba01b9598cc73dc.zip | |
Diffstat (limited to 'modules/mm_mbox.py')
| -rw-r--r-- | modules/mm_mbox.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/mm_mbox.py b/modules/mm_mbox.py new file mode 100644 index 000000000..503ad9e15 --- /dev/null +++ b/modules/mm_mbox.py @@ -0,0 +1,16 @@ +import mailbox + +class Mailbox(mailbox.UnixMailbox): + # msg should be an rfc822 message or a subclass. + def AppendMessage(self, msg): + # seek to the last char of the mailbox + self.fp.seek(1,2) + if self.fp.read(1) <> '\n': + self.fp.write('\n') + self.fp.write(msg.unixfrom) + for line in msg.headers: + self.fp.write(line) + if msg.body[0] <> '\n': + self.fp.write('\n') + self.fp.write(msg.body) + |
