This is an old revision of the document!


Virtual mailboxes on Debian Squeeze with Exim4 and Dovecot

You know how it is. Your little mail host has just sat there for a long while, slowly accreting a user here and a user there. They are all full users on the machine, so they have logins and everything, and exim is configured to deliver their mails to ~/Maildir.

And then some dangerous loon suddenly demands that you add mailboxes for people using a completely different domain. They're not really much to do with you, and certainly shouldn't be full-blown users on your host.

Time, then, to add virtual mailboxes to your poor little mail host.

There all sorts of HOWTOs on doing this, of various ages and usefulness. I'm adding this page to the malestrom just to document the configuration changes I did. Or rather, the configuration changes I ended up with.

I'm illustrating this by setting up a new domain example.mod with user tommy.atkins.

Set up virtual mailbox space and configuration

First I created a system user and group vmail to own all virtual mailboxes.

# adduser -system --home /var/local/vmail --group vmail

and a configuration directory.

# mkdir /etc/vmail

Configuration information for the domain will be under /etc/vmail/<domain. If that directory doesn't exist, the domain isn't supported.

# mkdir /etc/vmail/example.mod

The general scheme is that we have mailboxes under /var/local/vmail/<domain>/<user>/Maildir. Why Maildir? Because our existing users will continue to get mail in ~/Maildir and it keeps dovecot config a little simpler.

# mkdir -p /var/local/vmail/example.mod
# chown -R vmail:vmail /var/local/vmail
 
virtualmailboxeswitheximanddovecot.1298547021.txt.gz · Last modified: 2011/02/24 11:30 by jim
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0