Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #4131
| From | Nobody <nobody@nowhere.com> |
|---|---|
| Subject | Re: Reading Huge UnixMailbox Files |
| Date | 2011-04-27 13:52 +0100 |
| Message-Id | <pan.2011.04.27.12.51.56.688000@nowhere.com> |
| Newsgroups | comp.lang.python |
| References | <mailman.866.1303846801.9059.python-list@python.org> <pan.2011.04.26.20.23.29.625000@nowhere.com> <mailman.877.1303851745.9059.python-list@python.org> |
| Organization | Zen Internet |
On Tue, 26 Apr 2011 14:02:23 -0700, Dan Stromberg wrote: > For the archive: This assumes traditional mbox. A SysV-ish sendmail, > for example, may not like it. sendmail itself doesn't deal with mailboxes or spool files; that task is left to the local delivery agent (e.g. mail.local or procmail). To clarify: the awk script assumes that any line beginning with "From " is the start of a message; any matching lines in the message body must be escaped. sendmail will do this if the mailer has the "E" flag (F=...E...). If lines beginning with "From " are only escaped when preceded by a blank line, you need to maintain a flag which is set when the current line is the first line in the file or preceded by a blank line and clear otherwise. This is the behaviour of sendmail's mail.local, and of procmail when invoked with the -Y flag (this is the default when sendmail is configured with FEATURE(local_procmail)) or when no Content-Length header is present. If lines beginning with "From " aren't escaped (relying upon a Content-Length header), you need to find some other approach (which probably won't involve traditional line-oriented tools). You also need to be really careful when processing such files.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar
Reading Huge UnixMailbox Files Brandon McGinty <brandon.mcginty@gmail.com> - 2011-04-26 15:39 -0400
Re: Reading Huge UnixMailbox Files Nobody <nobody@nowhere.com> - 2011-04-26 21:23 +0100
Re: Reading Huge UnixMailbox Files Dan Stromberg <drsalists@gmail.com> - 2011-04-26 14:02 -0700
Re: Reading Huge UnixMailbox Files Nobody <nobody@nowhere.com> - 2011-04-27 13:52 +0100
csiph-web