Subject: mailbox format problems

From: Imre Gergely <[email-masked]>
Date: Mon, 8 Dec 2003 15:25:06 +0200 (EET)

hi

i downloaded the imap.tar.Z, and compiled the source. then, i converted my 
unix mailbox to mbx format. there was no problem, pine could open it.
then i tried to open it through pop3:

-ERR Unable to open user's INBOX
Connection closed by foreign host.

in syslog i get the following error:
Dec  8 15:21:53 imi ipop3d[14112]: pop3 service init from 127.0.0.1
Dec  8 15:21:58 imi ipop3d[14112]: Can't open INBOX (file 
/var/spool/mail/cemc): not in valid mailbox format
Dec  8 15:21:58 imi ipop3d[14112]: Error opening or locking INBOX 
user=cemc host=localhost.localdomain [127.0.0.1]

when i try through imap, it says no messages. what did i do wrong?

[root@imi root]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)

imap and pop3 runs through xinetd.
thx.

-- 
Gergely Imre                       email: [email-masked]
sysadmin   mobile: +40-745-105592, office: +40-266-317500
Nextra Tele Com SRL   str. Florilor 28/1, 4100 M-Ciuc, RO
http://www.nextra.ro/gimre                 ICQ# 101510959

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Sebastian Hagedorn <[email-masked]>
Date: Mon, 08 Dec 2003 15:35:36 +0100

--On Montag, 8. Dezember 2003 15:25 Uhr +0200 Imre Gergely 
<[email-masked]> wrote:

> i downloaded the imap.tar.Z, and compiled the source. then, i converted
> my  unix mailbox to mbx format. there was no problem, pine could open it.

The mailbox in /var/spool/mail has to be in mbox format. If you want to 
have an mbx INBOX, you need to create an mbx file named /home/cemc/INBOX. 
Mail will be slurped into that file from /var/spool/mail each time the 
INBOX is accessed.

Greetings, Sebastian
--
Sebastian Hagedorn		PGP key ID: 0x4D105B45
Ehrenfeldgürtel 156
50823 Köln
http://www.spinfo.uni-koeln.de/~hgd/

---

From: Imre Gergely <[email-masked]>
Date: Tue, 9 Dec 2003 11:02:19 +0200 (EET)

> Mail will be slurped into that file from /var/spool/mail each time the 

ok, it works this way. thanks.

and it works only _this_ way, no other way? i mean i have to create home 
dirs for each and every user whom i want to use this mbx format? there's 
no way to tell imap/pop3/sendmail to use mbx directly in /var/spool/mail?

another q: if i have .procmailrc, and i'm sorting my mail to ~/mail/* with 
it, how can i use dmail/tmail to put those mailboxes in mbx format? and 
will i be able to open them with imap? (ie in outlook, after subscribing 
to those folders)

---

From: "Nick Hodulik" <[email-masked]>
Date: Tue, 9 Dec 2003 11:27:10 -0800

There is a way. You have to dig down into the code and change "CREATEPROTO"
and "EMPTYPROTO" from mbox to mbx. Assuming your in *nix you'll have to go
to src/osdep/unix/env_unix.c or something similar to do this. If you want
mail to live in a subdirectory called "mail" in each users home dir then you
must change src/osdep/unix/Makefile to reflect this as well.

Which brings me to a question: why can't these options be passed in to
UW-IMAP as compile-time switches? Every single time there's a new release I
have to delve into the code and change these flags, and I'm sure I'm not the
only one. It would be one thing if they were really esoteric things, but
they aren't: they're very basic, important changes that make UW-IMAP usable
on production servers.

What can be done to change this so that these things can be made much easier
to setup? I understand the goal of wanting out-of-the-box functionality but
that really shouldn't come at the expense of ease-of-use and intuitive
design. I find this frustrating, as UW-IMAP is literally the only mature
software package I use with an antiquated build system.

Mark, you tend to answer these sort of requests/constructive criticisms
tersely; I respectfully ask that you consider making these kinds of changes,
as they would benefit the entire community of users who depend on your
otherwise excellent software.

n

---

From: Christian Kratzer <[email-masked]>
Date: Tue, 9 Dec 2003 20:37:17 +0100 (CET)

Hi,

> UW-IMAP as compile-time switches? Every single time there's a new release I
[snipp]

you might want to read ./docs/imaprc.txt in the uw-imap tarball.
If you are prepared to "accept the risk" :) you might find the runtime
configuration options quite helpfull.

Greetings
Christian

-- 
CK Software GmbH
Christian Kratzer,         Schwarzwaldstr. 31, 71131 Jettingen
Email: [email-masked]
Phone: +49 7452 889-135    Open Software Solutions, Network Security
Fax:   +49 7452 889-136    FreeBSD spoken here!

---

From: Mark Crispin <[email-masked]>
Date: Tue, 9 Dec 2003 12:29:31 -0800 (Pacific Standard Time)

On Tue, 9 Dec 2003, Imre Gergely wrote:
> dirs for each and every user whom i want to use this mbx format?

Correct.

> there's

Correct.

You could hack the source, but the design of mbx format is *NOT* to use a
mail spool directory.

> will i be able to open them with imap? (ie in outlook, after subscribing

procmail has a feature to pipe to a program.  The program you would use
for this purpose is dmail, not tmail.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

---

From: Mark Crispin <[email-masked]>
Date: Tue, 9 Dec 2003 12:49:20 -0800 (Pacific Standard Time)

On Tue, 9 Dec 2003, Nick Hodulik wrote:
> to src/osdep/unix/env_unix.c or something similar to do this.

The CREATEPROTO and EMPTYPROTO definitions are in the
src/osdep/unix/Makefile.

It is meaningless to set EMPTYPROTO to mbx.  You can do it, but it won't
accomplish anything.  It will make empty files unusable.

> If you want

Now, that is in env_unix.c.

> UW-IMAP as compile-time switches?

You most certainly can set CREATEPROTO and EMPTYPROTO as compile-time
switches.

> Every single time there's a new release I

How?

If you have a shell access system, then by setting the subdirectory you
are dictating to your shell users where they store their mail for use by
IMAP.  If the user runs a client that uses some other name, you've screwed
him; you've unilaterally made the decision for *all* users that one, and
only one, subdirectory name must be used.

If you don't allow shell access to the IMAP server, then may be no real
need to put mail in a subdirectory.  The whole point of a subdirectory is
to separate mail from other files that a user may have.  But if it's a
dedicated IMAP server, there shouldn't be any files.

Of course there are systems which don't neatly fit into either of the
above categories.  However -- and this point bears emphasizing -- the cost
of miscategorizing such a system is merely that the client has to have a
"prefix"  configured.  The cost of making the opposite mistake is a denial
of access to mail.

-- Mark --

---

From: David B Funk <[email-masked]>
Date: Wed, 10 Dec 2003 00:36:07 -0600 (CST)

> must change src/osdep/unix/Makefile to reflect this as well.

Before you tell people to do this, you might want to go read the
documentation to find out why setting EMPTYPROTO to "mbx" is meaningless
and wrong.

Dave

-- 
Dave Funk                                  University of Iowa
<dbfunk (at) engineering.uiowa.edu>        College of Engineering
319/335-5751   FAX: 319/384-0549           1256 Seamans Center
Sys_admin/Postmaster/cell_admin            Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{

---

From: "Nick Hodulik" <[email-masked]>
Date: Wed, 10 Dec 2003 10:22:07 -0800

I do this not because it actually _does_ anything but because I don't want
any trace of mbox anywhere on my system. I also delete all traces of "mbox"
from the driver list. Just because it is meaningless does not mean it's
wrong, AFAIK. What would be wrong for me would be creating an mbox mailbox.
We had so many problems with mbox at my last large installation of UW-IMAP
that I want it nowhere near my servers.

>From what I can tell setting EMPTYPROTO to mbx is in fact meaningless but
won't hurt anything and will achieve my goal of removing mbox. I've run it
for four years or so with no ill effects. Someone care to comment?

n
----- Original Message ----- 
From: "David B Funk" <[email-masked]>
To: "Nick Hodulik" <[email-masked]>
Cc: "Sebastian Hagedorn" <[email-masked]>;
<[email-masked]>
Sent: Tuesday, December 09, 2003 10:36 PM
Subject: Re: mailbox format problems

---

From: Mark Crispin <[email-masked]>
Date: Wed, 10 Dec 2003 11:23:41 -0800 (PST)

The only thing that you need to do to avoid creating files in traditional
UNIX format is to change CREATEPROTO.

By setting EMPTYPROTO to mbx, you introduce a bug into imapd.  Empty files
can not be in mbx format, so what will happen is that you'll get an
obscure error message (such as "indeterminate mailbox format").

-- Mark --