Using Qmailadmin to implement Web management for QMail mail accounts

Source: Internet
Author: User
Tags implement log mail mysql mysql in return domain qmail

Hardware environment: hpnetservere60128m Internal Deposit Card

Software Environment:
  

The following are the referenced contents:
Redhat6.2
vPOPmail4.9.4
QMail1.3
Mysql-3.23.22-beta
ucspi-tcp-0.88
Qmailadmin-0.38.tar.gz
Autorespond-1.0.0.tar.gzezmlm-idx
  
This article describes how to manage mail users in a web way, avoiding the hassle of having to log on to a mail server every time you add a user. Inter7 has developed a qmailadmin to comply with GPL copyright to achieve this function.

To use the software, the mail server must be running the Apache WWW server.

1, download the necessary software package


The functionality provided by Qmailadmin must be done after the web of the virtual domain and the virtual user's account is implemented, if you have not implemented the "database management of QMail mail accounts through Vpopmail" on the server, please read the article and complete the virtual domain and User configuration can not begin this work. To implement the Qmailadmin functionality, you need to download the following new package:

qmailadmin0.38.tar.gzhttp://www.inter7.com/qmailadmin/

Autorespond-1.0.0.tar.gzhttp://www.vpopmail.cx/autorespond-1.0.0.tar.gz


Autorespond is used to support the automatic reply to the message, for example, your e-mail address is ideal@com.cn, you can use the package to implement the reply of the mail, because you have been traveling recently and can't reply to the received mail in time, when using the qmailadmin, the principle is as follows:

When using the Web administration interface to specify a message automatic reply to a user, such as ideal, create a file name in the domain where the user is located. Qmail-ideal.
Let's first discuss the QMail mail delivery mechanism:

QMail's delivery mechanism is: When a letter is received, the mail delivery mechanism is controlled by qmail-lspawn; it first looks at the qmail-users mechanism (Qmail-users is a system that assigns-assign-addresses to users), If the delivery address is not defined in the Assign file (/var/qmail/assign see Lifewithqmail 3.6qmail-users) activates the QMAIL-GETPW program and then invokes qmail-local to implement the local mail delivery. Qmail-local first tries to post mail to Localpart@host's address, where Localpart is the local username. If not found, further view the alias defined in/var/qmail/alias, and if there is a corresponding alias, post the message to the corresponding user directory of the alias, otherwise return the message.

If the rules corresponding to the destination address of the message are found in the assign according to the qmail-users mechanism, the relevant information is obtained from the users/assign and then standard. QMail file operation. Generally speaking. The qmail-file is used to perform mail forwarding, alias, or invoke other programs such as EZMLM for processing. If no match is found, Qmail-local finds the. qmail-default file, which is the last step in the Qmail-local mail delivery mechanism. Vpopmail uses this file to invoke the activation of the Vdelivermail program, which is invoked with two parameters, the first of which currently has no effect and is used primarily for backward compatibility; The second parameter is used for default delivery when a virtual domain user is not found, generally, The default delivery can be to post a message to a directory or to a mail address, or return a letter without the user (the second parameter, if Bounce-no-mailbox, returns a letter without this user; If the second argument is/home/vpopmail/domains/ Domain.com.cn/0/test, the message is delivered to a test@com.cn user when there is no address that corresponds to the delivery destination for the message.

As you can see from the above mechanism, when you create an automatic mail reply for ideal users by qmailadmin the user's domain directory (such as:/home/vpopmail/domains/ The. qmail-ideal file is created in domains.com.cn, and when. Qmail-local enters assign processing, the standard. QMail file operation will be performed first, so the message will be automatically answered according to the file. Now let's see. Qmail-ideal's File contents:

|/usr/local/bin/autorespond100005/home/vpopmail/domains/domain.com.cn/au

torespongding/message/home/vpopmail/domains/domain.com.cn/autorespongding-&ideal@net.cn

where | means calling a program to process the message here is called Autorespond to handle; 10000 indicates the total time allowed to process the letter; 5 indicates the maximum number of messages during this period;

/home/vpopmail/domains/domain.com.cn/au

Torespongding/message A message file indicating the content of the message that is automatically replied;

/home/vpopmail/domains/domain.com.cn/autorespongding Specifies the log file location. Where &ideal@nte.cn indicates that the message is forwarded to &ideal@net.cn at the same time, or that forwarding is not specified when an automatic reply is added.

ezmlm-0.53.tar.gzhttp://www.ezmlm.org/

ezmlm-0.53 is a qmail-based mailing list management software written by Danj.bernstein that has all the basic features that mailing list Manager should have, such as subscriber address list management, automatic message return processing, and message publishing and archiving.

2, qmailadmin installation configuration options

Before compiling the package, you need to compile the package to your own needs, and we'll discuss all the configuration options as follows (the configuration options are:./configure

Conf_option=chosen):

If your server's cgi-bin is not in the standard location, use this configuration option to specify the location of the correct Cgi-bin directory:

Cgi-bin directory path for--enable-cgibindir={dir}www server

Use this option if you do not want the HTML template for the mail management interface to be stored in/usr/local/share/qmailadmin:

--with-htmllibdir={dir}qmailadminhtml Template Storage directory path

If your QMail path is not the default/var/qmail, use this option to specify the correct QMail installation path:

Installation path for--enable-qmaildir={dir}qmail

You need to specify this configuration option if the Cgi-bin path to the WWW server is not/cgi-bin/cgi_program:

--enable-cgipath={/cgi-bin/qmailadmin}

If the Vpop user is not the default VCHKPW user, use this option to specify the correct user name:

--enable-vpopuser={vpopuser}

If the Autorespond installation path is not the default/user/local/bin, use this option to specify the path:

--enable-autoresponder-bin={path}

If the EZMLM installation path is not the default/USER/LOCAL/BIN/EZMLM, use this option to specify the path:

--enable-ezmlmdir={dir}

If you want to qualify the maximum number of pop users for the system, use this option to specify:

--enable-maxpopusers=unlimited-1 to No limit, 0 is to turn off the feature specifies the maximum alias (alias) number of the system using this option:

--enable-maxaliases=unlimited-1 to No limit, 0 is to turn off the feature specifies the maximum number of mail forwarding (forward) for the system using this option:

--enable-maxforwards=unlimited-1 is no limit, 0 is the ability to turn off this option to specify the maximum number of message automatic replies (Autoresponder) for the system:

--enable-maxautorepsonders=unlimited-1 is no limit, 0 is to turn off the feature use this option to set the maximum number of mailing lists for the system:

--enable-maxmailinglists=unlimited defaults to No limits.

3, Qmailadmin and related software package compilation

The following are the referenced contents:

Autorespond compilation Generation:
  
[ROOT@MAILSRC] #tarxvfzautorespond -1.0.0.tar.gz
[ROOT@MAILSRC]#[ROOT@WWWSRC] #cdautorespond -1.0.0
[root@mailautorespond-1.0.0] #gcc-WALL-OAUTORESPONDAUTORESPOND.C
[root@mailautorespond-1.0.0] #cpautorespond/usr/local/bin/
  
EZMLM Compilation Generation:

[ROOT@MAILSRC] #tarxvfzezmlm -0.53.tar.gz
[ROOT@MAILSRC] #cdezmlm-0.53
[root@mailezmlm-0.53] #make
[root@mailezmlm-0.53] #makeman
[root@mailezmlm-0.53] #makeseup
  
Qmailadmin build (this is configured with the default installation of the first two articles):
  
1
[root@wwwqmailadmin-0.38]#./configure--enable-cgibindir=/usr/local/apache/cgi
-bin/--enable-cgipath=/cgi-bin/qmailadmin
  
2
[root@wwwqmailadmin-0.38] #makeclean
  
3
[root@wwwqmailadmin-0.38] #make
  
When making this step, you may receive the following error:
  
Gcc-g-o2-oqmailadminqmailadmin.oalias.oautorespond.oforward.omailinglist.osysadmin.ouser.outi-l.oauth.otemplate.ocommand . oshow.ocgi.olimits.
Odotqmail.o-l/home/vpopmail/lib-lvpopmail-lnsl-lm-lcrypt
/HOME/VPOPMAIL/LIB/LIBVPOPMAIL.A (VAUTH.O): Infunction ' Vauth_open ':
/usr/src/vpopmail-4.9.4/vauth.c:59:undefinedreferenceto ' Mysql_init '
/usr/src/vpopmail-4.9.4/vauth.c:61:undefinedreferenceto ' Mysql_real_connect '
......
  
You need to use VI to modify the/usr/src/qmailadmin-0.38/makefile file to:
Commonldadd=-l/home/vpopmail/lib-lvpopmail
  
Modified to:
Commonldadd=-l/usr/local/lib/mysql/-lmysqlclient-l/home/vpopmail/lib-lvpopmail
  
Note: "/usr/local/lib/mysql/" for you to install MySQL in accordance with the default path, if your system installed MySQL in a different path, you need to specify the correct MySQL library installation path, that is, looking for the LIBMYSQLCLIENT.A path
  
4
[root@wwwqmailadmin-0.38] #makeinstall-strip



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.