Subject: Re: IMAP on NetBSD
To: None <port-mac68k@netbsd.org>
From: T&B <list.mac68k@tandb.com.au>
List: port-mac68k
Date: 07/17/2000 12:01:27
I have just started setting up NetBSD so I can do something with the four metre high stack of Mac IIcx, IIvx, IIsi etc next to me :-)

I've managed to get the following servers going okay (mainly by installing binaries): sendmail, bind8, apache, ftp, ssh, telnet, webmin (uses perl).

Do any of you run an imap server?

I installed IMAPd from the NetBSD binary at:
ftp://ftp.netbsd.org/pub/NetBSD/packages/1.4.2/mac68k/All/imap-uw-4.5.tgz
and configured /etc/services and /etc/inetd.conf to serve it on port 143.

I can log in okay using an IMAP client such as Mulberry or Netscape. It shows me my INBOX, and allows me to create new mailboxes.

Originally, it failed to: delete messages, refresh the message list when new mail arrived (unless I closed and opened the mailbox), and copy messages dragged between mailboxes.

I finally found the problem. Since inetd launches a new imapd process for each imap action, opening a mailbox and deleting a message creates two processes. The first one marks the mailbox file as busy, so the second process (delete) can't delete.

It seems that imapd uses temp files to facilitate such multiple access. The problem was, however, that macbsd "ships" with the /tmp and /var/tmp directories with no write access for anyone except root. The imapd processes launch as owned by the user who's checking mail, so imapd can't create the tmp files.

So, similar to instructions at:
http://www.wrpd.org/~windsor/netbsd/what-next.html
I changed the access privileges for the tmp directories:

chmod 777 /tmp
chmod -R 777 /var/tmp

Now I can delete messages, move them and see new ones. Hooray :-)

I am a bit of a novice at this unix and macbsd stuff (can you tell? ;-) By giving everyone access to the tmp directories, doesn't that allow user a to read user b's tmp files?

I still have some issues to solve and welcome any input:

1. imapd shows the email client every item in my user directory (including .profile etc) as a mailbox. How can I screen these at the server end?

2. How can I change the default public mailboxes that the server spits out (eg #shared, #ftp to ~public, as expected by Netscape etc)?

3. How do I set up ACL privileges so I can share a "public" mailbox with sub mailboxes for workgroups etc (I have set up similar using CommuniGate Pro on Mac OS X Server).

Next, I want to setup PPP and NAT to act as a NAT router to the internet over a 56k modem and try netatalk (or whatever it's called) or CAP to serve AppleShare (preferably over TCP/IP).

Any help welcome.

Thanks,
Tom
T&B
http://www.tandb.com.au