user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = alias
select_field = goto
where_field = address
[root@mail i386]#
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = domain
select_field = domain
where_field = domain
[root@mail i386]#
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = quota
where_field = username
[root@mail i386]#
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = maildir
where_field = username
[root@mail i386]#
drwxrwxr-x 2 root mail 4096 Jan 19 00:07 /var/spool/mail/
[root@mail i386]# chown postfix.postfix /var/spool/mail/
[root@mail i386]# ls -ld /var/spool/mail/
drwxrwxr-x 2 postfix postfix 4096 Jan 19 00:07 /var/spool/mail/
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database postfix;
Query OK, 1 row affected (0.04 sec)
mysql> create user 'postfix'@'localhost' identified by 'postfix';
Query OK, 0 rows affected (0.09 sec)
mysql> grant all privileges on postfix.* to postfix@'localhost';
Query OK, 0 rows affected (0.03 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| postfix |
| test |
+--------------------+
4 rows in set (0.29 sec)
mysql> use postfix;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> show grants for postfix@'localhost';
+---------------------------------------------------------------------------------------+
| Grants for postfix@localhost |
+---------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'postfix'@'localhost' IDENTIFIED BY PASSWORD '3ecf3e4f55dd846f' |
| GRANT ALL PRIVILEGES ON `postfix`.* TO 'postfix'@'localhost' |
+---------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
… …
postfixadmin-2.3.6/debian/control
postfixadmin-2.3.6/debian/lighttpd.conf
postfixadmin-2.3.6/debian/postfixadmin.docs
postfixadmin-2.3.6/edit-domain.php
[root@mail ~]# cd /var/www/html/
[root@mail html]# mv postfixadmin-2.3.6 postfixadmin
……
$CONF['configured'] = true; //將默認的false修改爲true
$CONF['default_language'] = 'cn'; // postfixadmin默認語言:"cn" 中文,"en"英文
$CONF['database_type'] = 'mysql'; //數據庫類型
$CONF['database_host'] = 'localhost'; //數據庫服務的位置
$CONF['database_user'] = 'postfix'; //postfixadmin連接數據庫時使用的用戶名
$CONF['database_password'] = 'postfix'; //訪問數據庫的密碼
$CONF['database_name'] = 'postfix'; //連接MySQL數據庫的庫名
$CONF['smtp_server'] = 'localhost';
$CONF['smtp_port'] = '25';
$CONF['encrypt'] = 'md5crypt'; //數據庫中密碼的保存形式
$CONF['domain_path'] = 'YES'; //指定以域名作爲郵箱文件夾的路徑名,將默認的NO修改爲YES
$CONF['domain_in_mailbox'] = 'NO';
$CONF['aliases'] = '1000';
$CONF['mailboxes'] = '1000';
$CONF['maxquota'] = '1000';
$CONF['quota'] = 'NO';
$CONF['quota_multiplier'] = '1024000'; //郵箱的大小限制 $CONF['emailcheck_resolve_domain']='NO'; //將默認的YES修改爲NO
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 156
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use postfix;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+-----------------------+
| Tables_in_postfix |
+-----------------------+
| admin |
| alias |
| alias_domain |
| config |
| domain |
| domain_admins |
| fetchmail |
| log |
| mailbox |
| quota |
| quota2 |
| vacation |
| vacation_notification |
+-----------------------+
13 rows in set (0.00 sec)
mysql>
[root@mail html]# mv postfixadmin/motd* ~
域名 | 郵箱名 | 郵箱密碼 |
xifeng.com | 123456 | |
vfast.com | 123456 |
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 135
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use postfix;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from admin;
+------------------------+------------------------------------+---------------------+---------------------+--------+
| username | password | created | modified | active |
+------------------------+------------------------------------+---------------------+---------------------+--------+
| [email protected] | $1$4a6944be$g1JKJSJ8uEk.KtW.OBaKa. | 2013-01-21 22:41:50 | 2013-01-21 22:41:50 | 1 |
| [email protected] | $1$7da3934e$/7Z5vzQmGXD3bVHFJGwu00 | 2013-01-21 22:36:31 | 2013-01-21 22:36:31 | 1 |
+------------------------+------------------------------------+---------------------+---------------------+--------+
2 rows in set (0.00 sec)
mysql>
Starting postfix: [ OK ]
[root@mail ~]# chkconfig --level 35 postfix on
……
Jan 22 02:57:49 mail postfix/postfix-script: starting the Postfix mail system
Jan 22 02:57:49 mail postfix/master[27795]: daemon started -- version 2.3.3, configuration /etc/postfix
[root@mail ~]#