服务器搭建手册之FREEBSDUNIX邮件服务器建设(八)

4、编辑/usr/local/etc/authlib/authdaemonrc
# mv /usr/local/etc/authlib/authdaemonrc /usr/local/etc/authlib/authdaemonrc_bak

# vi  /usr/local/etc/authlib/authdaemonrc

加入以下内容:

authmodulelist=”authmysql”

 

authmodulelistorig=”authmysql”

 

version=”authdaemond.mysql”

 

daemons=5

 

authdaemonvar=/var/run/authdaemond

 

subsystem=mail

 

DEBUG_LOGIN=0

 

DEFAULTOPTIONS=”wbnodsn=1″

 

保存退出vi

重启服务器.

三、导入Iigenus 的iGENUS.sql语句,

导入iGENUS建表语句.

A、到这里下载iGENUS

http://www.igenus.org/webmail/download/index.php
建议下载iGENUS for Postfix 2.01

下载完用cute-ftp等ftp软件上传到网站服务器,建议上传到/usr/local/www/apache22/data/

解压igenus for postfix

#cd /usr/local/www/apache22/data/

#tar zxvf igenus_2.0_20040703_release.tgz

# cd igenus/docs

# mysql –u root –p postfix < iGENUS.sql

 

四、手动设置第一个用户并测试 .

本章节介绍如何开通用户,并且如何测试系统是否正常。

1、查看postfix数据库的表格结构。

# mysql -u root -p

Enter password:    #这里输入的密码为之前建好的mysql的root密码。

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 1799 to server version: 5.0.22

 

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

 

mysql>

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 |

+——————-+

| address           |

| admin             |

| card              |

| domaininfo        |

| lastauth          |

| logs              |

| message           |

| personal          |

| scheduler         |

| stow              |

| userinfo          |

| vpopmail          |

+——————-+

12 rows in set (0.00 sec)

 

mysql>

服务器搭建手册之FREEBSDUNIX邮件服务器建设(七)

4、编辑/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
#vi /usr/local/etc/postfix/mysql_virtual_domains_maps.cf

加入以下内容:

user = postfix

 

password = postfix

 

hosts = localhost

 

dbname = postfix

 

query = SELECT domain FROM domaininfo WHERE domain=’%s’

 

5、编辑/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
#vi /usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf

加入以下内容:

user = postfix

 

password = postfix

 

hosts = localhost

 

dbname = postfix

 

query = SELECT maildir FROM userinfo WHERE address=’%s’ AND active = 1

6、编辑/usr/local/etc/postfix/mysql_virtual_mailbox_limit_maps.cf

# vi /usr/local/etc/postfix/mysql_virtual_mailbox_limit_maps.cf

加下以下内容:

user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT quota FROM userinfo WHERE address=’%s’

阅读更多