Eximanager: Virtual mail domains and users

Table of Contents

Introduction
Configuration
Usage

Introduction

by ross at 15:24:28 on May 31, 2015

Simple setup of Exim uses system users (/etc/master.passwd & /etc/passwd) and one domain to receive mail.

If you need more then one mail domain and you also do not want mail users in your system master.passwd you need a virtual mail domains/users support. Some people do this by storing all the data in a SQL database. This setup however is using plain files only.

We have two directories: /etc/mail/virtual (configuration) and /home/mail (actual mailboxes).

Files in /etc/mail/virtual are: exim.filter (system Exim filter), exim.domain2mx and exim.ip2mx (map our domains and ip addresses to MX records) in /etc/mail/virtual.

Every directory in /etc/mail/virtual is a domain, i.e. /etc/mail/virtual/example.com defines virtual domain example.com.

Every domain directory will have these files: master.passwd, passwd, aliases and quota. The purpose of these files is obvious I think.

Data of virtual users is kept under /home/mail/$domain/$user, i.e. mail of user alice of example.com will be here: /home/mail/example.com/alice.

This user directory will have Maildir subdirectory where all the mail is kept in maildir format and filter file which is a personal Exim filter.

This is all you need to arganize virtual mail domains. A simple utility for managing these files is provided - eximanager.


As everything on this site Eximanager is written for FreeBSD. Haven't tried it on Linux.

 

Comments