Hi Charles, I uploaded a new 4.20.4 package to Debian. Thanks.
As I reviewed this "Mboxrd format is not supported" bug report, I think that this is not a bug in the getmail python code but the documentation error. Solution is that all references to "mboxrd" in documentation and messages need to be replaced by "mboxo" as the attached patch. (This is my quick hack without testing. It needs to be reviewed carefully but should serve as a good reference for what changes are needed to address issues raised. As far as I can tell, this patch does not take care backward compatibility issues for the existing user configuration files with "Mboxrd" in them. It now requires to rewrite them to "Mboxo". If you know a nice and clean way to allow "Mboxrd" as alias to "Mboxo" in configuration, that will be nice. Until I can keep backword compatibility with nicer code or you decide to break backword compatibility, I will not apply this patch in this state to the Debian package.) Here is my thought: On Thu, Jul 21, 2011 at 01:53:50PM -0600, Charles Cazabon wrote: > Osamu Aoki <os...@debian.org> wrote: > > > > (Charles added to To-list since the getmail list is subscriber-only > > No, I add the Mail-Followup-To: pointing to the list because I don't want > useless copies of list messages cc'd to me. Since Lauri Alanko is not subscribing to this list, I will not CC him any more and will serve as the messenger if needed. I am only interested to fix this bug if it exists. > > No, the original message is quite valid. > > My misunderstanding then. It's not clear from this followup whether the issue > is actually fixed by my changes; is this still a problem or not? Lauri confirmed it is still a problem in new 4.20.4. But please note he is expecting mboxrd (not mboxo). > > If you are unwilling to fix the issue in getmail, Lauri's tone on this message is something I do not support. I was just forwarding a message. Please understand. > I didn't say that; in fact I said the opposite, and I did release an updated > version which I intended would fix the problem. If it isn't fixed then please > tell me so! I fully understand and I confirmed that your recent change of source is the proof of it as I packaged the new version. I also expected your new version should address all the issues if the libraries used are bug-free. Anyway, I did a bit of googling on mbox format issues. The git mailing list had thread of "[PATCH] format-patch: Properly escape From_ lines when creating an mbox." which sounded talking similar issues. There, there was a link to "mbox" format explanation: "mbox" is a family of several mutually incompatible mailbox formats. http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html Reversibility of mbox format was a bit of magic to me but I never thought deep into mbox formats: mboxo, mboxrd, mboxcl, mboxcl2. Then I read python manual which also admit existance of incompatible mbox formats: http://docs.python.org/library/mailbox.html#mbox In the interest of compatibility, mbox implements the original format, which is sometimes referred to as mboxo. The original bug report came with "This is arguably a documentation bug". If python folks think mboxo is the best mbox format to use, maybe getmail should keep using mboxo too. So instead of trying to please mboxrd format, we should keep getmail code as is and change documentation and messages. Osamu
diff -Nru getmail-4.20.4-orig/docs/configuration.html getmail-4.20.4/docs/configuration.html --- getmail-4.20.4-orig/docs/configuration.html 2011-07-17 02:40:16.000000000 +0900 +++ getmail-4.20.4/docs/configuration.html 2011-07-24 11:06:51.764522724 +0900 @@ -6,7 +6,7 @@ <title>getmail configuration (version 4)</title> <meta name="author" content="Charles Cazabon" /> <meta name="description" content="Configuration instructions for getmail version 4" /> - <meta name="keywords" content="getmail configuration, getmail 4 configuration, POP3, IMAP, SSL, domain mailbox, multidrop, fetchmail replacement, message filtering, maildir, mboxrd, MDA" /> + <meta name="keywords" content="getmail configuration, getmail 4 configuration, POP3, IMAP, SSL, domain mailbox, multidrop, fetchmail replacement, message filtering, maildir, mboxo, MDA" /> <link rel="Contents Up Index" title="Charles Cazabon's Software" href="../" /> <style type="text/css" media="all">@import "getmaildocs.css";</style> <style type="text/css" media="all">@import "/style/styles.css";</style> @@ -92,7 +92,7 @@ <li> <ul> <li><a href="configuration.html#destination-maildir">Maildir</a></li> - <li><a href="configuration.html#destination-mboxrd">Mboxrd</a></li> + <li><a href="configuration.html#destination-mboxo">Mboxo</a></li> <li><a href="configuration.html#destination-mdaexternal">MDA_external</a></li> <li><a href="configuration.html#destination-multidestination">MultiDestination</a></li> <li><a href="configuration.html#destination-multisorter">MultiSorter</a></li> @@ -1075,8 +1075,8 @@ <a href="http://cr.yp.to/proto/maildir.html">maildir</a> </li> <li> - <a href="#destination-mboxrd">Mboxrd</a> - — deliver all messages to a local mboxrd-format mbox file + <a href="#destination-mboxo">Mboxo</a> + — deliver all messages to a local mboxo-format mbox file with fcntl-type locking. </li> <li> @@ -1189,30 +1189,30 @@ </li> </ul> -<h4 id="destination-mboxrd">Mboxrd</h4> +<h4 id="destination-mboxo">Mboxo</h4> <p> - The Mboxrd destination delivers to an - <a href="http://qmail.org/man/man5/mbox.html">mboxrd-format mbox file</a> + The Mboxo destination delivers to an + <a href="http://qmail.org/man/man5/mbox.html">mboxo-format mbox file</a> with either fcntl-type (lockf) or flock-type file locking. The file must - already exist and appear to be a valid mboxrd file before getmail will try + already exist and appear to be a valid mboxo file before getmail will try to deliver to it — getmail will <strong>not</strong> - create the file if it does not exist. If you want to create a new mboxrd + create the file if it does not exist. If you want to create a new mboxo file for getmail to use, simply create a completely empty (0-byte) file. </p> <p class="warning"> You must ensure that all other programs accessing any the mbox file expect - mboxrd-format mbox files and the same type of file locking that you + mboxo-format mbox files and the same type of file locking that you configure getmail to use; failure to do so can cause mbox corruption. If you do not know what type of file locking your system expects, ask your system administrator. If you are the system administrator and don't know what type of file locking - your system expects, do not use Mboxrd files; use Maildirs instead. + your system expects, do not use Mboxo files; use Maildirs instead. Note that delivering to mbox files over NFS can be unreliable and should be avoided; this is the case with any MDA. </p> <p> - The Mboxrd destination takes one required parameter: + The Mboxo destination takes one required parameter: </p> <ul> <li> @@ -1233,13 +1233,13 @@ this: <pre class="example"> [destination] -type = Mboxrd +type = Mboxo path = ~/inbox </pre> </li> </ul> <p> - The Mboxrd destination also takes two optional parameters: + The Mboxo destination also takes two optional parameters: </p> <ul> <li> @@ -1247,7 +1247,7 @@ (<a href="#parameter-string">string</a>) — on Unix-like systems, if supplied, getmail will change the effective UID to that of the named user before delivering messages to - the mboxrd file. Note that this typically requires root privileges. + the mboxo file. Note that this typically requires root privileges. getmail will not deliver to mbox files as root, so this "optional" parameter is required in that situation. </li> @@ -1419,14 +1419,14 @@ (<a href="#parameter-tuplestrings">tuple of quoted strings</a>) — the destinations which the messages will be passed to. A destination is a string that refers to another configuration - file section by name (shortcuts for maildirs and mboxrd files are + file section by name (shortcuts for maildirs and mboxo files are also provided; see below), like this: </p> <pre class="example"> destinations = ('[other-destination-1]', '[other-destination-2]') [other-destination-1] -type = Mboxrd +type = Mboxo path = /var/spool/mail/alice user = alice @@ -1436,7 +1436,7 @@ user = joe </pre> <p> - Because Maildir and Mboxrd destinations are common, you can specify + Because Maildir and Mboxo destinations are common, you can specify them directly as a shortcut <strong> if they do not require a @@ -1446,7 +1446,7 @@ If the string (after expansion; see below) starts with a dot or slash and ends with a slash, it specifies the path of a Maildir destination, while if it starts with a dot or a slash and does not - end with a slash, it specifies the path of a Mboxrd destination. + end with a slash, it specifies the path of a Mboxo destination. </p> <p> For instance, you can deliver mail to two maildirs with the following: @@ -1483,7 +1483,7 @@ </pre> </li> <li> - To deliver to an mboxrd file: + To deliver to an mboxo file: <pre class="example"> [destination] type = MultiDestination @@ -1529,7 +1529,7 @@ <p> MultiSorter compares the envelope recipient address of messages against a list of user-supplied regular expressions and delivers the message to the - destination (maildir, mboxrd file, or other) associated with any matching + destination (maildir, mboxo file, or other) associated with any matching patterns. A message can match multiple patterns and therefore be delivered to multiple matching destinations. Any message which matches none of the patterns is delivered to a default destination for the postmaster. @@ -1551,7 +1551,7 @@ (<a href="#parameter-string">string</a>) — the destination for messages which aren't matched by any of the "locals" regular expressions. The destination can be a - maildir, mboxrd file, or other destination. See + maildir, mboxo file, or other destination. See <a href="#destination-multidestination">MultiDestination</a> for an explanation of how the type of destination is interpreted from this value. @@ -1689,7 +1689,7 @@ user = jeff [alice] -type = Mboxrd +type = Mboxo path = ~alice/inbox user = alice @@ -1760,7 +1760,7 @@ MultiGuesser tries to guess what the envelope recipient address of the message might have been, by comparing addresses found in the message header against a list of user-supplied regular expressions, and delivers the message to the - destination (maildir, mboxrd file, or other) associated with any matching + destination (maildir, mboxo file, or other) associated with any matching patterns. A message can match multiple patterns and therefore be delivered to multiple matching destinations. Any message which matches none of the patterns is delivered to a default destination for the postmaster. @@ -2714,7 +2714,7 @@ <h2 id="running-mda">Using getmail as an MDA</h2> <p> getmail includes helper scripts which allow you to use it to deliver mail - from other programs to maildirs or mboxrd files. + from other programs to maildirs or mboxo files. </p> <h3 id="running-mda-maildir">Using the <span class="file">getmail_maildir</span> MDA</h3> @@ -2765,7 +2765,7 @@ The <span class="file">getmail_mbox</span> script can be used as an MDA from other programs to deliver mail to - mboxrd-format mbox files. It reads the mail message from stdin, and + mboxo-format mbox files. It reads the mail message from stdin, and delivers it to an mbox path provided as an argument on the commandline. This path must (after expansion by the shell, if applicable) start with a dot or slash and not end with a slash. @@ -2796,7 +2796,7 @@ <h4 id="running-mda-mbox-example">Example</h4> <p> - You could deliver a message to an mboxrd-format mbox file named + You could deliver a message to an mboxo-format mbox file named <span class="file">inbox</span> located in a directory named <span class="file">mail</span> diff -Nru getmail-4.20.4-orig/docs/configuration.txt getmail-4.20.4/docs/configuration.txt --- getmail-4.20.4-orig/docs/configuration.txt 2011-07-17 02:40:17.000000000 +0900 +++ getmail-4.20.4/docs/configuration.txt 2011-07-24 11:06:51.776522780 +0900 @@ -513,7 +513,7 @@ destination this is. The possible values are: * Maildir -- deliver all messages to a local qmail-style maildir - * Mboxrd -- deliver all messages to a local mboxrd-format mbox file with + * Mboxo -- deliver all messages to a local mboxo-format mbox file with fcntl-type locking. * MDA_external -- use an external message delivery agent (MDA) to deliver messages. Typical MDAs include maildrop, procmail, and others. @@ -571,25 +571,25 @@ masked out of the given value at file creation time. The default value, which should be appropriate for most users, is "0600". - Mboxrd + Mboxo - The Mboxrd destination delivers to an mboxrd-format mbox file with either + The Mboxo destination delivers to an mboxo-format mbox file with either fcntl-type (lockf) or flock-type file locking. The file must already exist - and appear to be a valid mboxrd file before getmail will try to deliver to + and appear to be a valid mboxo file before getmail will try to deliver to it -- getmail will not create the file if it does not exist. If you want - to create a new mboxrd file for getmail to use, simply create a completely + to create a new mboxo file for getmail to use, simply create a completely empty (0-byte) file. You must ensure that all other programs accessing any the mbox file expect - mboxrd-format mbox files and the same type of file locking that you + mboxo-format mbox files and the same type of file locking that you configure getmail to use; failure to do so can cause mbox corruption. If you do not know what type of file locking your system expects, ask your system administrator. If you are the system administrator and don't know - what type of file locking your system expects, do not use Mboxrd files; + what type of file locking your system expects, do not use Mboxo files; use Maildirs instead. Note that delivering to mbox files over NFS can be unreliable and should be avoided; this is the case with any MDA. - The Mboxrd destination takes one required parameter: + The Mboxo destination takes one required parameter: * path (string) -- the path to the mbox file. This value will be expanded for leading ~ or ~USER and environment variables in the form @@ -598,15 +598,15 @@ configuration like this: [destination] - type = Mboxrd + type = Mboxo path = ~/inbox - The Mboxrd destination also takes two optional parameters: + The Mboxo destination also takes two optional parameters: * user (string) -- on Unix-like systems, if supplied, getmail will change the effective UID to that of the named user before delivering - messages to the mboxrd file. Note that this typically requires root + messages to the mboxo file. Note that this typically requires root privileges. getmail will not deliver to mbox files as root, so this "optional" parameter is required in that situation. * locktype (string) -- which type of file locking to use; may be "lockf" @@ -700,12 +700,12 @@ * destinations (tuple of quoted strings) -- the destinations which the messages will be passed to. A destination is a string that refers to another configuration file section by name (shortcuts for maildirs and - mboxrd files are also provided; see below), like this: + mboxo files are also provided; see below), like this: destinations = ('[other-destination-1]', '[other-destination-2]') [other-destination-1] - type = Mboxrd + type = Mboxo path = /var/spool/mail/alice user = alice @@ -714,12 +714,12 @@ path = /home/joe/Maildir/ user = joe - Because Maildir and Mboxrd destinations are common, you can specify + Because Maildir and Mboxo destinations are common, you can specify them directly as a shortcut if they do not require a user parameter. If the string (after expansion; see below) starts with a dot or slash and ends with a slash, it specifies the path of a Maildir destination, while if it starts with a dot or a slash and does not end with a - slash, it specifies the path of a Mboxrd destination. + slash, it specifies the path of a Mboxo destination. For instance, you can deliver mail to two maildirs with the following: @@ -737,7 +737,7 @@ type = MultiDestination destinations = ("~jeff/Maildir/", ) - * To deliver to an mboxrd file: + * To deliver to an mboxo file: [destination] type = MultiDestination @@ -776,7 +776,7 @@ MultiSorter compares the envelope recipient address of messages against a list of user-supplied regular expressions and delivers the message to the - destination (maildir, mboxrd file, or other) associated with any matching + destination (maildir, mboxo file, or other) associated with any matching patterns. A message can match multiple patterns and therefore be delivered to multiple matching destinations. Any message which matches none of the patterns is delivered to a default destination for the postmaster. @@ -790,7 +790,7 @@ * default (string) -- the destination for messages which aren't matched by any of the "locals" regular expressions. The destination can be a - maildir, mboxrd file, or other destination. See MultiDestination for + maildir, mboxo file, or other destination. See MultiDestination for an explanation of how the type of destination is interpreted from this value. @@ -861,7 +861,7 @@ user = jeff [alice] - type = Mboxrd + type = Mboxo path = ~alice/inbox user = alice @@ -920,7 +920,7 @@ MultiGuesser tries to guess what the envelope recipient address of the message might have been, by comparing addresses found in the message header against a list of user-supplied regular expressions, and delivers - the message to the destination (maildir, mboxrd file, or other) associated + the message to the destination (maildir, mboxo file, or other) associated with any matching patterns. A message can match multiple patterns and therefore be delivered to multiple matching destinations. Any message which matches none of the patterns is delivered to a default destination @@ -1392,7 +1392,7 @@ Using getmail as an MDA getmail includes helper scripts which allow you to use it to deliver mail - from other programs to maildirs or mboxrd files. + from other programs to maildirs or mboxo files. Using the getmail_maildir MDA @@ -1421,7 +1421,7 @@ Using the getmail_mbox MDA The getmail_mbox script can be used as an MDA from other programs to - deliver mail to mboxrd-format mbox files. It reads the mail message from + deliver mail to mboxo-format mbox files. It reads the mail message from stdin, and delivers it to an mbox path provided as an argument on the commandline. This path must (after expansion by the shell, if applicable) start with a dot or slash and not end with a slash. @@ -1437,7 +1437,7 @@ Example - You could deliver a message to an mboxrd-format mbox file named inbox + You could deliver a message to an mboxo-format mbox file named inbox located in a directory named mail in your home directory by running the following command with the message on stdin: diff -Nru getmail-4.20.4-orig/docs/documentation.html getmail-4.20.4/docs/documentation.html --- getmail-4.20.4-orig/docs/documentation.html 2011-07-17 02:40:17.000000000 +0900 +++ getmail-4.20.4/docs/documentation.html 2011-07-24 11:06:51.780522802 +0900 @@ -6,7 +6,7 @@ <title>getmail documentation (version 4)</title> <meta name="author" content="Charles Cazabon" /> <meta name="description" content="Official documentation for getmail version 4, an extensible mail-retrieval program with support for POP3, IMAP, SDPS, SSL, domain mailboxes, message filtering, and other features." /> - <meta name="keywords" content="getmail, getmail 4, POP3, IMAP, SSL, domain mailbox, multidrop, fetchmail replacement, message filtering, maildir, mboxrd, MDA" /> + <meta name="keywords" content="getmail, getmail 4, POP3, IMAP, SSL, domain mailbox, multidrop, fetchmail replacement, message filtering, maildir, mboxo, MDA" /> <link rel="Contents Up Index" title="Charles Cazabon's Software" href="../" /> <style type="text/css" media="all">@import "getmaildocs.css";</style> <style type="text/css" media="all">@import "/style/styles.css";</style> @@ -194,7 +194,7 @@ <ul> <li> native safe and reliable delivery support for maildirs and - mboxrd files, in addition to delivery through arbitrary external + mboxo files, in addition to delivery through arbitrary external message delivery agents (MDAs) </li> <li> diff -Nru getmail-4.20.4-orig/docs/documentation.txt getmail-4.20.4/docs/documentation.txt --- getmail-4.20.4-orig/docs/documentation.txt 2011-07-17 02:40:17.000000000 +0900 +++ getmail-4.20.4/docs/documentation.txt 2011-07-24 11:06:51.784522826 +0900 @@ -46,7 +46,7 @@ message recipient * reliability - * native safe and reliable delivery support for maildirs and mboxrd + * native safe and reliable delivery support for maildirs and mboxo files, in addition to delivery through arbitrary external message delivery agents (MDAs) * does not destroy information by rewriting mail headers diff -Nru getmail-4.20.4-orig/docs/faq.html getmail-4.20.4/docs/faq.html --- getmail-4.20.4-orig/docs/faq.html 2011-07-17 02:40:17.000000000 +0900 +++ getmail-4.20.4/docs/faq.html 2011-07-24 11:06:51.792522866 +0900 @@ -6,7 +6,7 @@ <title>getmail frequently-asked questions (FAQs) (version 4)</title> <meta name="author" content="Charles Cazabon" /> <meta name="description" content="Frequently-asked questions about getmail version 4" /> - <meta name="keywords" content="getmail FAQ, getmail 4 FAQ, POP3, IMAP, SSL, domain mailbox, multidrop, fetchmail replacement, message filtering, maildir, mboxrd, MDA" /> + <meta name="keywords" content="getmail FAQ, getmail 4 FAQ, POP3, IMAP, SSL, domain mailbox, multidrop, fetchmail replacement, message filtering, maildir, mboxo, MDA" /> <link rel="Contents Up Index" title="Charles Cazabon's Software" href="../" /> <style type="text/css" media="all">@import "getmaildocs.css";</style> <style type="text/css" media="all">@import "/style/styles.css";</style> @@ -118,7 +118,7 @@ <li><a href="faq.html#faq-configuring-mta">Do I have to run sendmail or another MTA to use getmail?</a></li> <li><a href="faq.html#faq-configuring-root">Will getmail deliver mail as root?</a></li> <li><a href="faq.html#faq-configuring-maildir">What's a maildir?</a></li> - <li><a href="faq.html#faq-configuring-mboxrd">What's "mboxrd" format?</a></li> + <li><a href="faq.html#faq-configuring-mboxo">What's "mboxo" format?</a></li> <li><a href="faq.html#faq-configuring-envelope">What's this "envelope sender" and "envelope recipient" stuff?</a></li> <li> <ul> @@ -140,7 +140,7 @@ <li><a href="faq.html#faq-how-no-received">How do I stop getmail adding a Received: header to messages?</a></li> <li><a href="faq.html#faq-how-smtp">How do I make getmail deliver messages by re-injecting with SMTP?</a></li> <li><a href="faq.html#faq-how-create-maildir">How do I create a maildir?</a></li> - <li><a href="faq.html#faq-how-create-mboxrd">How do I create an mboxrd file?</a></li> + <li><a href="faq.html#faq-how-create-mboxo">How do I create an mboxo file?</a></li> <li><a href="faq.html#faq-how-mh">How do I make getmail deliver messages to an mh folder?</a></li> <li><a href="faq.html#faq-how-daemon">How do I run getmail in "daemon" mode?</a></li> <li><a href="faq.html#faq-how-maxpersession">How do I make getmail stop after retrieving X messages so that the server actually flushes deleted messages?</a></li> @@ -440,7 +440,7 @@ <span class="file">[destination]</span> section, using your previous destination path values in a new <span class="file">type = Maildir</span>, - <span class="file">type = Mboxrd</span>, + <span class="file">type = Mboxo</span>, <span class="file">type = MDA_external</span>, or <span class="file">type = MultiSorter</span> @@ -703,7 +703,7 @@ <h3 id="faq-configuring-mta">Do I have to run sendmail or another MTA to use getmail?</h3> <p> - No. getmail delivers directly to maildirs, mboxrd files, or via arbitrary + No. getmail delivers directly to maildirs, mboxo files, or via arbitrary MDAs, and never injects mail via SMTP, so no MTA is necessary. </p> @@ -711,8 +711,8 @@ <p> No. When run as the root user on a Unix-like system, getmail drops privileges (switches to an unprivileged group and user id) before delivering - to maildirs or mboxrd files. You can specify the user explicitly, or - let getmail use the owner of the maildir or mboxrd file. + to maildirs or mboxo files. You can specify the user explicitly, or + let getmail use the owner of the maildir or mboxo file. </p> <p> If getmail attempts to deliver mail and finds it has UID 0 or GID 0, it @@ -733,9 +733,9 @@ for details. </p> -<h3 id="faq-configuring-mboxrd">What's "mboxrd" format?</h3> +<h3 id="faq-configuring-mboxo">What's "mboxo" format?</h3> <p> - There are various sub-types of the mbox mail storage format. mboxrd is + There are various sub-types of the mbox mail storage format. mboxo is the most reliable of them, though (like all mbox types) it still relies on file locking and is therefore more easily corrupted than maildir format. In particular, using mbox files with multiple writers over NFS can be @@ -971,7 +971,7 @@ password = my-pop3-password [destination] -type = Mboxrd +type = Mboxo path = ~/inbox </pre> @@ -1038,7 +1038,7 @@ <h3 id="faq-how-smtp">How do I make getmail deliver messages by re-injecting with SMTP?</h3> <p> - You don't need to. getmail can deliver to maildirs, mboxrd files, or + You don't need to. getmail can deliver to maildirs, mboxo files, or through arbitrary external MDAs. </p> <p> @@ -1063,7 +1063,7 @@ or alias if you like. </p> -<h3 id="faq-how-create-mboxrd">How do I create an mboxrd file?</h3> +<h3 id="faq-how-create-mboxo">How do I create an mboxo file?</h3> <p> Create a completely empty (i.e. zero bytes long) file via your favourite method. The standard utility @@ -1071,7 +1071,7 @@ is commonly used: </p> <pre class="example"> -$ touch /path/to/mboxrd +$ touch /path/to/mboxo </pre> <h3 id="faq-how-mh">How do I make getmail deliver messages to an mh folder?</h3> diff -Nru getmail-4.20.4-orig/docs/faq.txt getmail-4.20.4/docs/faq.txt --- getmail-4.20.4-orig/docs/faq.txt 2011-07-17 02:40:17.000000000 +0900 +++ getmail-4.20.4/docs/faq.txt 2011-07-24 11:06:51.796522882 +0900 @@ -191,7 +191,7 @@ configuration values in a new type = SimplePOP3Retriever or type = MultidropPOP3Retriever as appropriate. 4. Create a new [destination] section, using your previous destination - path values in a new type = Maildir, type = Mboxrd, type = + path values in a new type = Maildir, type = Mboxo, type = MDA_external, or type = MultiSorter destination as appropriate. 5. If you were retrieving messages from multiple mail accounts in a single version 3 getmail rc file, split them up into one account per @@ -350,15 +350,15 @@ Do I have to run sendmail or another MTA to use getmail? - No. getmail delivers directly to maildirs, mboxrd files, or via arbitrary + No. getmail delivers directly to maildirs, mboxo files, or via arbitrary MDAs, and never injects mail via SMTP, so no MTA is necessary. Will getmail deliver mail as root? No. When run as the root user on a Unix-like system, getmail drops privileges (switches to an unprivileged group and user id) before - delivering to maildirs or mboxrd files. You can specify the user - explicitly, or let getmail use the owner of the maildir or mboxrd file. + delivering to maildirs or mboxo files. You can specify the user + explicitly, or let getmail use the owner of the maildir or mboxo file. If getmail attempts to deliver mail and finds it has UID 0 or GID 0, it will refuse the delivery and print an error message. @@ -372,9 +372,9 @@ See http://qmail.org/man/man5/maildir.html and http://cr.yp.to/proto/maildir.html for details. - What's "mboxrd" format? + What's "mboxo" format? - There are various sub-types of the mbox mail storage format. mboxrd is the + There are various sub-types of the mbox mail storage format. mboxo is the most reliable of them, though (like all mbox types) it still relies on file locking and is therefore more easily corrupted than maildir format. In particular, using mbox files with multiple writers over NFS can be @@ -549,7 +549,7 @@ password = my-pop3-password [destination] - type = Mboxrd + type = Mboxo path = ~/inbox How do I ... @@ -590,7 +590,7 @@ How do I make getmail deliver messages by re-injecting with SMTP? - You don't need to. getmail can deliver to maildirs, mboxrd files, or + You don't need to. getmail can deliver to maildirs, mboxo files, or through arbitrary external MDAs. If you still think you need to, you can use getmail's external MDA support @@ -607,12 +607,12 @@ programs; you can use those, or make the above shell command a shellscript or alias if you like. - How do I create an mboxrd file? + How do I create an mboxo file? Create a completely empty (i.e. zero bytes long) file via your favourite method. The standard utility touch is commonly used: - $ touch /path/to/mboxrd + $ touch /path/to/mboxo How do I make getmail deliver messages to an mh folder? diff -Nru getmail-4.20.4-orig/docs/getmail.1 getmail-4.20.4/docs/getmail.1 --- getmail-4.20.4-orig/docs/getmail.1 2009-08-07 07:20:44.000000000 +0900 +++ getmail-4.20.4/docs/getmail.1 2011-07-24 11:06:51.800522902 +0900 @@ -1,6 +1,6 @@ .TH getmail "1" "August 2004" "getmail 4" "User Commands" .SH NAME -getmail \- retrieve messages from one or more POP3, IMAP4, or SDPS mailboxes and deliver to a maildir, mboxrd-format mbox file, or external MDA +getmail \- retrieve messages from one or more POP3, IMAP4, or SDPS mailboxes and deliver to a maildir, mboxo-format mbox file, or external MDA .SH SYNOPSIS .B getmail [\fIOPTION\fR] ... @@ -11,7 +11,7 @@ POP3 and IMAP are also supported. Single-user and domain (multi\-drop) mailboxes are supported. .PP -getmail has built-in support for delivering to maildirs, mboxrd-format mbox +getmail has built-in support for delivering to maildirs, mboxo-format mbox files, and external MDAs. .SH OPTIONS .TP diff -Nru getmail-4.20.4-orig/docs/getmail_fetch.1 getmail-4.20.4/docs/getmail_fetch.1 --- getmail-4.20.4-orig/docs/getmail_fetch.1 2009-08-07 07:20:44.000000000 +0900 +++ getmail-4.20.4/docs/getmail_fetch.1 2011-07-24 11:06:51.800522902 +0900 @@ -1,6 +1,6 @@ .TH getmail_fetch "1" "November 2005" "getmail 4" "User Commands" .SH NAME -getmail_fetch \- retrieve messages from one or more POP3 or POP3-over-SSL mailboxes and deliver to a maildir, mboxrd-format mbox file, or external MDA +getmail_fetch \- retrieve messages from one or more POP3 or POP3-over-SSL mailboxes and deliver to a maildir, mboxo-format mbox file, or external MDA .SH SYNOPSIS .B getmail_fetch [\fIOPTIONS\fR] \fISERVER\fR \fIUSERNAME\fR \fIPASSWORD\fR \fIDESTINATION\fR @@ -8,7 +8,7 @@ .\" Add any additional description here .PP getmail_fetch retrieves messages from POP3 or POP3-over-SSL mailboxes and delivers -to a maildir, mboxrd, or external MDA. This command is intended primarily for scripting, +to a maildir, mboxo, or external MDA. This command is intended primarily for scripting, and as such does not require a client-side configuration file, and does not record any state. .PP @@ -16,7 +16,7 @@ .PP If it begins with a dot or a slash and ends with a slash, it is assumed to be a path to a maildir. .PP -If it begins with a dot or a slash and does not end with a slash, it is assumed to be a path to an mboxrd file. +If it begins with a dot or a slash and does not end with a slash, it is assumed to be a path to an mboxo file. .PP If it begins with a pipe, it is assumed to be a path to an external MDA command. Note that arguments can be included in this string by separating diff -Nru getmail-4.20.4-orig/docs/getmail_mbox.1 getmail-4.20.4/docs/getmail_mbox.1 --- getmail-4.20.4-orig/docs/getmail_mbox.1 2009-08-07 07:20:44.000000000 +0900 +++ getmail-4.20.4/docs/getmail_mbox.1 2011-07-24 11:06:51.800522902 +0900 @@ -1,13 +1,13 @@ .TH getmail_mbox "1" "July 2004" "getmail 4" "User Commands" .SH NAME -getmail_mbox \- read a message from stdin and deliver to a named mboxrd-format mbox file with fcntl-style locking. +getmail_mbox \- read a message from stdin and deliver to a named mboxo-format mbox file with fcntl-style locking. .SH SYNOPSIS .B getmail_mbox [\fIOPTION\fR] \fIPATH\fR .SH DESCRIPTION .\" Add any additional description here .PP -Deliver a mail message from standard input, to the mboxrd-format mbox file named +Deliver a mail message from standard input, to the mboxo-format mbox file named PATH. PATH must start with a dot or a slash and must not end with a slash. fcntl-type locking is used; if your system requires another type of locking (such as diff -Nru getmail-4.20.4-orig/docs/getmailrc-examples getmail-4.20.4/docs/getmailrc-examples --- getmail-4.20.4-orig/docs/getmailrc-examples 2009-08-07 07:11:36.000000000 +0900 +++ getmail-4.20.4/docs/getmailrc-examples 2011-07-24 11:06:51.800522902 +0900 @@ -96,7 +96,7 @@ path = ~jeffp/Maildir/ # -# Example 6: same as (1), but deliver the messages to an mboxrd-format mbox +# Example 6: same as (1), but deliver the messages to an mboxo-format mbox # file as user "jeffp". # @@ -107,7 +107,7 @@ password = mailpassword [destination] -type = Mboxrd +type = Mboxo path = ~jeffp/Mail/inbox user = jeffp @@ -173,14 +173,14 @@ user = martinh [sam] -type = Mboxrd +type = Mboxo path = ~sam/Mail/inbox user = sam [christina-procmail] type = MDA_external path = /usr/local/bin/procmail -# procmail requires either that the message starts with an mboxrd-style +# procmail requires either that the message starts with an mboxo-style # "From " line (which getmail can generate by setting "unixfrom" to True), or # that the -f option is provided as below. arguments = ("-f", "%(sender)", "-m", "/home/christina/.procmailrc") diff -Nru getmail-4.20.4-orig/docs/troubleshooting.html getmail-4.20.4/docs/troubleshooting.html --- getmail-4.20.4-orig/docs/troubleshooting.html 2011-07-17 02:40:17.000000000 +0900 +++ getmail-4.20.4/docs/troubleshooting.html 2011-07-24 11:06:51.804522926 +0900 @@ -6,7 +6,7 @@ <title>getmail troubleshooting (version 4)</title> <meta name="author" content="Charles Cazabon" /> <meta name="description" content="Troubleshooting instructions for getmail version 4" /> - <meta name="keywords" content="getmail troubleshooting, getmail 4 troubleshooting, POP3, IMAP, SSL, domain mailbox, multidrop, fetchmail replacement, message filtering, maildir, mboxrd, MDA" /> + <meta name="keywords" content="getmail troubleshooting, getmail 4 troubleshooting, POP3, IMAP, SSL, domain mailbox, multidrop, fetchmail replacement, message filtering, maildir, mboxo, MDA" /> <link rel="Contents Up Index" title="Charles Cazabon's Software" href="../" /> <style type="text/css" media="all">@import "getmaildocs.css";</style> <style type="text/css" media="all">@import "/style/styles.css";</style> @@ -86,8 +86,8 @@ <li><a href="troubleshooting.html#errmsg-config-maildir-slash">Configuration error: maildir path missing trailing /</a></li> <li><a href="troubleshooting.html#errmsg-config-maildir-not">Configuration error: not a maildir (<span class="meta">path</span>)</a></li> <li><a href="troubleshooting.html#errmsg-config-maildir-not2">Configuration error: ... (path: maildir subdirectory "<span class="meta">path</span>" does not exist)</a></li> - <li><a href="troubleshooting.html#errmsg-config-mboxrd-not">Configuration error: not an mboxrd file (<span class="meta">path</span>)</a></li> - <li><a href="troubleshooting.html#errmsg-config-mboxrd-missing">Configuration error: mboxrd does not exist</a></li> + <li><a href="troubleshooting.html#errmsg-config-mboxo-not">Configuration error: not an mboxo file (<span class="meta">path</span>)</a></li> + <li><a href="troubleshooting.html#errmsg-config-mboxo-missing">Configuration error: mboxo does not exist</a></li> <li><a href="troubleshooting.html#errmsg-config-envelope-recipient">Configuration error: the <span class="meta">fieldname</span> header field does not record the envelope recipient address</a></li> <li><a href="troubleshooting.html#errmsg-config-root-commands">Configuration error: refuse to invoke external commands as root or GID 0 by default</a></li> <li><a href="troubleshooting.html#errmsg-config-no-command">Configuration error: no such command <span class="meta">path</span></a></li> @@ -106,7 +106,7 @@ <ul> <li><a href="troubleshooting.html#errmsg-delivery-root-maildir">Delivery error: maildir delivery process failed (refuse to deliver mail as root)</a></li> <li><a href="troubleshooting.html#errmsg-delivery-root-mbox">Delivery error: mbox delivery process failed (refuse to deliver mail as root)</a></li> - <li><a href="troubleshooting.html#errmsg-delivery-not-mbox">Delivery error: mbox delivery process failed (not an mboxrd file)</a></li> + <li><a href="troubleshooting.html#errmsg-delivery-not-mbox">Delivery error: mbox delivery process failed (not an mboxo file)</a></li> </ul> </li> <li><a href="troubleshooting.html#errmsg-operation-">Error: …</a></li> @@ -239,18 +239,18 @@ and that getmail has permission to write to it. </p> -<h4 id="errmsg-config-mboxrd-not" class="errmsg">Configuration error: not an mboxrd file (<span class="meta">path</span>)</h4> +<h4 id="errmsg-config-mboxo-not" class="errmsg">Configuration error: not an mboxo file (<span class="meta">path</span>)</h4> <p> - The specified mboxrd path + The specified mboxo path <span class="meta">path</span> - does not appear to be a valid mboxrd file. To avoid corrupting files in + does not appear to be a valid mboxo file. To avoid corrupting files in the event of a user typo, getmail will not deliver messages to files that - do not appear to be valid mboxrd files. + do not appear to be valid mboxo files. </p> -<h4 id="errmsg-config-mboxrd-missing" class="errmsg">Configuration error: mboxrd does not exist</h4> +<h4 id="errmsg-config-mboxo-missing" class="errmsg">Configuration error: mboxo does not exist</h4> <p> - The specified mboxrd does not exist. getmail will not create mbox files; + The specified mboxo does not exist. getmail will not create mbox files; ensure they exist before trying to deliver to them. </p> @@ -333,7 +333,7 @@ <span class="file">getmailrc</span> file, or let getmail default to the user who is the owner of the mbox file. </p> -<h4 id="errmsg-delivery-not-mbox" class="errmsg">Delivery error: mbox delivery process failed (not an mboxrd file)</h4> +<h4 id="errmsg-delivery-not-mbox" class="errmsg">Delivery error: mbox delivery process failed (not an mboxo file)</h4> <p> The specified mbox file does not appear to be a valid mbox file. </p> diff -Nru getmail-4.20.4-orig/docs/troubleshooting.txt getmail-4.20.4/docs/troubleshooting.txt --- getmail-4.20.4-orig/docs/troubleshooting.txt 2011-07-17 02:40:17.000000000 +0900 +++ getmail-4.20.4/docs/troubleshooting.txt 2011-07-24 11:06:51.808522942 +0900 @@ -69,15 +69,15 @@ it is missing one of the required subdirectories. Check to ensure that it is a valid maildir and that getmail has permission to write to it. - Configuration error: not an mboxrd file (path) + Configuration error: not an mboxo file (path) - The specified mboxrd path path does not appear to be a valid mboxrd file. + The specified mboxo path path does not appear to be a valid mboxo file. To avoid corrupting files in the event of a user typo, getmail will not - deliver messages to files that do not appear to be valid mboxrd files. + deliver messages to files that do not appear to be valid mboxo files. - Configuration error: mboxrd does not exist + Configuration error: mboxo does not exist - The specified mboxrd does not exist. getmail will not create mbox files; + The specified mboxo does not exist. getmail will not create mbox files; ensure they exist before trying to deliver to them. Configuration error: the fieldname header field does not record the envelope @@ -148,7 +148,7 @@ section of your getmailrc file, or let getmail default to the user who is the owner of the mbox file. - Delivery error: mbox delivery process failed (not an mboxrd file) + Delivery error: mbox delivery process failed (not an mboxo file) The specified mbox file does not appear to be a valid mbox file. diff -Nru getmail-4.20.4-orig/getmailcore/baseclasses.py getmail-4.20.4/getmailcore/baseclasses.py --- getmail-4.20.4-orig/getmailcore/baseclasses.py 2009-04-06 04:43:53.000000000 +0900 +++ getmail-4.20.4/getmailcore/baseclasses.py 2011-07-24 11:05:44.168187536 +0900 @@ -216,7 +216,7 @@ first_line = f.readline() if first_line and first_line[:5] != 'From ': # Not an mbox file; abort here - raise getmailConfigurationError('%s: not an mboxrd file' % val) + raise getmailConfigurationError('%s: not an mboxo file' % val) # Reset atime and mtime try: os.utime(val, (status_old.st_atime, status_old.st_mtime)) diff -Nru getmail-4.20.4-orig/getmailcore/destinations.py getmail-4.20.4/getmailcore/destinations.py --- getmail-4.20.4-orig/getmailcore/destinations.py 2010-06-30 10:02:07.000000000 +0900 +++ getmail-4.20.4/getmailcore/destinations.py 2011-07-24 11:54:57.846834102 +0900 @@ -5,7 +5,7 @@ Currently implemented: Maildir - Mboxrd + Mboxo MDA_qmaillocal (deliver though qmail-local as external MDA) MDA_external (deliver through an arbitrary external MDA) MultiSorter (deliver to a selection of maildirs/mbox files based on matching @@ -15,7 +15,7 @@ __all__ = [ 'DeliverySkeleton', 'Maildir', - 'Mboxrd', + 'Mboxo', 'MDA_qmaillocal', 'MDA_external', 'MultiDestinationBase', @@ -210,18 +210,21 @@ return self ####################################### -class Mboxrd(DeliverySkeleton, ForkingBase): - '''mboxrd destination with fcntl-style locking. +class Mboxo(DeliverySkeleton, ForkingBase): + '''mboxo destination with fcntl-style locking. Parameters: - path - path to mboxrd file, which will be expanded for leading '~/' + path - path to mboxo file, which will be expanded for leading '~/' or '~USER/', as well as environment variables. - Note the differences between various subtypes of mbox format (mboxrd, mboxo, + Note the differences between various subtypes of mbox format (mboxo, mboxrd, mboxcl, mboxcl2) and differences in locking; see the following for details: http://qmail.org/man/man5/mbox.html http://groups.google.com/groups?selm=4ivk9s%24bok%40hustle.rahul.net + http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/mail-mbox-formats.html + Python email module uses mboxo. + http://docs.python.org/library/mailbox.html#mbox ''' _confitems = ( ConfInstance(name='configparser', required=False), @@ -238,10 +241,10 @@ def __str__(self): self.log.trace() - return 'Mboxrd %s' % self.conf['path'] + return 'Mboxo %s' % self.conf['path'] def showconf(self): - self.log.info('Mboxrd(%s)\n' % self._confstring()) + self.log.info('Mboxo(%s)\n' % self._confstring()) def __deliver_message_mbox(self, uid, gid, msg, delivered_to, received, stdout, stderr): @@ -261,10 +264,10 @@ ) if not os.path.exists(self.conf['path']): - raise getmailDeliveryError('mboxrd does not exist (%s)' + raise getmailDeliveryError('mboxo does not exist (%s)' % self.conf['path']) if not os.path.isfile(self.conf['path']): - raise getmailDeliveryError('not an mboxrd file (%s)' + raise getmailDeliveryError('not an mboxo file (%s)' % self.conf['path']) # Open mbox file, refusing to create it if it doesn't exist @@ -279,7 +282,7 @@ if first_line and not first_line.startswith('From '): # Not an mbox file; abort here unlock_file(f, self.conf['locktype']) - raise getmailDeliveryError('not an mboxrd file (%s)' + raise getmailDeliveryError('not an mboxo file (%s)' % self.conf['path']) # Seek to end f.seek(0, 2) @@ -370,11 +373,11 @@ out = stdout.read().strip() err = stderr.read().strip() - self.log.debug('mboxrd delivery process %d exited %d\n' + self.log.debug('mboxo delivery process %d exited %d\n' % (childpid, exitcode)) if exitcode or err: - raise getmailDeliveryError('mboxrd delivery %d error (%d, %s)' + raise getmailDeliveryError('mboxo delivery %d error (%d, %s)' % (childpid, exitcode, err)) if out: @@ -807,7 +810,7 @@ elif (p.startswith('/') or p.startswith('.')) and p.endswith('/'): dest = Maildir(path=p) elif (p.startswith('/') or p.startswith('.')): - dest = Mboxrd(path=p) + dest = Mboxo(path=p) else: raise getmailConfigurationError( 'specified destination %s not of recognized type' % p @@ -944,7 +947,7 @@ configuration. If the recipient address matches a given pattern, it will be delivered to the corresponding destination. A destination is assumed to be a maildir if it starts with a dot or slash and ends - with a slash. A destination is assumed to be an mboxrd file if it + with a slash. A destination is assumed to be an mboxo file if it starts with a dot or a slash and does not end with a slash. A destination may also be specified by section name, i.e. "[othersectionname]". Multiple patterns may match a given recipient diff -Nru getmail-4.20.4-orig/getmail_fetch getmail-4.20.4/getmail_fetch --- getmail-4.20.4-orig/getmail_fetch 2009-08-07 07:20:45.000000000 +0900 +++ getmail-4.20.4/getmail_fetch 2011-07-24 11:05:24.272088870 +0900 @@ -176,7 +176,7 @@ 'configparser' : instance, } else: - destination_func = destinations.Mboxrd + destination_func = destinations.Mboxo destination_args = { 'path' : destination, 'configparser' : instance, diff -Nru getmail-4.20.4-orig/getmail_mbox getmail-4.20.4/getmail_mbox --- getmail-4.20.4-orig/getmail_mbox 2009-08-07 07:20:45.000000000 +0900 +++ getmail-4.20.4/getmail_mbox 2011-07-24 11:05:24.272088870 +0900 @@ -66,14 +66,14 @@ msg.recipient = os.environ['RECIPIENT'] try: - dest = destinations.Mboxrd(path=path) + dest = destinations.Mboxo(path=path) d = dest.deliver_message(msg, True, False) except getmailDeliveryError, o: - raise SystemExit('Error: delivery error delivering to mboxrd %s (%s)' + raise SystemExit('Error: delivery error delivering to mboxo %s (%s)' % (path, o)) except StandardError, o: - raise SystemExit('Error: other error delivering to mboxrd %s (%s)' + raise SystemExit('Error: other error delivering to mboxo %s (%s)' % (path, o)) if verbose: - sys.stdout.write('Delivered to mboxrd %s\n' % path) + sys.stdout.write('Delivered to mboxo %s\n' % path) diff -Nru getmail-4.20.4-orig/PKG-INFO getmail-4.20.4/PKG-INFO --- getmail-4.20.4-orig/PKG-INFO 2011-07-17 02:40:20.000000000 +0900 +++ getmail-4.20.4/PKG-INFO 2011-07-24 11:05:24.264088830 +0900 @@ -7,7 +7,7 @@ Author-email: charlesc-getm...@pyropus.ca License: GNU GPL version 2 Download-URL: http://pyropus.ca/software/getmail/#download -Description: getmail is a multi-protocol mail retrieval system withsupport for simple and domain POP3 and IMAP4 mailboxes, domain SDPS mailboxes, POP3-over-SSL and IMAP-over-SSL, mail sorting, message filtering, and delivery to Maildirs, Mboxrd files, external MDAs, and other advanced features. +Description: getmail is a multi-protocol mail retrieval system withsupport for simple and domain POP3 and IMAP4 mailboxes, domain SDPS mailboxes, POP3-over-SSL and IMAP-over-SSL, mail sorting, message filtering, and delivery to Maildirs, Mboxo files, external MDAs, and other advanced features. Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Environment :: Console diff -Nru getmail-4.20.4-orig/README getmail-4.20.4/README --- getmail-4.20.4-orig/README 2009-08-07 07:20:45.000000000 +0900 +++ getmail-4.20.4/README 2011-07-24 11:05:24.264088830 +0900 @@ -1,5 +1,5 @@ getmail version 4 -- a flexible, extensible mail retrieval system with -support for POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, +support for POP3, IMAP4, SSL variants of both, maildirs, mboxo files, external MDAs, arbitrary message filtering, single-user and domain-mailboxes, and many other useful features. diff -Nru getmail-4.20.4-orig/setup.py getmail-4.20.4/setup.py --- getmail-4.20.4-orig/setup.py 2007-11-24 01:26:55.000000000 +0900 +++ getmail-4.20.4/setup.py 2011-07-24 11:05:24.276088895 +0900 @@ -64,7 +64,7 @@ long_description=('getmail is a multi-protocol mail retrieval system with' 'support for simple and domain POP3 and IMAP4 mailboxes, domain SDPS ' 'mailboxes, POP3-over-SSL and IMAP-over-SSL, mail sorting, message ' - 'filtering, and delivery to Maildirs, Mboxrd files, external MDAs, and ' + 'filtering, and delivery to Maildirs, Mboxo files, external MDAs, and ' 'other advanced features.'), author='Charles Cazabon', author_email='charlesc-getm...@pyropus.ca',