Subject: Getting Rid of Berkeley Mailboxes....

From: Brian Moore <[email-masked]>
Date: Thu, 20 Mar 1997 14:11:29 -0800 (PST)

Okay, I really want to use some of the IMAP features like shared access and
those damned Berkeley mailboxes won't let me do that.

So what would be a good format?  There are -NO- local users on the mail server
so I can blow off compatibility with Elm/PINE/etc, as long as its one of the
formats that c-client deals with.

My only real gotcha: I want to keep procmail somewhere in line.  I trust it as
a local delivery agent, and I need its filtering for anti-spam filters in place
here.  If there is a compelling enough argument for something that refuses to
work with procmail, I'll look at it -- if it has a way to filter mail.

Any suggestions?

---

From: Mark Crispin <[email-masked]>
Date: Thu, 20 Mar 1997 15:04:30 -0800 (PST)

On Thu, 20 Mar 1997 14:11:29 -0800 (PST), Brian Moore wrote:
> So what would be a good format?

I recommend mbx format, which is new in imap-4.1 and is the current preferred
alternative format.

Rather than use the evil imapd.conf file, I recommend that you edit the
makefile in the c-client directory to set STDPROTO to mbxproto.

For delivery, I recommend using tmail, part of the imap-utils, to write
directory to ~/INBOX and not use the spool directory at all.

> My only real gotcha: I want to keep procmail somewhere in line.

I think that Dave Miller ([email-masked]) has some experience with
using procmail with tmail.

---

From: David L Miller <[email-masked]>
Date: Thu, 20 Mar 1997 16:26:41 -0800 (PST)

> using procmail with tmail.

Yup.  You can use procmail to deliver to non-Berkeley mailboxes by
piping the messages to tmail.  There are a couple gotchas though.  One
problem is that Sendmail prepends a Berkeley "From " line to messages
and procmail leaves it there.  I think the current tmail has been
modified to strip or convert that line into something unobtrusive.
The alternative is to put something into the procmail script to strip
that line.

The other problem, which I have not found a reliable workaround for,
is that delivery using user+folder@domain doesn't always work the way
I want it to.  If a message is sent to [email-masked], but the RFC822
headers do not include that information (e.g. a Bcc), how do I tell
tmail to deliver to foo+bar?  For individual delivery, the address can
be extracted from the Recieved: headers, but that doesn't work if
multiple mailboxes recieve the final delivery.

Also note that procmail is perfectly happy to deliver mail in Berkeley
format to a non-Berkeley folder, so may sure your procmailrc cannot
fall through to deliver to a non-Berkeley folder! 

Good luck!

-- 
David L. Miller <[email-masked]> | Science without religion is lame,
Software Engineer, Pine Development Team | religion without science is blind.
Box 354841, University of Washington     | -- A. Einstein
4545 15th Ave NE, Seattle WA 98105, USA  |
Phone: (206)685-6240  FAX: (206)685-4045 |

---

From: Brian Moore <[email-masked]>
Date: Thu, 20 Mar 1997 18:23:29 -0800 (PST)

> The alternative is to put something into the procmail script to strip

Sounds good enough, I'll look at tmail to see if I grok the mbx format.
As long as it's not one-file-per-message (i-node eater!) I'm happy. :)
I'll play with it on my personal boxes and see how well it works before
I start hacking the real server.

> multiple mailboxes recieve the final delivery.

Hrrm.  Kill the 'm' option in the local mailer, and let /etc/procmailrc
pass the whole username as an argument to tmail should work.  I do like
the 'm' option (makes for faster delivery to lists with multiple local
recipients if the list is smart), but it brings about other oddities
anyway.

> fall through to deliver to a non-Berkeley folder! 

Well, with no shell accounts 'cept admin ones, that's easy. :)  There
is a nice big global spam filter that works quite well and as long as
I get to keep that, life is peachy.

The concept of changing [email-masked]' into a shared folder that people
could 'checkout' items from and add items too is just too useful. :)

---

From: Mark Crispin <[email-masked]>
Date: Thu, 20 Mar 1997 18:38:50 -0800 (PST)

> As long as it's not one-file-per-message (i-node eater!) I'm happy. :)

mbx format is implemented by c-client's mbx driver, not by tmail.  tmail uses
c-client to deliver.

mbx format is a flat-file format, not an inode eater format.