Mailbox format how-to

2004-11-08 Thread Chris Ross
  Hello there.  I am investigating converting my mail server to using
MBX format (vs. mbox) for everything.  Using tmail for delivery (via
sendmail 8.12), and uw-imap 2004 for access to INBOX and personal folders.
  So, my question is this.  Is there some sort of how-to for building
a system?  I know I need to:
  - modify sendmail.cf (and friends: submit.cf?) to call tmail instead
of mail.local.  The tmail man page has a little info on this.
  - Modify by calls in my procmailrc to use dmail instead of just
specifying the mailbox name (i thing.  this right?)
  So, is there any way to tell tmail to deliver to an mbx format
main mail spool if the file doesn't already exist?  I know if
it exists, it'll deliver in the correct format, but what if it
vanishes?
  How hard is it to modify procmailrc's to use dmail?
  A single source of information would be nice, if there was one.
Right now there seem to be a small number of sources of info
for different parts of it, so I thought I'd ask.
  Thanks!
  - Chris
--
--
For information about this mailing list, and its archives, see: 
http://www.washington.edu/imap/c-client-list.html
--


Re: Mailbox format how-to

2004-11-08 Thread Mark Crispin
On Mon, 8 Nov 2004, Chris Ross wrote:
 - modify sendmail.cf (and friends: submit.cf?) to call tmail instead
of mail.local.  The tmail man page has a little info on this.
 - Modify by calls in my procmailrc to use dmail instead of just
specifying the mailbox name (i thing.  this right?)
So far, so good.
 So, is there any way to tell tmail to deliver to an mbx format
main mail spool if the file doesn't already exist?  I know if
it exists, it'll deliver in the correct format, but what if it
vanishes?
The easiest way to do this is to edit file
	imap-200?/src/osdep/unix/Makefile
to set
	CREATEPROTO=mbxproto
instead of the current unixproto.  Then rebuild the entire UW IMAP 
toolkit.

However, once created, an mbx-format mailbox shouldn't vanish.  So, it 
should work just to create empty mbx-format mailboxes for everybody who 
doesn't have it.  It works to create one, and then copy it to each user 
(there isn't any user-specific in an empty mbx-format mailbox).  That way, 
you don't have to do any rebuilding.

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


Re: Mailbox format how-to

2004-11-08 Thread Chris Ross
Mark Crispin wrote:
The easiest way to do this is to edit file
imap-200?/src/osdep/unix/Makefile
to set
CREATEPROTO=mbxproto
instead of the current unixproto.  Then rebuild the entire UW IMAP toolkit.
  Yeah, I knew about that method.  I was just wondering if there
was a way to make dmail (from procmailrc, for example) know to
instantiate new mail folders as mbx instead of mbox.  It seems not
unreasonable to have command-line args for tmail/dmail (other than
-I) that could specify format.  But, what to do in the case that
it doesn't match existing format might be an issue.
However, once created, an mbx-format mailbox shouldn't vanish.  So, it 
should work just to create empty mbx-format mailboxes for everybody who 
doesn't have it.  It works to create one, and then copy it to each user 
(there isn't any user-specific in an empty mbx-format mailbox).  That 
way, you don't have to do any rebuilding.
  Okay.  How would you recommend creating this empty mbx mailbox?
It would be a bit of a pain to make sure to create a spool mbx file
for any new user I want to receive mail from, but not the worst
problem.  Most other folder creations will be done through IMAPd,
tho, so may still require the above.  So...
 - Chris


Re: Mailbox format how-to

2004-11-08 Thread Tim Mooney
In regard to: Re: Mailbox format how-to, Chris Ross said (at 5:49pm on Nov...:
Mark Crispin wrote:
The easiest way to do this is to edit file
imap-200?/src/osdep/unix/Makefile
to set
CREATEPROTO=mbxproto
instead of the current unixproto.  Then rebuild the entire UW IMAP toolkit.
 Yeah, I knew about that method.  I was just wondering if there
was a way to make dmail (from procmailrc, for example) know to
instantiate new mail folders as mbx instead of mbox.  It seems not
unreasonable to have command-line args for tmail/dmail (other than
-I) that could specify format.  But, what to do in the case that
it doesn't match existing format might be an issue.
Are you planning on doing home directory mail delivery, or delivery to
a spool directory for INBOX and other folders live under ~ or ~/mail?
However, once created, an mbx-format mailbox shouldn't vanish.  So, it 
should work just to create empty mbx-format mailboxes for everybody who 
doesn't have it.  It works to create one, and then copy it to each user 
(there isn't any user-specific in an empty mbx-format mailbox).  That way, 
you don't have to do any rebuilding.
 Okay.  How would you recommend creating this empty mbx mailbox?
mailutil create '#driver.mbx/foo' creates folder `foo' in MBX format.
Tim
--
Tim Mooney  [EMAIL PROTECTED]
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building  (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164


Re: Mailbox format how-to

2004-11-08 Thread Mark Crispin
On Mon, 8 Nov 2004, Erik Kangas wrote:
#!/bin/bash
if [ ! -e $HOME/$1 ]  [ $1 != .inbox ]; then
  /usr/local/bin/mbxcreat #driver.mbx:$1
fi
/usr/local/bin/dmail +$1
I recommend using mailutil create instead of mbxcreat since the latter 
program is no longer supported.

We didn't find any easier way to accomplish this for arbitrary folders; it 
would be nice if dmail could do this itself.
I'm not sure that I understand.  dmail never creates a non-INBOX mailbox; 
if the destination mailbox does not exist then dmail will deliver to 
INBOX.

Do you mean convert mailbox format?  If so, mailutil can be used to 
convert, albeit to a different name.

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


Re: Mailbox format how-to

2004-11-08 Thread Chris Ross
Mark Crispin wrote:
dmail is built as part of the IMAP toolkit, so its behavior will be 
affected by the change to CREATEPROTO.
  Right.  I knew that.  I was just looking for a way to do it without
compiling it in as the default format.  Tho, I'm not sure there's
a problem with doing that.
It's messier than that; there are some security issues as well.  The -I 
flag in tmail could be abused for some truly nasty purposes if it was 
allowed for non-privileged calls.
  Right.  But if there were a format command-line arg that doesn't
also specify the filename, that issue goes away.  That was my point
for having a format arg that wasn't -I.
mailutil create #driver.mbx/foo will create an empty file named foo 
which you can then copy to INBOX in the home directory of all the 
users you want to convert to mbx.
  Cool.  Thanks...  I need to look at mailutil s'more.  I've looked
at mbx* tools, but they're confusing.  Maybe I shouldn't be looking
at those.  :-)
By the way, you do know that you can't use mbx format with NFS, don't you?
  Yup.  I'm all on local filesystems here.
- Chris