Pick a Free OS

User login

Navigation

qmail: A fast secure mail server

postmaster, mailer-daemon, root to local user mayank.

cd ~alias

touch .qmail-postmaster

touch .qmail-mailer-daemon

touch .qmail-root

echo mayank > .qmail-postmaster

echo mayank > .qmail-mailer-daemon

echo mayank > .qmail-root

chmod 644 .qmail*

Time to install the support utilities.

Enter the directories created when you untarred the sources for

daemontools, ucspi-tcp, and checkpassword. Run the following commands to

compile and install them. These utilities should then be installed in

/usr/local/bin.

make

make setup check ( need to be root for this )

Create a service directory for the qmail daemons. This can be anywhere

on the system but for clarity, make the directory under /var/qmail. Create

a unique directories for the qmail servers that are to be started.

mkdir -p /var/qmail/service/qmail/log

mkdir -p /var/qmail/service/smtpd/log

mkdir -p /var/qmail/service/pop3d/log

The -p bit ensures that if the parent directory doesn't exist then that is

created too. The log sub-directories will hold the run files for the log

process.

The sticky bit needs to be set on the qmail directories.

chmod +t /var/qmail/service/*

qmail provides extensive logging facility. Stay with the defaults

setup and create the base directory for the log files under /var/log.

mkdir /var/log/qmail

The base log directory needs to have file permissions set to 2700.

chmod 2700 /var/log/qmail

Create sub-directories for the different servers being logged.

mkdir /var/log/qmail/qmail

mkdir /var/log/qmail/smtpd

mkdir /var/log/qmail/pop3d

These directories need to be owned by qmaill.

chown -R qmaill /var/log/qmail

Now we need to create a file named run for each service that has to

be started. The run file is just a shell script that is executed under

supervise. Each run file should have file permissions set to 755 so after

you create the file do the following on it.

chmod 755 run

In the /var/qmail/service/qmail directory create a file named run with

the following contents.

#!/bin/sh

exec env - PATH="/usr/local/bin:/var/qmail/bin" \

qmail-start ./Maildir/

Here you have to choose where mail for a user has to be placed. qmail can

place the mail for a user in the older mbox format as used by sendmail in

~user/Mailbox. The advantage of using this format is that it's supported