sawyl: (Default)
[personal profile] sawyl
Here's a quick guide to getting the dovecot IMAP server work on NetBSD, using CRAM-MD5 passwords so that things work with Apple Mail.

1. Build and Install dovecot Build and install the package in the normal way:

cd /usr/pkgsrc/mail/dovecot
make install

2. Set up the Configuration
Set up the configuration files:

touch /usr/pkg/etc/dovecot.conf
touch /usr/pkg/etc/dovecot-cram-md5.pwd
chmod 0600 /usr/pkg/etc/dovecot.conf
chmod 0600 /usr/pkg/etc/dovecot-cram-md5.pwd

3. Edit dovecot.conf
The main configuration file should contain something like the following:

base_dir = /var/run/
login_dir = /var/run/login

protocols = imap
ssl_disable = yes
login_chroot = no
login_user = dovecot
default_mail_env = maildir:/home/%u/.Maildir

auth_verbose = yes
auth_debug = no

auth default {
mechanisms = cram-md5

passdb passwd-file {
args = /usr/pkg/etc/dovecot-cram-md5.pwd
}


userdb passwd {
}
user = root
}

4. Set up the passwords file
Create an encrypted password entry using the following bit of magic:

echo foo:`/usr/pkg/sbin/dovecotpw` >> /usr/pkg/etc/dovecot-cram-md5.pwd

Replacing "foo" with a sensible user name. If you're using sudo (and if you're not, what's wrong with you?), you'll need to do the following:

sudo sh -c "echo foo:`/usr/pkg/sbin/dovecotpw` >> /usr/pkg/etc/dovecot-cram-md5.pwd"

5. Set up the Startup Script
Set up the rc script in the usual way:

cd /etc/rc.d
cp /usr/pkg/share/examples/rc.d/dovecot .

6. Start the Server
Start the server by hand in the usual way:

/etc/rc.d/dovecot forcestart

If everything's good, you can tweak rc.conf to start the server at boot.

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

sawyl: (Default)
sawyl

August 2018

S M T W T F S
   123 4
5 6 7 8910 11
12131415161718
192021222324 25
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 18th, 2025 01:43 pm
Powered by Dreamwidth Studios