名称 |
用途 |
下载地址 |
Apache (httpd-2.2.0) |
Web方式管理邮件 |
www.apache.org |
Php (php-5.2.3) |
Php 解释器,与apache一起使用 |
www.php.org |
Mysql (mysql-5.0.41) |
用数据库存储用户信息 |
www.mysql.com |
Postfixadmin(postfix-2.1.0) |
邮件帐号后台web管理工具 |
http://sourceforge.net/projects/postfixadmin/ |
SASL(cyrus-sasl-2.1.21.tar.gz) |
验证方法 |
http://ftp.andrew.cmu.edu/pub/cyrus-mail/ |
Authlib(courier-authlib-0.59.3.tar.bz2) |
与SASL一起做验证 |
http://www.courier-mta.org/download.php |
Postfix |
邮件系统主程序 |
http://www.postfix.org |
Courier-imap (courier-imap-4.1.3.tar.bz2) |
Pop3及IMAP服务 |
http://www.courier-mta.org/
|
Perl (perl-5.8.8) |
解释器 |
http://www.cpan.org |
Maildrop (maildrop-2.0.4.tar.bz2) |
邮件投递代理,直观的讲就是把收到的邮件转发到用户的邮箱目录 |
http://www.courier-mta.org/ |
Clamav (clamav-0.91.2.tar.gz) |
杀毒软件 |
http://www.clamav.org/ |
amavisd-new(amavisd-new-2.5.2.tar.gz) |
扫描邮件病毒 |
http://www.ijs.si/software/amavisd
|
Spamassassin(SpamAssassin 3.2.3) |
防垃圾邮件 |
http://spamassassin.apache.org/ |
Pcre (pcre-7.2.tar.bz2) |
安装Imap需要-- Perl兼容正则表达式 |
http://www.pcre.org |
Extmail (extmail-1.0.1.tar.gz) |
webmail |
http://www.extmail.org |
1、下载所需的软件:照上面给出的地址找到下载URL,然后用wget下载。由于服务器一般不安装xwindow这样的桌面环境,那怎样知道下载文件的url呢?用windows呢,通过securecrt这样的ssh工具连接和管理远程linux服务器,这样就很容易办到了。在实际的工作中,我习惯把文件下载到/root目录,原因是普通用户看不见我下载的东西。
![]() |
图 1 |
2、清理系统:不管你喜不喜欢,安装系统时sendmail这个邮件服务软件已经安装上去了,可是一山不容二虎,既然我们选定了功能强大的postfix,那么sendmail就一边歇着吧。运行命令 rpm -e -nodeps sendmail 就达到这个目的了。第2个需要卸载的软件是SASL,为什么要卸载它呢?因为系统自带的版本不太容易与authlib正常配合,所以需要把它删除掉。第3个要删除的是perl.本打算用系统自带的perl,可是在执行命令 perl -MCPAN -e shell时居然出现"segment fault",导致很多功能不能使用,看来也只好删了重装一个。下面总结一下这个过程:
1、SASL
(1)列出包
rpm -qa | grep sasl
cyrus-sasl-2.1.19-5.EL4
cyrus-sasl-gssapi-2.1.19-5.EL4
cyrus-sasl-devel-2.1.19-5.EL4
cyrus-sasl-ntlm-2.1.19-5.EL4
cyrus-sasl-md5-2.1.19-5.EL4
cyrus-sasl-sql-2.1.19-5.EL4
cyrus-sasl-plain-2.1.19-5.EL4
(2)删除包
rpm –e –nodeps cyrus-sasl-2.1.19-5.EL4 cyrus-sasl-gssapi-2.1.19-5.EL4 cyrus-sasl-devel-2.1.19-5.EL4 //把上面查查来的全部列在这后面全卸载掉。nodeps前面是两”-“!
然后进目录/usr/lib查一下 ls –al /usr/lib | grep sasl 应该没有目录sasl及sasl2了。
2、Perl
(1)列出包
rpm -qa | grep perl
perl-DateManip-5.42a-3
perl-XML-Encoding-1.01-26
perl-LDAP-0.31-5
perl-XML-LibXML-Common-0.13-7
groff-perl-1.18.1.1-3
openssl-perl-0.9.7a-43.1
…………(省略若干)
perl-suidperl-5.8.5-12.1.1
(2)删除包
rpm –e –nodeps perl-DateManip-5.42a-3 //照上面的例子删除所以的包。由于包太多,用一个//rpm命令后面带的参数太长,建议一个一个收拾。
执行完删除命令后,再运行命令perl –v,如果出现“-bash: perl: command not found”则表明已经把perl清理掉了。 |
3、创建邮件系统运行时所需的用户和组:创建用户和组绝不仅仅是为了练习userad和groupadd这两个命令,因为安全方面的原因,一些软件不能以root用户来运行,甚至在安装过程中,如果没有为该软件预先创建用户,安装将不能进行下去,因此,我们在这里先创建这些运行postfix系统所需的用户和组。对centos或redhat等发行版而言,用命令useradd创建用户时也就创建了一个同名的组,而另外一些linux发行版(如debian)或unix(如solaris 10),创建用户时并不会同时创建同名的组,这需要手动执行命令单独创建所需的组。下面我用表格的方式列出postfix系统所需要创建的用户及组的情况:
用户名 |
组名 |
作用 |
备注 |
mysql |
Mysql |
数据库mysql运行用户 |
|
vmail |
Vmail |
Postfix虚拟邮件帐号所使用的用户及组 |
uid,gid:1001,1001 |
postfix |
Postfix |
Postfix主程序使用的帐号和组 |
|
|
Postdrop |
Postfix setgid_group |
setgid_group=postdrop |
amavis |
Amavis |
邮件扫描 |
|
clamav |
Clamav |
病毒扫描 |
|
[root@mail ~]# grep postdrop /etc/postfix/main.cf
setgid_group = postdrop |
cd httpd-2.2.0
./configure -prefix=/usr/local/apache -enable-so //选项prefix,enanle前面是两个"-"
make
make install
上述步骤执行完毕后,将生成目录/usr/local/apache,进入这个目录检查一下,看相关的文件和目录是否存在?下图是一个正确安装apache后的目录结构:
![]() |
图 2 |
cd mysql-5.0.41
./configure -prefix=/usr/local/mysql
make,make install //安装完成
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
/usr/local/mysql/bin/mysql_install_db --user=mysql //初始化数据库
chown -R root .
chown -R mysql var
chgrp -R mysql .
tar zxvf php-5.2.3.tar.gz
cd php-5.2.3
在配置过程中,除了指定安装目录外,还有-with-apxs2和-with-mysql这两个选项。-with-apxs2的作用是与apache的工具apxs配合,产生模块文件到目录/usr/local/apache/modules/,同时在apache的配置文件中写入一行"LoadModule php5_module modules/libphp5.so";
[root@myest modules]# ll
total 12212
-rw-r--r-- 1 root root 8873 Jul 30 14:55 httpd.exp
-rwxr-xr-x 1 root root 12473318 Jul 31 09:29 libphp5.so |
vi test.php
phpinfo();
?> |
检查一下apache配置文件是否正确(/usr/local/apache/bin/apachectl -t),输出"Syntax OK"后就可以启动apache服务(/usr/local/apache/bin/apachectl start)。在别的机器的浏览器输入我们配置的这个服务器的url,正常的话,将得到类似下图的页面:
![]() |
图 3 |
cd courier-authlib-0.59.3
./configure --with-redhat --with-authmysql=yes --with-mailuser=vmail\ --with-mailgroup=vmail --with-mysql-libs=/usr/local/mysql/lib/mysql\ --with-mysql-includes=/usr/local/mysql/include/mysql\
--prifix=/usr/local/authlib --without-stdheaderdir
make
make install
make install-configure
[root@mail ~]# grep "authdaemonvar" /usr/local/authlib/etc/authlib/authdaemonrc
##NAME: authdaemonvar:2
# authdaemonvar is here, but is not used directly by authdaemond. It‘s
authdaemonvar=/usr/local/authlib/var/spool/authdaemon |
vi /usr/local/authlib/etc/authlib/authdaemonrc
authmodulelist="authmysql" authmodulelistorig="authmysql" DEBUG_LOGIN=2 修改上面3项,其他的项保持不便。这个修改前2行表示用mysql认证模块;把DEBUG_LOGIN的值有默认的“0”改成“2”的用意是运行postfix时有更多的信息输出,通过生成的日志以帮助排错。 |
vi /usr/local/authlib/etc/authlib/authmysqlrc
MYSQL_SERVER localhost MYSQL_USERNAME postfix MYSQL_PASSWORD postfix MYSQL_DATABASE postfix
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_USER_TABLE mailbox #MYSQL_CRYPT_PWFIELD password MYSQL_CLEAR_PWFIELD password DEFAULT_DOMAIN sery.com
MYSQL_UID_FIELD ‘1001‘ MYSQL_GID_FIELD ‘1001‘ MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD ‘/var/mailbox/‘ MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD maildir MYSQL_QUOTA_FIELD concat(quota,’S’) MYSQL_WHERE_CLAUSE active=‘1‘ 照上面的格式修改,这是比较容易出错的地方,要特别小心。我曾经把MYSQL_USER_TABLE mailbox这一项的mailbox写成mailbov导致sasl验证一直没法通过!特别注意MYSQL_UID_FIELD和MYSQL_GID_FIELD字段的值,这里是‘1001’,也可以是其它的,但一定要与vmail用户及组相一致(id vmail可以得出这2者的值) |
cd cyrus-sasl-2.1.21
./configure --disable-anon -enable-plain --enable-login --enable-sql --with-mysql=/usr/local/mysql --with-mysql-includes=/usr/local/mysql/include/mysql --with-mysql-libs=/usr/local/mysql/lib/mysql --with-authdaemond
make
make install
--- cyrus-sasl-2.1.20/lib/client.c~ 2003-11-11 11:26:06.000000000 -0500
+++ cyrus-sasl-2.1.20/lib/client.c 2005-05-31 22:34:14.000000000 -0400
@@ -61,7 +61,7 @@
static cmech_list_t *cmechlist; /* global var which holds the list */
-static sasl_global_callbacks_t global_callbacks;
+sasl_global_callbacks_t global_callbacks;
static int _sasl_client_active = 0; |
ln -s /usr/local/lib/sasl2 /usr/lib/sasl2 //sasl的安装目录是/usr/local/lib/sasl
echo "/usr/local/lib" >> /etc/ld.so.conf //指定动态连接库的位置
ldconfig //共享动态链接库生效
创建文件 /usr/local/lib/sasl2/smtpd.conf,并加入如下内容:
pwcheck_method: authdaemond
mech_list: PLAIN LOGIN
log_level: 3
authdaemond_path: /usr/local/authlib/var/spool/authdaemon/socket |
最后一行authdaemond_paeth的设置来自anthlib 的配置文件authlibdaemonrc,千万不要把这个弄错了,我当初的smtp验证一直通不过就是由于这个原因。通过查看进程也可以知道这个路径(前提是authlib正常运行了),如下图所示:
![]() |
图 4 |
Postfixadmin是postfix邮件系统的web管理工具,有了这个工具,管理和维护用户帐号就方便多了。假如不用工具,就需要手动修改数据库,谁愿意这样做?安装postfixadmin比较简单,解压包postfix-2.2.11.tar.gz,然后把它移动到某个目录下,其过程如下:
cd /root
tar zxvf postfixadmin-2.2.11.tar.gz
mv postfixadmin-2.2.11 /var/www/postfixadmin |
[root@mailserv2 postfixadmin]# pwd
/mail/www/postfixadmin
[root@mailserv2 postfixadmin]ll
total 236
drwxr-xr-x 2 vmail vmail 4096 Sep 16 16:06 ADDITIONS
drwxr-xr-x 2 vmail vmail 4096 Sep 16 19:31 admin
-rw-r--r-- 1 vmail vmail 1195 Sep 16 16:06 BACKUP_MX.TXT
-rw-r--r-- 1 vmail vmail 10155 Sep 16 16:06 CHANGELOG.TXT
-rw-r----- 1 vmail vmail 4700 Sep 16 16:14 config.inc.php
-rw-r--r-- 1 vmail vmail 4694 Sep 16 16:06 config.inc.php.sample
-rw-r----- 1 vmail vmail 3774 Sep 16 16:06 create-alias.php
-rw-r----- 1 vmail vmail 7379 Sep 16 19:24 create-mailbox.php
-rw-r--r-- 1 vmail vmail 4910 Sep 16 16:06 DATABASE_MYSQL.TXT
-rw-r--r-- 1 vmail vmail 4955 Sep 16 16:06 DATABASE_PGSQL.TXT
-rw-r----- 1 vmail vmail 2497 Sep 16 19:30 delete.php
-rw-r----- 1 vmail vmail 1727 Sep 16 16:06 edit-active.php
-rw-r----- 1 vmail vmail 3013 Sep 16 16:06 edit-alias.php
-rw-r----- 1 vmail vmail 4026 Sep 16 16:06 edit-mailbox.php
-rw-r----- 1 vmail vmail 25031 Sep 16 16:06 functions.inc.php
drwxr-xr-x 2 vmail vmail 4096 Sep 16 16:06 images
-rw-r----- 1 vmail vmail 3994 Sep 16 16:06 index.php
-rw-r--r-- 1 vmail vmail 2655 Sep 16 16:06 INSTALL.TXT
drwxr-xr-x 2 vmail vmail 4096 Sep 16 16:06 languages
-rw-r--r-- 1 vmail vmail 1651 Sep 16 16:06 LANGUAGE.TXT
-rw-r--r-- 1 vmail vmail 5375 Sep 16 16:06 LICENSE.TXT
-rw-r----- 1 vmail vmail 1743 Sep 16 16:06 login.php
-rw-r----- 1 vmail vmail 494 Sep 16 16:06 logout.php
-rw-r----- 1 vmail vmail 869 Sep 16 16:06 main.php
-rw-r--r-- 1 vmail vmail 981 Sep 16 16:06 motd-admin.txt.orig
-rw-r--r-- 1 vmail vmail 262 Sep 16 16:06 motd.txt
-rw-r--r-- 1 vmail vmail 262 Sep 16 16:06 motd-users.txt
-rw-r----- 1 vmail vmail 4827 Sep 16 16:06 overview.php
-rw-r----- 1 vmail vmail 2314 Sep 16 16:06 password.php
-rwxr-xr-x 1 vmail vmail 392 Sep 16 16:08 postfix_chmod.sh
-rw-r----- 1 vmail vmail 3233 Sep 16 16:06 search.php
-rw-r----- 1 vmail vmail 2119 Sep 16 16:06 sendmail.php
-rw-r----- 1 vmail vmail 5506 Sep 16 16:06 setup.php
-rw-r----- 1 vmail vmail 4204 Sep 16 16:06 stylesheet.css
-rw-r--r-- 1 vmail vmail 456 Sep 16 16:06 TABLE_BACKUP_MX.TXT
-rw-r--r-- 1 vmail vmail 3737 Sep 16 16:06 TABLE_CHANGES.TXT
drwxr-xr-x 2 vmail vmail 4096 Sep 16 16:06 templates
-rw-r--r-- 1 vmail vmail 2303 Sep 16 16:06 UPGRADE.TXT
drwxr-xr-x 2 vmail vmail 4096 Sep 16 16:06 users
-rw-r----- 1 vmail vmail 1949 Sep 16 16:06 variables.inc.php
-rw-r----- 1 vmail vmail 1965 Sep 16 16:06 viewlog.php
drwxr-xr-x 2 vmail vmail 4096 Sep 16 16:06 VIRTUAL_VACATION |
[root@mailserv2 postfixadmin]# more config.inc.php
//
// Postfix Admin
// by Mischa Peters
// Copyright (c) 2002 - 2005 High5!
// License Info: http://www.postfixadmin.com/?file=LICENSE.TXT
//
// File: config.inc.php
//
if (ereg ("config.inc.php", $_SERVER[‘PHP_SELF‘]))
{
header ("Location: login.php");
exit;
}
// Postfix Admin Path
// Set the location to your Postfix Admin installation here.
$CONF[‘postfix_admin_url‘] = ‘‘;
$CONF[‘postfix_admin_path‘] = ‘‘;
// Language config
// Language files are located in ‘./languages‘.
$CONF[‘default_language‘] = ‘cn‘;
// Database Config
// mysql = MySQL 3.23 and 4.0
// mysqli = MySQL 4.1
// pgsql = PostgreSQL
$CONF[‘database_type‘] = ‘mysql‘;
$CONF[‘database_host‘] = ‘localhost‘;
$CONF[‘database_user‘] = ‘postfixadmin‘;
$CONF[‘database_password‘] = ‘postfixadmin‘;
$CONF[‘database_name‘] = ‘postfix‘;
$CONF[‘database_prefix‘] = ‘‘;
…………………………省略若干……………………………………….
// Mailboxes
// If you want to store the mailboxes per domain set this to ‘YES‘.
// Example: /usr/local/virtual/domain.tld/username@domain.tld
$CONF[‘domain_path‘] = ‘YES‘;
// If you don‘t want to have the domain in your mailbox set this to ‘NO‘.
// Example: /usr/local/virtual/domain.tld/username
$CONF[‘domain_in_mailbox‘] = ‘NO‘;
…………………………省略若干……………………………………….
// Default Domain Values
// Specify your default values below. Quota in MB.
$CONF[‘aliases‘] = ‘1000‘;
$CONF[‘mailboxes‘] = ‘1000‘;
$CONF[‘maxquota‘] = ‘1000‘;
…………………………省略若干……………………………………….
// Quota
// When you want to enforce quota for your mailbox users set this to ‘YES‘.
$CONF[‘quota‘] = ‘NO‘;
// You can either use ‘1024000‘ or ‘1048576‘
$CONF[‘quota_multiplier‘] = ‘1024000‘;
…………………………省略若干……………………………………….
?> |
被改动过的内容用红色粗体标记出来了,这些值可根据实际情况作修改。下一个需要修改的文件是create-mailbox.php:
[root@mailserv2 postfixadmin]# more create-mailbox.php
//
// Postfix Admin
// by Mischa Peters
// Copyright (c) 2002 - 2005 High5!
// License Info: http://www.postfixadmin.com/?file=LICENSE.TXT
……………………………………省略若干…………………………………….
$tQuota = $CONF[‘maxquota‘];
system("sudo /usr/sbin/maildirmake.sh $fDomain ".$_POST[‘fUsername‘]);
if ($fMail == "on")
……………………………………省略若干…………………………………….
?> |
红色字体那行是需要插入的,它的位置在210行,不要把位置放错了,因为文件中有2行是"$tQuota = $CONF[‘maxquota‘];"一定要把它放在第209行的那个"$tQuota = $CONF[‘maxquota‘];"的后面才会有作用。在这里,很有必要解释一下插入这行的作用--在php脚本中执行系统的shell脚本--直接的后果就是创建用户的邮箱目录,这与执行在linux下执行命令行sudo /usr/sbin/maildirmake.sh sery.com sey相当。接下来我们修改文件delete.php:
[root@mailserv2 postfixadmin]# vi delete.php
……………………………………….省略很多………………………………
require ("./variables.inc.php");
require ("./config.inc.php");
require ("./functions.inc.php");
include ("./languages/" . check_language () . ".lang");
$SESSID_USERNAME = check_session();
……………………………………….省略很多……………………………… $result = db_query ("SELECT * FROM mailbox WHERE username=‘$fDelete‘ AND domain=‘$fDomain‘");
$userarray=explode("@",$fDelete);
$user=$userarray[0];
$domain=$userarray[1];
system("sudo /usr/sbin/maildirdel.sh $domain $user");
……………………………………….省略很多………………………………
?> |
红色字体标示的那4行是需要插入的,位置也是至关重要的,不能弄错。到了这一步,还是没有完成,还需要进目录admin里修改2个同名文件admin/create-mailbox.php和admin/delete.php,修改的方法是一样的,只是插入位置的行号不同(如admin/create-mail在200行的位置插入),见下面的截图:
![]() |
图 5 |
[root@mailserv2 ~] # cd /var/www/postfixadmin [root@mailserv2 ~] # mysql -u root < DATABASE_MYSQL.TXT |
(3) 测试postfixadmin。先修改apache的配置文件/usr/local/apache/conf/httpd.conf,加入如下内容:
Alias /postfixadmin /var/www/postfixadmin
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
AuthType Basic
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "sery.mail Access"
AuthUserFile /usr/local/apache/conf/htpasswd
Require valid-user
|
保存后重起apache服务(/usr/local/apache/bin/apachectl restart),然后在别的机器的浏览器输入邮件服务器的url如:http://mail.sery.com/postfixadmin
![]() |
图 6 |
点击链接 setup,如果出现的都是ok,则表明postfixadmin配置正确。
![]() |
图 7 |
[root@mailserv2 ~]# tar zxvf postfix-2.2.11.tar.gz
[root@mailserv2 ~]# cd postfix-2.2.11
[root@mailserv2 postfix-2.2.11]# make -f Makefile.init makefiles ‘CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include/mysql -DUSE_SASL_AUTH -I/usr/local/include/sasl‘ ‘AUXLIBS=-L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lm -L/usr/local/lib -lsasl2‘
config_directory = /etc/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
html_directory = no
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/local/man
daemon_directory = /usr/libexec/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
queue_directory = /var/spool/postfix
mail_owner = postfix
###########################################################
content_filter = smtp-amavis:[127.0.0.1]:10024
max_use = 10
#=====================BASE=========================
myhostname = mail2.sery.com
mydomain = mail.sery.com
myorigin = $mydomain
mydestination = $myhostname localhost localhost.$mydomain
mynetworks = 127.0.0.0/8 220.94.159.0/24
inet_interfaces = all
#=====================Vritual Mailbox settings======================
virtual_mailbox_base = /var/mailbox
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql_virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql/mysql_virtual_alias_maps.cf
virtual_uid_maps = static:1001
virtual_gid_maps = static:1001
virtual_transport = maildrop
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1
#====================QUOTA========================
message_size_limit = 14336000
virtual_mailbox_limit = 20971520
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the user‘s maildir has overdrawn his diskspace quota, please try again later.
virtual_overquota_bounce = yes
#====================SASL========================
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_invalid_hostname,
reject_non_fqdn_hostname,
reject_unknown_sender_domain,
reject_non_fqdn_sender,reject_non_fqdn_recipient,
reject_unknown_recipient_domain,reject_unauth_pipelining,
reject_unauth_destination,
permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_banner=$myhostname ESMTP "Version not Available"
alias_maps = hash:/etc/aliases
unknown_local_recipient_reject_code = 450 |
上述配置中,需要特别注意的是mydomain和myhostname,这2个项的值不要设置成一样,否则postfix将不能正确启动。第2个要注意的地方是 virtual_uid_maps及virtual_gid_maps的值,它是vmail用户的uid和vmail组的gid,与前面的文件/usr/local/authlib/etc/authlib/authmysqlrc的"MYSQL_UID_FIELD""MYSQL_GID_FIELD"一定要保持一致,本案的uid和gid都是1001.任何情况下,通过执行
root@mailserv2 postfix]# id vmail
uid=1001(vmail) gid=1001(vmail) groups=1001(vmail) |
②创建目录/etc/postfix/mysql,然后手动创建四个配置文件:mysql_virtual_alias_maps.cf,mysql_virtual_domains_maps.cf,mysql_virtual_mailbox_limit_maps.cf,mysql_virtual_mailbox_maps.cf。这4个文件的内容分别如下:
[root@mailserv2 mysql]# more mysql_virtual_alias_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = alias
select_field = goto
where_field = address
[root@mailserv2 mysql]# more mysql_virtual_domains_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = domain
select_field = description
where_field = domain
[root@mailserv2 mysql]# more mysql_virtual_mailbox_limit_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = quota
where_field = username
[root@mailserv2 mysql]# more mysql_virtual_mailbox_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = maildir
where_field = username |
另外一个配置文件是/etc/postfix/master.cf,由于需要修改的地方不是很多,可以先在这里把它配置好。
[root@mailserv2 postfix]# more master.cf
#
# Postfix master process configuration file. For details on the format
# of the file, see the Postfix master(5) manual page.
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/local/maildrop/bin/maildrop -d ${recipient}
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
cyrus unix - n n - - pipe
user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
#############################################################################
# antispam #
#############################################################################
smtp-amavis unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
localhost:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o mynetworks=127.0.0.0/8
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000 |
[root@mailserv2 ~]# cd
[root@mailserv2 ~]# tar jxvf courier-imap-4.1.3.tar.bz2
[root@mailserv2 ~]# cd courier-imap-4.1.3
[root@mailserv2courier-imap-4.1.3]#./configure --prefix=/usr/local/imap --with-redhat
--disable-root-check --enable-unicode=utf-8,iso-8859-1,gb2312,gbk,gb18030
--with-trashquota --with-dirsync --with-mysql-libs=/usr/local/mysql/lib/mysql --with-mysql-includes=/usr/local/mysql/include/mysql/ --with-authmysql --with-authmysql=yes
[root@mailserv2 courier-imap-4.1.3]# make
[root@mailserv2 courier-imap-4.1.3]# make install
[root@mailserv2 courier-imap-4.1.3]# make install-configure
|
Starting Courier-IMAP server: imap pop3
[root@mailserv2 courier-imap-4.1.3]# cd
[root@mailserv2 courier-imap-4.1.3]# tar jxvf pcre-7.2.tar.bz2
[root@mailserv2 courier-imap-4.1.3]# cd pcre-7.2
[root@mailserv2 courier-imap-4.1.3]# ./configure
[root@mailserv2 courier-imap-4.1.3]# make
[root@mailserv2 courier-imap-4.1.3]# make install
//安装pcre应该是非常容易的事情,片刻之间就可搞定,接下来安装maildrop.在执行配置过程中,需要很多选项,不要疏漏。
[root@mailserv2 pcre-7.2]# cd
[root@mailserv2 pcre-7.2]# tar jxvf maildrop-2.0.4.tar.bz2
[root@mailserv2 pcre-7.2]# cd maildrop-2.0.4
[root@mailserv2 maildrop-2.0.4]# ./configure --prefix=/usr/local/maildrop --enable-
sendmail=/usr/sbin/sendmail --enable-trusted-users=‘root vmail‘ --enable-syslog=1
--enable-maildirquota --enable-maildrop-uid=1001 --enable-maildrop-gid=1001 --with
-trashquota --with-dirsync
[root@mailserv2 maildrop-2.0.4]# make
[root@mailserv2 maildrop-2.0.4]# make install
[root@mailserv2 maildrop-2.0.4]# cp /usr/local/maildrop/bin/maildrop /usr/bin
|
[root@mailserv2 ~]# maildrop –v
maildrop 2.0.4 Copyright 1998-2005 Double Precision, Inc.
GDBM extensions enabled.
Courier Authentication Library extension enabled.
Maildir quota extension enabled.
This program is distributed under the terms of the GNU General Public
License. See COPYING for additional information. |
[root@mailserv2 mailbox]# more /etc/maildroprc
logfile "/var/mailbox/maildrop.log"
to "$HOME/$DEFAULT" |
[root@mailserv2 mailbox]# tail maildrop.log
Date: Sat Oct 6 12:45:20 2007
From: "Saundra Y. Echols"
Subj: No girls laugh at me now, haha, i laugh at them
File: /mail/mailbox//sery.com/magazine/ (3355) |
[root@mailserv2 ~]# more /usr/sbin/maildirmake.sh
#!/bin/bash
set -e
if [ ! -d /var/mailbox/$1 ]
then
mkdir /var/mailbox/$1
fi
chown -R vmail:vmail /var/mailbox/$1
cd "/var/mailbox/$1"
/usr/local/imap/bin/maildirmake $2
mkdir /var/mailbox/$1/$2/Maildir
chown -R vmail:vmail /var/mailbox/$1/$2
[root@mailserv2 ~]# more /usr/sbin/maildirdel.sh
#!/bin/bash
rm -rf /mail/mailbox/$1/$2 |
(1)安装配置clamav.
[root@mailserv2 ~]# useradd clamav [root@mailserv2 ~]# cd [root@mailserv2 ~]# cd clamav-0.91.2 [root@mailserv2 ~]# ./configure --prefix=/usr/local/clamav --with-dbdir=/usr/local/share/clamav --disable-zlib-vcheck [root@mailserv2 ~]# make [root@mailserv2 ~]# make install |
[root@mailserv2 ~]# more /usr/local/clamav/etc/freshclam.conf | sed -n ‘/^#/!p‘
DatabaseDirectory /usr/local/share/clamav
UpdateLogFile /var/log/clamav/freshclam.log
LogVerbose yes
LogSyslog yes
LogFacility LOG_MAIL
DatabaseOwner amavis
DatabaseMirror db.CN.clamav.net
DatabaseMirror database.clamav.net
[root@mailserv2 ~]# more /usr/local/clamav/etc/clamd.conf | sed -n ‘/^#/!p‘
LogFile /var/log/clamav/clamd.log
LogSyslog yes
LogVerbose yes
PidFile /var/run/clamav/clamd.pid
DatabaseDirectory /usr/local/share/clamav
LocalSocket /var/run/clamav/clamd.socket
StreamMaxLength 20M
User amavis
ScanMail yes
ScanArchive yes |
[root@mailserv2 ~]# more /root/clamav.sh
#!/bin/bash
# create directory for clamav
mkdir /var/log/clamav chmod -R 744 /var/log/clamav chown -R amavis:amavis /var/log/clamav chown -R amavis.amavis /usr/local/share/clamav mkdir /var/run/clamav chmod 700 /var/run/clamav chown amavis.amavis /var/run/clamav |
[root@mailserv2 ~]# more /root/amavis.sh
#!/bin/bash
cd /root
tar clamav-0.91.2.tar.gz
cd clamav-0.91.2
mkdir -p /var/amavis /var/amavis/tmp /var/amavis/var /var/amavis/db
chown -R amavis:amavis /var/amavis chmod -R 750 /var/amavis cp amavisd /usr/local/sbin/ chown root /usr/local/sbin/amavisd chmod 755 /usr/local/sbin/amavisd cp amavisd.conf /etc/ chown root /etc/amavisd.conf chmod 644 /etc/amavisd.conf mkdir /var/virusmails chown amavis:amavis /var/virusmails chmod 750 /var/virusmails |
$max_servers=8; $daemon_user = ‘amavis‘; $daemon_group = ‘amavis‘; $mydomain = ‘sery.com‘; $db_home = "$MYHOME/db"; $inet_socket_port = 10024; $sa_tag_level_deflt = -100; $sa_tag2_level_deflt = 6.3; $sa_kill_level_deflt = $sa_tag2_level_deflt; $virus_admin = "virusalert@$mydomain"; $sa_spam_subject_tag = ‘***SPAM*** ‘; $notify_method = $forward_method; $forward_method = ‘smtp:127.0.0.1:10025‘; $final_virus_destiny = D_DISCARD; $final_banned_destiny = D_DISCARD; $final_spam_destiny = D_PASS; [‘ClamAV-clamd‘, &ask_daemon, ["CONTSCAN {}n", "/var/run/clamav/clamd"], qr/bOK$/, qr/bFOUND$/, qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ], |
[root@mailserv2 ~]# cd
[root@mailserv2 ~]# tar zxvf BerkeleyDB-0.32.tar.gz
[root@mailserv2 ~]# cd BerkeleyDB-0.32
[root@mailserv2 ~]# perl Makefile.PL
[root@mailserv2 ~]# make
[root@mailserv2 ~]# make install |
{[csc:pagelist]}
◆Webmail安装配置
DirectoryIndex index.html index.php index.cgi
ScriptAlias /extmail/cgi/ /mail/www/extsuite/extmail/cgi/
AllowOverride None
Options None
Order allow,deny
Allow from all
Alias /extmail /mail/www/extsuite/extmail/html
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
|
保存文件,重启apache服务即可在浏览器输入邮件服务器的url访问了。
![]() |
图 8 |
[root@mailserv2 extmail]# more webmail.cf
# sys_config, the config file and webmail programe root
SYS_CONFIG = /var/www/extsuite/extmail/
# sys_langdir, the i18n dir
SYS_LANGDIR = /var/www/extsuite/extmail/lang
# sys_templdir, the template dir
SYS_TEMPLDIR = /var/www/extsuite/extmail/html
# sys_warn, show system warning or not, default to yes
SYS_SHOW_WARN = 0
# sys_permit_noquota, permit an account without qouta?
SYS_PERMIT_NOQUOTA = 1
# sys_sess_dir, the session dir
SYS_SESS_DIR = /tmp/
# sys_log_on = 1 | 0 - enable logging or not
SYS_LOG_ON = 1
# sys_log_type = file|syslog|nsyslog, syslog will save login
# or error info into mail.*, nsyslog is a replacement to syslog
# that will send log message to network syslogd
SYS_LOG_TYPE = syslog
# sys_log_file - path to log file, if sys_log_type = file
SYS_LOG_FILE = /var/log/extmail.log
# sys_sess_timeout, session timeout, default 3 hours (3h) format:
# number+(s|m|h|d|M|y); or only number, the 0 means that the
# session will last for 0 seconds, but if you specify the
# sys_sess_cookie_only = 1 then it means the session will expire
# after you close your browser :)
SYS_SESS_TIMEOUT = 0
# sys_sess_cookie_only = 0|1 use cookie only or include cgi "sid"
# parameter ? if set to true(1), the session will be expired after
# sys_sess_timeout if there is no any active request from browser
SYS_SESS_COOKIE_ONLY = 1
# sys_user_psize, user default page_size
SYS_USER_PSIZE = 10
# sys_user_tsize, user mail subject truncate size, valid type:
# auto => full text
# screen1 => 800x600
# screen2 => 1024x768
# screen3 => 1280x1024
SYS_USER_SCREEN = auto
# sys_user_lang, user default language
SYS_USER_LANG = en_US
# sys_user_template, user default template
SYS_USER_TEMPLATE = default
# sys_user_charset, user default charset
SYS_USER_CHARSET = utf-8
# sys_user_trylocal, user default outgoing encoding mechanism
SYS_USER_TRYLOCAL = 1
# sys_user_timezone, user default timezone
SYS_USER_TIMEZONE = +0800
# sys_user_* default parameters
SYS_USER_CCSENT = 0
SYS_USER_SHOW_HTML = 1
SYS_USER_COMPOSE_HTML = 1
SYS_USER_CONV_LINK =1
SYS_USER_ADDR2ABOOK = 1
# sys_min_pass_len, minimal password length, default 2
SYS_MIN_PASS_LEN = 2
# sys_mfilter_on, default is off
SYS_MFILTER_ON = 1
# sys_netdisk_on, default is off
SYS_NETDISK_ON = 0
# sys_debug_on, default is off
SYS_DEBUG_ON = 0
# sys auth type, mysql/ldap/authlib
SYS_AUTH_TYPE = mysql
# maildir_base, the base dir of user maildir, use absolute path
# if not set.
SYS_MAILDIR_BASE = /var/mailbox
# sys_auth_schema, vpopmail1/vpopmail2/virtual
# vpopmail1 => all user accounts in one table
# vpopmail2 => accounts in per domain table
SYS_AUTH_SCHEMA = virtual
# crypt_type, the default encrypt type of password, possible type
# currently is crypt|cleartext|plain|md5|md5crypt|plain-md5|ldap-md5|sha|sha1
SYS_CRYPT_TYPE = md5crypt
# if mysql, all relate parameters should prefix as SYS_MYSQL
SYS_MYSQL_USER = postfix
SYS_MYSQL_PASS = postfix
SYS_MYSQL_DB = postfix
SYS_MYSQL_HOST = localhost
SYS_MYSQL_SOCKET = /tmp/mysql.sock
# table name
SYS_MYSQL_TABLE = mailbox
SYS_MYSQL_ATTR_USERNAME = username
SYS_MYSQL_ATTR_DOMAIN = domain
SYS_MYSQL_ATTR_PASSWD = password
# sys_mysql_attr_clearpw - attribute to save clear password, useful for
# postmaster withdraw the original passwd if the end user forgot, but
# we highly recommend that you don‘t enable it for security reason
# SYS_MYSQL_ATTR_CLEARPW = clearpwd
SYS_MYSQL_ATTR_QUOTA = quota
SYS_MYSQL_ATTR_NDQUOTA = netdiskquota
SYS_MYSQL_ATTR_HOME = homedir
SYS_MYSQL_ATTR_MAILDIR = maildir
# service enable/disable attributes
# comment them out if you don‘t want their function
SYS_MYSQL_ATTR_DISABLEWEBMAIL = disablewebmail
SYS_MYSQL_ATTR_DISABLENETDISK = disablenetdisk
SYS_MYSQL_ATTR_ACTIVE = active
# if ldap, all relate parameters should prefix as SYS_LDAP
SYS_LDAP_BASE = o=extmailAccount,dc=example.com
SYS_LDAP_RDN = cn=Manager,dc=example.com
SYS_LDAP_PASS = secret
SYS_LDAP_HOST = localhost
# ldif attributes
SYS_LDAP_ATTR_USERNAME = mail
SYS_LDAP_ATTR_DOMAIN = virtualDomain
SYS_LDAP_ATTR_PASSWD = userPassword
# sys_ldap_attr_clearpw - attribute to save clear password, useful for
# postmaster withdraw the original passwd if the end user forgot, but
# we highly recommend that you don‘t enable it for security reason
# SYS_LDAP_ATTR_CLEARPW = clearPassword
SYS_LDAP_ATTR_QUOTA = mailQuota
SYS_LDAP_ATTR_NDQUOTA = netdiskQuota
SYS_LDAP_ATTR_HOME = homeDirectory
SYS_LDAP_ATTR_MAILDIR = mailMessageStore
# service enable/disable attributes
# comment them out if you don‘t want their function
SYS_LDAP_ATTR_DISABLEWEBMAIL = disablewebmail
SYS_LDAP_ATTR_DISABLENETDISK = disablenetdisk
SYS_LDAP_ATTR_ACTIVE = active
# if authlib, all relate parameters should prefix as AUTHLIB
SYS_AUTHLIB_SOCKET = /usr/local/authlib/var/spool/authdaemon/socket
# Global Abook support
# sys_g_abook_type, global abook type, valid is ldap|file, currently
# only support ldap, file module is under development :-)
SYS_G_ABOOK_TYPE = file
# if ldap, all relate parameters should prefix as SYS_G_ABOOK_LDAP
SYS_G_ABOOK_LDAP_HOST = localhost
SYS_G_ABOOK_LDAP_BASE = ou=AddressBook,dc=example.com
SYS_G_ABOOK_LDAP_ROOTDN = cn=Manager,dc=example.com
SYS_G_ABOOK_LDAP_ROOTPW = secret
SYS_G_ABOOK_LDAP_FILTER = objectClass=OfficePerson
# if file, all relate parameters should prefix as SYS_G_ABOOK_FILE
SYS_G_ABOOK_FILE_PATH = /mail/www/extsuite/extmail/globabook.cf
SYS_G_ABOOK_FILE_LOCK = 1
SYS_G_ABOOK_FILE_CONVERT = 0
SYS_G_ABOOK_FILE_CHARSET = utf-8 |
<%domain%> |
![]() |
图 9 |
到这里,postfix的安装配置算是完成了。我们来逐个检查这些服务的正确性,简单的方法就是启动每一个服务,根据服务的运行来掌握各个服务是否正常。为了方便所有服务随开机自动启动,我把它们都加在了文件/etc/rc.local里,这些内容包括:
################ normal services ############################
/usr/local/apache/bin/apachectl start
/usr/local/mysql/bin/mysqld_safe --user=mysql&
/usr/local/authlib/sbin/authdaemond start
############## postfix relatively ###########################
postfix start
/usr/local/imap/sbin/imapd start
################ antivirus and antispam #####################
/usr/bin/spamd --daemonize --pidfile /var/run/spamd.pid
/usr/local/sbin/amavisd start
/usr/local/clamav/sbin/clamd |
[root@mailserv2 extmail]# crontab -l
0 0 1 * * root wget -N -P /usr/share/spamassassin www.ccert.edu.cn/spam/sa/Chinese_rules.cf;kill -HUP `cat /var/run/spamd.pid`
00 00 * * * /usr/local/clamav/bin/freshclam |
在系统崩溃以后,没有提前备份将使你无限懊悔。一次没有成功的在线内核升级引起的系统崩溃(在我没来得及备份时发生),为恢复崩溃邮件系统,曾让我精疲力竭。所以做好备份是一个好主意。当然我们不能天天手动去执行这个备份任务,用脚本吧!下面是我的一个postfix的备份脚本,供大家参考:
[root@mailserv2 virusalert]# more /usr/local/bin/data_backup.sh
#!/bin/bash
BackupPath=/var/data_bk
Mysql_bk_dir=$BackupPath/mysqlbk
Mail_bk_dir=$BackupPath/mailbk
LogFile=$BackupPath/backuplog
MailBoxDir=/var/mailbox
####################################################################
# define mysql variables #
####################################################################
NewFile="$Mysql_bk_dir"/postfix$(date +%Y%m%d).tgz
DumpFile="$Mysql_bk_dir"/postfix$(date +%Y%m%d).sql
OldFile="$Mysql_bk_dir"/postfix$(date +%Y%m%d --date=‘5 days ago‘).tgz
DbUser=root
DbPasswd=husb^R
DbName=postfix
####################################################################
# mysql backup proccess #
####################################################################
echo "-------------------------------------------" >> $LogFile
echo $(date +"%y-%m-%d %H:%M:%S") >> $LogFile
echo "--------------------------" >> $LogFile
#Delete Old File
if [ -f $OldFile ]
then
rm -f $OldFile >> $LogFile 2>&1
echo "[$OldFile]Delete Old File Success!" >> $LogFile
else
echo "[$OldFile]No Old Backup File!" >> $LogFile
fi
if [ -f $NewFile ]
then
echo "[$NewFile]The Backup File is exists,Can‘t Backup!" >> $LogFile
else
cd $Mysql_bk_dir
/usr/local/mysql/bin/mysqldump -u $DbUser -p$DbPasswd --opt $DbName > $DumpFile
tar czf $NewFile postfix$(date +%Y%m%d).sql >> $LogFile 2>&1
echo "[$NewFile]Backup Success!" >> $LogFile
rm -rf $DumpFile
fi
######################################################################
# backup mail‘s user directories and files #
######################################################################
MailFileBk=$Mail_bk_dir/mail$(date +%Y%m%d).tgz
OldMailFileBk=$Mail_bk_dir/mail$(date +%Y%m%d --date=‘14 days ago‘).tgz
if [ -f $OldMailFileBk ]
then
rm -rf $OldMailFileBk
fi
if [ -f $MailFileBk ]
then
echo "[$MailFileBk]The Backup File is exists,Can‘t Backup!" >> $LogFile
else
cd /mail
tar czf $MailFileBk mailbox >> $LogFile 2>&1
fi
echo "-------------------------------------------" >> $LogFile |
这个脚本对postfix数据库和用户的邮件做了备份。因为磁盘空间始终是有限的,因此是一边备份一边删除就的备份。如果条件允许,建议进行异地备份。手动执行一下这个脚本,看它是否按我们的意愿工作了,如果一些如愿,则把它放入crontab里让它每晚自动进行。
[root@mailserv2 ~]# crontab -l
0 0 1 * * root wget -N -P /usr/share/spamassassin www.ccert.edu.cn/spam/sa/Chinese_rules.cf;kill -HUP `cat /var/run/spamd.pid`
00 01 * * * /usr/local/bin/data_backup.sh
00 00 * * * /usr/local/clamav/bin/freshclam |
mysql> use postfix;
mysql> update mailbox set quota=‘524288000‘;
Query OK, 1 row affected (0.03 sec)
Rows matched: 191 Changed: 1 Warnings: 0 |
![]() |
图 10 |