Subject: How to enable mbx format

From: Mats Dufberg <[email-masked]>
Date: Sun, 8 Jul 2001 03:11:52 +0200 (CEST)

In <http://www.washington.edu/pine/faq/sysadmins.html> I read:

  An mbx format mailbox can be created by prefixing the desired name with
  "#driver.mbx/". For example, if you want an mbx format mailbox called
  "test", create "#driver.mbx/test". The "#driver.mbx/" prefix is used
  only when creating the mailbox; to open it, just use "test".

I've tried to create such a mailbox both with pine 4.21 and 4.30 but pine
does not recognize it. Could anyone describe in more details how this is
done?

Mats

-----------------------------------------------------------------
Mats Dufberg                                 [email-masked]
Blåarvsgränd 42                                    +46-8-38 48 59
SE-162 45 Vällingby, Sweden                      +46-709-17 48 42

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: Eduardo Chappa <[email-masked]>
Date: Mon, 9 Jul 2001 12:32:39 -0700 (PDT)

*** Mats Dufberg ([email-masked]) wrote in the pine-info list on Jul...:

:) In <http://www.washington.edu/pine/faq/sysadmins.html> I read:
:)
:)   An mbx format mailbox can be created by prefixing the desired name with
:)   "#driver.mbx/". For example, if you want an mbx format mailbox called
:)   "test", create "#driver.mbx/test". The "#driver.mbx/" prefix is used
:)   only when creating the mailbox; to open it, just use "test".
:)
:) I've tried to create such a mailbox both with pine 4.21 and 4.30 but pine
:) does not recognize it. Could anyone describe in more details how this is
:) done?

I tried to follow the directions here. I went to the folders-collection,
pressed "A", and wrote the text above. I was succesful only when I gave
the path relative to $HOME, so in my case I had to write something like:

#driver.mbx/mail/test

since the suggested instruction you found created the folder in
$HOME/test. Also, when I added the folder as specified above I received a
message stating that the folder had been created outside the collection
and the collection folder list was not updated, I think this is a bug,
since the folder "test" was actually located in the collection that I was
trying to add it to. Only when I updated the list I saw the folder added.

-- 
Eduardo
http://www.math.washington.edu/~chappa/pine/

---

From: Mats Dufberg <[email-masked]>
Date: Mon, 9 Jul 2001 22:17:55 +0200 (CEST)

> the path relative to $HOME, so in my case I had to write something like:

Ah, that was the trick! What a kludge!

> trying to add it to. Only when I updated the list I saw the folder added.

Does that mean that you have to do that each time your want to create a
folder in the MBX format? I hope that the pine team has thought of a
configuration solution in the cf-file...

Have you used the MBX format? Have you seen any problems?

Looking at the new file, there are only two differences in the format:

1. A 2k binary header header is preprended the mail file.
2. The mail delimitor is different.

The two differences are of no problem if one wants to convert back to
traditional unix mailbox format. 

Am I right?

Mats

---

From: Eduardo Chappa <[email-masked]>
Date: Mon, 9 Jul 2001 13:26:52 -0700 (PDT)

*** Mats Dufberg ([email-masked]) wrote today:

:) Does that mean that you have to do that each time your want to create a
:) folder in the MBX format? I hope that the pine team has thought of a
:) configuration solution in the cf-file...

Actually you can make pine create files in any format you like, if you
always want to have pine create folders in the mbx format you should edit
the pine4.XX/imap/src/osdep/unix/Makefile file and change

CREATEPROTO=unixproto

to

CREATEPROTO=mbxproto

:) Have you used the MBX format? Have you seen any problems?

Yes I have, and have never had any problems. Notice however that you
should never edit a folder in mbx format, or it will be corrupted when you
save it. If you plan to edit it, you should use a binary editor, like
emacs.

:) Looking at the new file, there are only two differences in the format:
:)
:) 1. A 2k binary header header is preprended the mail file.
:) 2. The mail delimitor is different.
:)
:) The two differences are of no problem if one wants to convert back to
:) traditional unix mailbox format.
:)
:) Am I right?

Right, I've never had any problems moving back to unix format. The extra
detail contained in the headers is the binary size of the message (the
number of characters until the next delimiter header, including \n, etc).

---

From: Mats Dufberg <[email-masked]>
Date: Mon, 9 Jul 2001 22:55:11 +0200 (CEST)

> the pine4.XX/imap/src/osdep/unix/Makefile file and change

That means that there is no cf-file option that will do the same? I always
like to convert in small steps...

I just converted my INBOX too. There the file had to be ~/INBOX (magic
#driver.mbx/INBOX) and not ~/mail/INBOX (magic #driver.mbx/mail/INBOX). I
would have prefered  the latter...

> save it. If you plan to edit it, you should use a binary editor, like

Yes, but the format still allows you to do grep. :-)

> number of characters until the next delimiter header, including \n, etc).

That is good to know even if you never want to go back. :-)

> http://www.math.washington.edu/~chappa/pine/

You've got some useful stuff there. :-)

Mats

---

From: Eduardo Chappa <[email-masked]>
Date: Mon, 9 Jul 2001 13:59:54 -0700 (PDT)

*** Mats Dufberg ([email-masked]) wrote in the pine-info list today:

:) That means that there is no cf-file option that will do the same? I always
:) like to convert in small steps...
:)
:) I just converted my INBOX too. There the file had to be ~/INBOX (magic
:) #driver.mbx/INBOX) and not ~/mail/INBOX (magic #driver.mbx/mail/INBOX). I
:) would have prefered  the latter...

You should be careful here, are you using a tool like dmail to deliver
mail to your inbox. I think that if you don't you run into the dabger of
corrupting your inbox. Get dmail from the
ftp://ftp.cac.washington.edu/imap/imap.utils.tar.Z and untar/compile in
the Pine4.33 directory.

---

From: Mats Dufberg <[email-masked]>
Date: Mon, 9 Jul 2001 23:07:59 +0200 (CEST)

> ftp://ftp.cac.washington.edu/imap/imap.utils.tar.Z and untar/compile in

Isn't pine capable of doing the conversion? I haven't changed the deliver
process. All mail is still delivers to /var/mail/*. Pine does the
conversion for me and puts the mail into the new INBOX.

From <http://www.washington.edu/pine/faq/sysadmins.html>:

  A user can have their INBOX in mbx format as well, by creating
  "#driver.mbx/INBOX". Mail will be automatically moved from the mail
  spool to the mbx format INBOX whenever Pine or an IMAP/POP server is
  run.

(I don't have any IMAP running.)

Mats

---

From: Eduardo Chappa <[email-masked]>
Date: Mon, 9 Jul 2001 14:17:21 -0700 (PDT)

:) On Mon, 9 Jul 2001, Eduardo Chappa wrote:
:)
:) > You should be careful here, are you using a tool like dmail to
:) > deliver mail to your inbox. I think that if you don't you run into
:) > the dabger of corrupting your inbox. Get dmail from the
:) > ftp://ftp.cac.washington.edu/imap/imap.utils.tar.Z and untar/compile
:) > in the Pine4.33 directory.
:)
:) Isn't pine capable of doing the conversion? I haven't changed the
:) deliver process. All mail is still delivers to /var/mail/*. Pine does
:) the conversion for me and puts the mail into the new INBOX.

No, Pine will only *read* folders, Pine does not do delivering of
messages. I use procmail to deliver to other incoming folders in mbx
format (those that I share with other people). I see, however, that you
are not having any problem, so maybe you can ignore this. In case you need
dmail, the way I use it is to deliver messages through a recipe in
procmail, as follows:

:0 -c
* ^Sender:[email-masked]
|/full/path/to/dmail +.inc-fld/imap-list.mbx

If you need to send it to the INBOX, change "+.inc-fld/imap-list.mbx" by
your login name.

:) >From <http://www.washington.edu/pine/faq/sysadmins.html>:
:)
:)   A user can have their INBOX in mbx format as well, by creating
:)   "#driver.mbx/INBOX". Mail will be automatically moved from the mail
:)   spool to the mbx format INBOX whenever Pine or an IMAP/POP server is
:)   run.
:)
:) (I don't have any IMAP running.)

You don't need any imap running in order to use mbox format, you just need
the c-client library compiled and programs compiled with it in order to
read/write those folders. I have never tried to see if Pine would convert
automatically part of a folder from unix to mbx, if the folder was in the
mbx format and the delivering tool, delivered in unix format. That would
be nice, but I haven't tried it.

---

From: Mats Dufberg <[email-masked]>
Date: Mon, 9 Jul 2001 23:30:41 +0200 (CEST)

On Mon, 9 Jul 2001, Eduardo Chappa wrote:

> are not having any problem, so maybe you can ignore this.

I didn't mean that pine was doing the delivery. It is done by
/usr/libexec/mail.local. The mail is delivered to /var/mail/dufberg. The
only thing I did was to create ~/INBOX in MBX format, and now pine moves
all incoming mail from /var/mail/dufberg to ~/INBOX just as it says in
<http://www.washington.edu/pine/faq/sysadmins.html#11.2>.

> In case you need

That is good to know!

> If you need to send it to the INBOX, change "+.inc-fld/imap-list.mbx" by

That could move the INBOX from ~ to ~/mail.

> I have never tried to see if Pine would convert

It seems to work well. :-)

Mats

---

From: Eduardo Chappa <[email-masked]>
Date: Mon, 9 Jul 2001 14:43:45 -0700 (PDT)

:) I didn't mean that pine was doing the delivery. It is done by
:) /usr/libexec/mail.local. The mail is delivered to /var/mail/dufberg.
:) The only thing I did was to create ~/INBOX in MBX format, and now pine
:) moves all incoming mail from /var/mail/dufberg to ~/INBOX just as it
:) says in <http://www.washington.edu/pine/faq/sysadmins.html#11.2>.

Ok, so if it's Pine moving the mail, then you won't have any problems.

:) > In case you need dmail, the way I use it is to deliver messages
:) > through a recipe in procmail, as follows:
:) >
:) > :0 -c
:) > * ^Sender:[email-masked]
:) > |/full/path/to/dmail +.inc-fld/imap-list.mbx
:)
:) That is good to know!
:)
:) > If you need to send it to the INBOX, change "+.inc-fld/imap-list.mbx" by
:) > your login name.
:)
:) That could move the INBOX from ~ to ~/mail.

If you just write your login name (dufberg), dmail will put the mail in
/var/mail/dufberg. When you write a "+something", the path to something is
considered with respect to $HOME.