Article Title: Use vpopmail to manage the database of the qmail mail account. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Abstract: This article discusses how to use vpopmail to separate a qmail account from a system account based on "qmail system user installation and configuration, solution for storing email accounts in database files.
Hardware environment: HP Netserver E60 128M memory single Nic
Preface
Implementing a mail system with multiple domains on a single mail server is one of the concerns of qmail users. To solve this problem, Inter7 developed a GPL-authorized vpopmail (vchkpw) to make it easy for users to Implement Virtual email domains and non-system accounts on a qmail mail server. It has the following features:
All qmail configurations and data files provide detailed modification commands.
Only one system account is used, and all related processes run under a single UID/GID.
Supports virtual domains based on named and IP addresses.
Use NFS securely. The Three-Level Balance Tree filling technology is used to dynamically create mail directories for 10 to 10 million users.
Configurable record functions are provided based on real-world management requirements.
Supports Oracle, Sybase,
Mysql, LDAP,/etc/passwd,/etc/shadow, and the default cdb user authentication information storage method.
Pass the data directly to Maildir to the qmail-pop3d,. qmail file, or any other Maildir program.
There is no need to provide many. qmail files for the virtual domain. Each domain has its own directory in the vpopmail user's home directory, and each domain has an independent password file.
The detailed command program can be used in script files and remote management.
All the vpopmail features of the C library are described in detail.
The following software packages are provided to enhance the features of qmail + vpopmail:
QmailAdmin is a web-based vpopmail management tool.
Vqsignup is a cgi program based on the vpopmail management tool. It allows users to apply for their own email accounts.
Courier IMAP server.
SqWebMail
Web-based email client program.
1. Install Mysql;
The source code of the rpm package is used by the author. Therefore, the rpm package must be unlocked first:
[Root @ radiusd ideal] # rpm-ivh MySQL-3.23.22-1.src.rpm
MySQL ####################################### ###########
[Root @ radiusd SOURCES] # tar xvgz mysql-3.23.22-beta.tar.gz
Decompress the source code package, it will generate a mysql-3.23.22-beta subdirectory in the current directory, which contains the source code of mysql, and then use the following command to install:
./Configure
Make
Make install
Scripts/mysql_install_db
The Mysql database server is installed. The command to start the mysql server is:
/Usr/local/mysql/bin/safe_mysqld &
Now we have installed and run the mysql database server. Below we should set up basic user permission information. By default, mysql has a default user with full database access control and the name is root. Therefore, you should first add an access password for this user:
[Root @ radiusd src] # mysql-u root mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with-
Welcome to the MySQL monitor. Commands end with; or g.
Your MySQL connection id is 183 to server version: 3.23.22-beta
Type 'help' for help.
Mysql>
In this way, the customer program of the mysql server is entered, and then the SQL statement command is issued:
UPDATE user SET Password = PASSWORD ('new _ password') WHERE user = 'root ';
Flush privileges;
New_password is the password set for the mysql root User. However, it is generally recommended to create another user with the same permissions as root. The command is as follows:
Insert into user
VALUES ('host', 'user', 'passwd ',
'Y ', 'y', 'y ');
Generally, mysql and icradius servers run on the same server. At this time, the host is localhost. If your icradius server runs on another server, then you need to set the host name for your icradius server. The user name you set. The password is the user's password.
If you have multiple C addresses, you must include the entries corresponding to the C addresses in the file.
4. Configure and compile vpopmail:
[Root @ www vpopmail-4.9.4] #./configure
The [root @ www vpopmail-4.9.4] # make
[Root @ www vpopmail-4.9.4] # make install-strip
5. Support for roaming users
To allow a roaming user to forward mail (mail relay) through the mail server, use the following configuration options:
[Root @ www vpopmail-4.9.4] #./configure -- enable-roaming-users = y
Set crontab and run:
[Root @ www etc] # crontab-e
Add the following content:
40 ***/home/vpopmail/bin/clearopensmtp 2> & 1>/dev/null
The principle behind roaming users is that when a roaming user uses pop3 to obtain a mail, the address is allowed to forward mail through the mail server within a certain period of time.
Note: everything from exec to "|" is in the same row.
3. vpopmail detailed configuration options
-- Enable-roaming-users = n | y if mail relay is enabled after pop3 authentication is passed, it is disabled by default.
If this method is set to yes, when a user passes pop3 authentication, the IP address of the user is added to the list that allows the mail relay through the mail server. A cronjob program named clearopensmtp can be used to remove this IP address from the list of permitted email addresses after a period of time. This option requires the-x/etc/tcp. smtp. cdb option to use tcpserver to run the smtp server.
-- Enable-hardquota = # | n sets or opens the disk quota. NOQUOTA is unlimited.
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.