Qmail mail management VmailMgr (1)

Source: Internet
Author: User
Tags imap mx record qmail

QmailAfter a while, you need to manage emails every day. I will introduce the Qmail mail management VmailMgr, which is described below.

For administrators, a good tool is required to manage the email system. In fact, Qmail has a good management partner-VmailMgr.

Introduction to VmailMgr

VmailMgr is short for Virtual Mail ManaGeR (Virtual Mail ManaGeR). It is a software package dedicated to Qmail. It can be used to implement the following functions:

* Enhance the password verification function of Qmail so that users can access their virtual mailboxes through POP3 and IMAP;

* CDB-based user password management, especially when the number of users is large, can greatly improve the password verification speed;

* Provides rich tools for managing virtual domains, virtual users, and Aliases;

* Provides a set of powerful CGI functions that allow you to directly add users, delete users, and change passwords on webpages;

* Provides a set of PHP functions that allow you to flexibly compile PHP files and perform various management work on the webpage;

* Use background processes to ensure the security of CGI and PHP code operations.

Install VmailMgr

The latest version of VmailMgr can be at www.Vmailmgr.org or http://em.ca /~ Bruceg/vmailmgr/download. To download the RPMS package, you must download at least the Vmailmgr and Vmailmgr-daemon packages.

I recommend that you install it from the source code. The installation method is as follows:

(As a non-root User)

Tar zxf

Cd

./Configure

Make

(As the root user)

Make install

Use VmailMgr

After installing VmailMgr, there are several additional steps necessary before you start using the virtual domain, as shown in the example of creating a virtual user "me@mydomain.org" whose alias is "myself@mydomain.org" and "myname@mydomain.org, step by step.

1. First, resolve the domain name for this virtual domain. Direct the MX record to the email server on the DNS server. To make the virtual domain work properly based on the IP address, you also need to make a PTR record on the DNS server. For example, if nslookup 10.56.33.122 returns mail.mydomain.com, to use "virtual domain", the PTR corresponding to the IP address is "mail.mydomain.com: myuser ".

2. Create a basic user for the virtual domain. This user's UNIX login password will also be used as the mail system management Super User Password for this virtual domain. All emails of the virtual users in this virtual domain will be saved in this user's directory, therefore, this directory requires sufficient space. For example, we have created the user "v" as the basic user of the virtual domain, and the user directory is in "/home/vmailuser ".

3. Tell Qmail to identify this virtual domain. In this case, you need to modify the two Qmail settings files in the "/var/qmail/control" Directory: "rcpthosts" and "virtualdomains ".

1) Add "mydomain.org" to "rcpthosts ".

2) Add "mydomain.org: v" to "virtualdomains ".

If you want to use the "anything.mydomain.org" format, you can modify it as follows:

3) Add ".mydomain.org" to "rcpthosts ".

4) Add ".mydomain.org: v" to "virtualdomains ".

4. Modify Qmail-popup/Qmail-

POP3D password verification method, using the "checkvpw" provided by VmailMgr ". The specific modification method depends on the Qmail installation method.

1) Replace "checkpassword" in the Qmail-popup/Qmail-POP3D command line with "checkvpw" (Qmail-popup/Qmail-

The POP3D command line may be in "/etc/inet. conf" or in a "tcpserver" command ).

2) run the following command:

'Echo checkvpw>/var/qmail

/Control/checkpassword ′

5. Add virtual users and aliases. First, log on with the created basic user identity (for example, "su-v"), and then use the Command provided by Vmailmgr to create the user and alias. For example, the following command creates a user me and its two aliases myself and myname:

1) execute the command: "vadduser me" (a password is prompted)

2) execute the command: "vaddalias me myself"

3) execute the command: "vaddalias me myname"

After completing the preceding steps, you also need to kill and restart "Qmail-send" to read the new "virtualdomains" table. The installation process is complete. You can use the following two methods for access:

One is to log on as "userSEPvirtual.domain.org", and the "user" is the virtual user name. The SEP separator can be "@" or ": "(this can be set in the"/etc/vmailmgr/"Directory);" virtual.domain.org "is the domain name of the virtual domain, and"/var/qmail/control/

The virtualdomains file is the same.

The second method is to access "baseuser-user" in the internal form of the mailbox. Here, "user" is the virtual user name, while "baseuser" is the basic user of the virtual domain, it is also the mail system administrator of the virtual domain.

For example, "/var/qmail/control/

Virtualdomains "contains:" mydomain.com: v"

The basic user "v" has been created and the virtual user "me" has been created. The "separator" variable in "/etc/vmailmgr/" contains "@:", then this virtual user's mail can be accessed in "me@mydomain.com", "me: mydomain.com" or "v-me.

VmailMgr's support for POP3 and IMAP

To enable POP3 of Qmail to support VmailMgr's virtual user authentication method, you must go to "/etc/qmail/control/checkpass"

Add "checkvpw" to the word file and restart POP3D.

VMailMgr supports Courier-IMAP, but Courier-IMAP cannot automatically detect VMailMgr. This means we have to do some work to make them work together smoothly.

* First, you must copy '/usr/local/bin/authvmailmgr' to '/usr/

Lib/courier-imap/libexec/authlib/authvmailmgr ′.

* Then, edit '/usr/lib/courier

-The "AUTHMODULES" declaration in the imap/etc/imapd. config 'file, and the "authvmailmgr" is added as the first validation system.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.