OpenMTA is written in C and compiled with GCC on the OpenBSD/amd64 platform, but should be portable to other POSIX-compliant systems.
Currently supported and tested hardware architectures are the Intel 80x86, AMD64, Sparc, Sparc64.
Currently supported and tested operating sysetms are OpenBSD, NetBSD, FreeBSD, and GNU/Linux.
$Id$
Install OpenMTA by running ./configure, make, and make install.
It is also necessary to create a '_maild' user account and a 'vmail' group for the maild program. Here's how to do it on OpenBSD:
groupadd vmail
useradd -g vmail -L daemon -d /var/empty -s /sbin/nologin _maild
To start maild automatically every time the system boots, add the following commands to /etc/rc.local:
if [ -x /usr/local/sbin/maild ]; then
echo -n ' maild'; /usr/local/sbin/maild
fi
This chapter will cover the most common tasks related to mailbox management.
In a traditional mailsystem, mailboxes are automatically created for system accounts. OpenMTA does not use the system mailboxes located at /var/mail, so you must create a mailbox for each virtual user.
The easiest way to create a mailbox is to use the mailuser(1) utility that is distributed with OpenMTA.
For example, to add a mailbox named 'john.smith@foo.com', run:
mailuser -a john.smith@foo.com
You can also create mailboxes by hand using the install(1) command. The following example creates a mailbox for 'foo@bar.com':
install -d -m 730 -o root -g vmail /var/mail/store/bar.com/foo/{new,tmp,cur}
An alias allows one mailbox to have multiple alternative email addresses; each alternative address is called an 'alias'. Traditional mailservers use a file called /etc/aliases to store a list of aliases, but OpenMTA does not.
To create an alias in OpenMTA, create a symbolic link. For example, to have all mail addressed to 'sales@foo.com' be delivered to 'john.doe@acme.com', run this:
cd /var/mail/store/acme.com
ln -s john.doe sales
Remember: maild runs in a chroot environment, so don't create absolute symbolic links that contain '/var/mail'.
mailuser -d john.smith@foo.com
Under normal circumstances, it is not necessary to pass any command line options to the maild program. For a list of available options, see the maild(8) manual page.
Start the server by issuing the following command:
/usr/local/sbin/maild
Normally, maild listens on all available network interfaces. To listen only on a specific interface, use the '-i' command line option.
As an optional way of increasing system security, maild can run in "stealth mode". When running in this mode, no additional information will be sent to the client during the initial greeting. If the client attempts to deliver a message to a mailbox that doesn't exist, the message will be silently discarded.
To enable stealth mode, use the '-s' command line option.