Advertisment

A Web Interface for qmail

author-image
PCQ Bureau
New Update

oMail-admin is a PHP-based Web front-end to qmail and

vmailmgrd. It can be used by administrators easily administer their mailboxes.

Its features include mailbox/alias management, support for auto-responder,

changing passwords, and translation in various languages. In oMail Admin you can

also create, edit, and delete mailboxes and aliases. All this can be done

through a browser without going trough the complications of qmail command-line

interface.

Advertisment
Direct

Hit!
Applies

to:
System administrators
USP:

Configure qmail user mailboxes from a Web-based interface, create new accounts, assign quotas and much more 
Links:

http://omail.omnis.ch/
Google keywords:

qmail front-end

It provides two kinds access, namely administrator with all

rights and single user who can only change his own account access. Omail Admin

also has session expiration after a specified number of minutes, thus, providing

some security to the users.

qmail is a secure, simple message-transfer agent. It is

designed for typical Internet-connected UNIX hosts. It provides support for

SMTP, POP3 service, and queue management. qmail is vastly smaller than any other

Internet MTA. Other MTAs have separate forwarding, aliasing and mailing-list

mechanisms while qmail has a simple forwarding mechanism that lets users handle

their mailing lists. For this article we are assuming that qmail is installed

and already running on your system with virtual



domains.

Advertisment
oMail Admin is an easy way to configure mailboxes in qmail using a web-browser

vmailmgrd is a daemon for VMailMgr It is the local server

that is used to handle managing virtual domains from a Web or remote

interface.VMailMgr (short for Virtual MAIL ManaGeR) is a package designed to

manage multiple domains of mail addresses and mailboxes on a single host. It

cooperates with qmail for mail delivery and program control. It provides a local

delivery agent (vdeliver) for delivering mail to virtual users, a checkpassword

replacement (checkvpw) for authentication, a courier-compatible auth module (authvmailmgr)

for authenticating with courier-imap, courier-pop3d, and a suite of tools for

managing users.

VMailMgr provides administrators full control over their

own extension addresses and gives the users control over virtual domains.

Advertisment

Each virtual domain is assigned to a system user, and all

of the information about the domain is stored in that user's home directory.

Configuring VMailMgr



To install download latest tarball of VMailMgr from http://www.vmailmgr.org/,

unpack it and browse to the directory where you have unpacked VMailMgr and run

the following



commands.

# ./configure







# make







# make install



Advertisment

Before we start configuring VmailMgr, we need to configure

qmail to recognize the domain. To do this, you need to modify two of qmail's

configuration files in `/var/ qmail/control'. These are: `rcpthosts' and `virtualdomains'.

All you need to do is:

In oMail Admin you can easily assign every user a particular quota, maximum message size etc

To `rcpthosts', add the line `mydomain.org'. To `virtualdomains',

add the line `mydomain.org: myuser'. In the next step we have to configure qmail

to use VMailMgr's checkvpw instead of qmail's password checker.

Advertisment

Configure qmail-popup/qmail-pop3d to use `checkvpw` as the

password checker. This depends on how you have installed qmail.

Replace `checkpassword` in the command used to invoke qmail-

popup/qmail-pop3d in `/etc/inet.conf` or in a `tcpserver`command with `checkvpw`.

Now that you have your user added to the system, you're

ready to set the user up to receive a virtual domain. For this, issue the



following.

Advertisment

# su  username



$ vsetup


vsetup: created users directory.


vsetup: wrote '.qmail-default' file.


vsetup: added alias 'mailer-daemon'


vsetup: added alias 'postmaster'


vsetup: added alias 'root'


#







You can also create a new user account by clicking on the New Mailbox Account Link

The 'vsetup' command will set up the base VMailMgr

files. By default it will add users mailer-daemon, postmaster, root to the



domain. To add other users and aliases, type the following.

Advertisment

vadduser new user







vaddalias myself me


vaddalias somename me


Here vadduser adds a new user to the virtual domain where

as vaddalias adds an alias.

After you have completed all these steps, you will need to

kill and restart qmail-send to make it read the new `virtualdomains' control

file.   VMailMgr supports Courier-IMAP but Courier-IMAP does not

autodetect VMailMgr.  To make it autodetect VmailMgr, you must copy `/usr/local/bin/authvmailmgr`

to `/usr/lib/ courier-imap/libexec/authlib/authvmailmgr`.

Then modify the `AUTHMODULES` statement in `/usr/lib/courier-imap/etc/imapd.config`

and add `authvmailmgr` as the first authentication module.

Configuring oMail Admin



After vmailmgrd is up and running, we will configure oMail Admin. Before you

start configuring oMail Admin make sure that PHP is installed on your system.

Now unpack all oMail Admin files in htdocs directory. Next

browse to

/etc/httpd/conf and open the

httpd.conf file


Now open PHP.ini file and set

"register_globals"

= on


If "index.php" is not defined as DirectoryIndex

in your Apache conf, replace the $script_url = "$SCRIPT_URL"; line in

config.php by $script_url = "$SCRIPT_URL/index.php"

Now, open your browser and then type the URL for oMail-



admin. Type your domain (yourserver.com) in 'Email Address or Domain Name'

box and the domain password.

Then, click on Login and a new page with account management

should come up.

Once you are logged in, you will see the list of the qmail

users and their mailboxes. To edit settings of any user, click on Settings tab.

A new pop-up window will appear. Here you can customize the quota and other

settings of the users.

Swapnil Arora

Advertisment