在Solaris 5.8上搭建Email Server
Monday, 17. April 2006, 12:10:39
Manager要我搭建一个Email Server,以下是架构图。
Postfix - the Big Picture
由于不熟悉openldap,改用mysql实现用户管理。
1. compile env. is different in Solaris from Linux
/opt/csw/bin
/usr/ccs/bin
/usr/ucb/cc
感觉Solaris就是Unix世界中的Microsoft,喜欢采用自己的标准去做事。与别的系统兼容性差。怪不得有人说在BSD中编译痛苦,在Solaris中更痛苦。
2. directory /usr/local/bin in my machine is a symbol link to /usr/local/packages/local/bin, it is read only
so the packages can not be installed in the default directories
3. use "gmake" instead of "make"
4. configuration files:
/etc/postfix/main.cf master.cf
/etc/postfix/mysql*cf
/opt/csw/sasl2/lib/sasl2/smtpd.conf
/opt/csw/courier/etc/imapd
/opt/csw/courier/etc/authlib/authdaemonrc
/opt/csw/courier/etc/authlib/authmysqlrc instead of /opt/csw/courier/etc/authmysqlrc
if authlib/authmysqlrc does not exist, an I/O error will be raised.
I have refered to the following 3 links to install the mail server.
http://high5.net/howto/ Postfix+MySQL+Courier-IMAP(参数设置)***
http://www.5dmail.net/html/2005-8-16/2005816171404.htm 中小规模POSTFIX邮件系统(编译安装)***
http://www.gentoo.org/doc/en/virt-mail-howto.xml Virtual Mailhosting System with Postfix Guide(调试方法)***
Postfix documentation:
http://www.5dmail.net/html/2006-3-11/2006311100246.htm 邮件系统postfix安装与配置(上)*
http://www.5dmail.net/html/2006-3-11/2006311100411.htm 邮件系统postfix安装与配置(下)*
http://www.linuxmine.com/4345.html Virtual、Aliases、虚拟表等概念之间的关系*
http://www.5dmail.net/html/2004-10-26/20041026164400.htm postfix 2.0.16的虚拟投递代理文档
http://www.postfix.org/INSTALL.html Postfix Installation From Source Code
http://www.postfix.org/docs.html Postfix Howtos and FAQs
http://cpplus.info/DEMO/man/view_doc23a5.html?file=/usr/share/doc/postfix-2.1.6/html/VIRTUAL_README.html VIRTUAL_README
http://www.hzqbbc.com/blog/arch/2002/11/postfix_ceccee.html 有关Postfix 的虚拟用户支持的大讨论
http://www.postfix.org/faq.html#virtual_command
http://www.postfix.org/postconf.5.html
http://www.postfix.org/DATABASE_README.html
http://www.postfix.org/DEBUG_README.html#logging Postfix Debugging Howto
http://www.postfix.org/faq.html Postfix Frequently Asked Questions
Cyrus-SASL documentation:
cyrus-sasl-2.1.19/doc/install.html
Courier-IMAP documentation:
http://www.courier-mta.org/imap/INSTALL.html
http://www.courier-mta.org/imap/
http://www.inter7.com/courierimap/FAQ.html
courier-imap-4.1.0/imap/imapd.html
courier-imap-4.1.0/imap/README.html
Mysql documentation:
http://dev.mysql.com/doc/refman/5.0/en/solaris.html Mysql with Solaris Notes
http://wiki.arslinux.com/Mail_Server:MySQL_Authentication Postifx w/ SASL + Courier IMAP w/ SSL + Maildrop + MySQL + SpamAssassin (Appendix)
Solutions:
http://wanderingbarque.com/howtos/mailserver/mailserver.html Secure Virtual Mailserver HOWTO Postfix + OpenLDAP + Dovecot + Jamm + SASL + SquirrelMail
http://www.phparchitecture.com/howto_show.php?id=2&showall Postifx w/ SASL + Courier IMAP w/ SSL + Maildrop + MySQL + SpamAssassin
Other Mail Server:
http://www.5dmail.net/NewList-51-1.htm Qmail/Sendmail/Postfix News list*
Postfix - the Big Picture
由于不熟悉openldap,改用mysql实现用户管理。
1. compile env. is different in Solaris from Linux
/opt/csw/bin
/usr/ccs/bin
/usr/ucb/cc
感觉Solaris就是Unix世界中的Microsoft,喜欢采用自己的标准去做事。与别的系统兼容性差。怪不得有人说在BSD中编译痛苦,在Solaris中更痛苦。
2. directory /usr/local/bin in my machine is a symbol link to /usr/local/packages/local/bin, it is read only
so the packages can not be installed in the default directories
3. use "gmake" instead of "make"
4. configuration files:
/etc/postfix/main.cf master.cf
/etc/postfix/mysql*cf
/opt/csw/sasl2/lib/sasl2/smtpd.conf
/opt/csw/courier/etc/imapd
/opt/csw/courier/etc/authlib/authdaemonrc
/opt/csw/courier/etc/authlib/authmysqlrc instead of /opt/csw/courier/etc/authmysqlrc
if authlib/authmysqlrc does not exist, an I/O error will be raised.
I have refered to the following 3 links to install the mail server.
http://high5.net/howto/ Postfix+MySQL+Courier-IMAP(参数设置)***
http://www.5dmail.net/html/2005-8-16/2005816171404.htm 中小规模POSTFIX邮件系统(编译安装)***
http://www.gentoo.org/doc/en/virt-mail-howto.xml Virtual Mailhosting System with Postfix Guide(调试方法)***
Postfix documentation:
http://www.5dmail.net/html/2006-3-11/2006311100246.htm 邮件系统postfix安装与配置(上)*
http://www.5dmail.net/html/2006-3-11/2006311100411.htm 邮件系统postfix安装与配置(下)*
http://www.linuxmine.com/4345.html Virtual、Aliases、虚拟表等概念之间的关系*
http://www.5dmail.net/html/2004-10-26/20041026164400.htm postfix 2.0.16的虚拟投递代理文档
http://www.postfix.org/INSTALL.html Postfix Installation From Source Code
http://www.postfix.org/docs.html Postfix Howtos and FAQs
http://cpplus.info/DEMO/man/view_doc23a5.html?file=/usr/share/doc/postfix-2.1.6/html/VIRTUAL_README.html VIRTUAL_README
http://www.hzqbbc.com/blog/arch/2002/11/postfix_ceccee.html 有关Postfix 的虚拟用户支持的大讨论
http://www.postfix.org/faq.html#virtual_command
http://www.postfix.org/postconf.5.html
http://www.postfix.org/DATABASE_README.html
http://www.postfix.org/DEBUG_README.html#logging Postfix Debugging Howto
http://www.postfix.org/faq.html Postfix Frequently Asked Questions
Cyrus-SASL documentation:
cyrus-sasl-2.1.19/doc/install.html
Courier-IMAP documentation:
http://www.courier-mta.org/imap/INSTALL.html
http://www.courier-mta.org/imap/
http://www.inter7.com/courierimap/FAQ.html
courier-imap-4.1.0/imap/imapd.html
courier-imap-4.1.0/imap/README.html
Mysql documentation:
http://dev.mysql.com/doc/refman/5.0/en/solaris.html Mysql with Solaris Notes
http://wiki.arslinux.com/Mail_Server:MySQL_Authentication Postifx w/ SASL + Courier IMAP w/ SSL + Maildrop + MySQL + SpamAssassin (Appendix)
Solutions:
http://wanderingbarque.com/howtos/mailserver/mailserver.html Secure Virtual Mailserver HOWTO Postfix + OpenLDAP + Dovecot + Jamm + SASL + SquirrelMail
http://www.phparchitecture.com/howto_show.php?id=2&showall Postifx w/ SASL + Courier IMAP w/ SSL + Maildrop + MySQL + SpamAssassin
Other Mail Server:
http://www.5dmail.net/NewList-51-1.htm Qmail/Sendmail/Postfix News list*















王志军 # 30. April 2006, 10:02
mysql-4.1.18.tar.gz
cyrus-sasl-2.1.19.tar.gz
postfix-2.0.20.tar.gz
courier-authlib-0.58.tar.bz2
courier-imap-4.1.0.tar.bz2
gunizp *.gz
bunzip2 *.bz2
tar xvf *tar
setenv PATH .:/opt/csw/bin:/usr/ccs/bin:/bin:/usr/openwin/bin:/usr/bin:/usr/sbin:/etc:/usr/ucb:/usr/local/bin
--------------------------------------------------------------
#install Mysql
shell> groupadd wheel
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/opt/csw/mysql4
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
# create postfix tables
mysql -uroot
USE mysql;
insert into user(host, user, password) values('localhost', 'postfix', '');
update user set password=password('postfix') where user='postfix';
create database postfix;
grant all on postfix.* to postfix@localhost identified by "postfix";
flush privileges;
USE postfix;
CREATE TABLE `alias` (
`address` varchar(255) NOT NULL default '',
`goto` text NOT NULL,
`domain` varchar(255) NOT NULL default '',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`modified` datetime NOT NULL default '0000-00-00 00:00:00',
`active` tinyint(1) NOT NULL default '1',
PRIMARY KEY (address)
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Aliases';
CREATE TABLE `domain` (
`domain` varchar(255) NOT NULL default '',
`description` varchar(255) NOT NULL default '',
`aliases` int(10) NOT NULL default '0',
`mailboxes` int(10) NOT NULL default '0',
`maxquota` int(10) NOT NULL default '0',
`transport` varchar(255) default NULL,
`backupmx` tinyint(1) NOT NULL default '0',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`modified` datetime NOT NULL default '0000-00-00 00:00:00',
`active` tinyint(1) NOT NULL default '1',
PRIMARY KEY (domain)
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Domains';
CREATE TABLE `mailbox` (
`username` varchar(255) NOT NULL default '',
`password` varchar(255) NOT NULL default '',
`name` varchar(255) NOT NULL default '',
`maildir` varchar(255) NOT NULL default '',
`quota` int(10) NOT NULL default '0',
`domain` varchar(255) NOT NULL default '',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`modified` datetime NOT NULL default '0000-00-00 00:00:00',
`active` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`username`)
) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Mailboxes';
delete from alias;
delete from domain;
delete from mailbox;
INSERT INTO domain (domain,description,transport) VALUES ('localhost.com','local Domain','local:');
INSERT INTO domain (domain,description,transport) VALUES ('abchan-sun.us.oracle.com','virtual Domain','virtual:');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('adam@abchan-sun.us.oracle.com','adam','adam','adam/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('jill@abchan-sun.us.oracle.com','jill','jill','jill/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('john@abchan-sun.us.oracle.com','john','john','john/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('jack@abchan-sun.us.oracle.com','jack','jack','jack/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('jones@abchan-sun.us.oracle.com','jones','jones','jones/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('mary@abchan-sun.us.oracle.com','mary','mary','mary/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('humpty@abchan-sun.us.oracle.com','humpty','humpty','humpty/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('dumpty@abchan-sun.us.oracle.com','dumpty','dumpty','dumpty/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('muffet@abchan-sun.us.oracle.com','muffet','muffet','muffet/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('tuffet@abchan-sun.us.oracle.com','tuffet','tuffet','tuffet/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('jane@abchan-sun.us.oracle.com','jane','jane','jane/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('isemailu@abchan-sun.us.oracle.com','isemailu','isemailu','isemailu/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('isemailu2@abchan-sun.us.oracle.com','isemailu','isemailu2','isemailu2/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('isemailu3@abchan-sun.us.oracle.com','isemailu','isemailu3','isemailu3/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('sestest1@abchan-sun.us.oracle.com','sestest','sestest1','sestest1/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('sestest2@abchan-sun.us.oracle.com','sestest','sestest2','sestest2/');
INSERT INTO mailbox (username,password,name,maildir)
VALUES ('sestest3@abchan-sun.us.oracle.com','sestest','sestest3','sestest3/');
--------------------------------------------------------------
#install SASL
patch -p0 < ../cyrus-sasl-2.1.19-checkpw.c.patch
setenv CPPFLAGS "-I/opt/csw/mysql4/include/mysql"
./configure \
--prefix=/opt/csw/sasl2 \
--disable-cmulocal \
--enable-sample \
--enable-static=no \
--enable-shared=yes \
--enable-fast-install=yes \
--without-gnu-ld \
--disable-libtool-lock \
--enable-staticdlopen=no \
--without-purecov \
--without-purify \
--enable-java=no \
--with-javabase=no \
--without-dbpath \
--with-dblib=berkeley \
--with-bdb-libdir=/opt/csw/bdb4/lib \
--with-bdb-incdir=/opt/csw/bdb4/include \
--with-gdbm=no \
--with-pam=no \
--with-saslauthd=no \
--with-pwcheck=/var/pwcheck \
--with-ipctype=unix \
--disable-alwaystrue \
--disable-checkapop \
--disable-cram \
--with-des=yes \
--disable-digest \
--with-openssl=/opt/csw/bin/openssl \
--disable-otp \
--with-opie=no \
--disable-srp \
--disable-srp-setpass \
--disable-krb4 \
--disable-gssapi \
--enable-plain \
--disable-anon \
--enable-login \
--disable-ntlm \
--with-ldap=no \
--enable-sql \
--with-authdaemon=yes \
--with-mysql=/opt/csw/mysql4/lib/mysql \
--with-plugindir=/opt/csw/lib/sasl2 \
--with-rc4 \
--without-dmalloc \
--without-sfio
gmake
gmake install WITH_AUTHDAEMON=yes
ln -s /opt/csw/mysql4/lib/mysql /usr/lib/mysql
ln -s /opt/csw/sasl2/lib /usr/lib/sasl
ln -s /opt/csw/sasl2/lib/sasl2 /opt/csw/lib/sasl2
ln -s /opt/csw/mysql4/include/mysql /usr/include/mysql
ln -s /opt/csw/sasl2/include/sasl /usr/include/sasl
copy libmysqlclient.so.14 & libsasl2.so.2 to /usr/lib
#setting in /opt/csw/sasl2/lib/sasl2/smtpd.conf
pwcheck_method: authdaemond
log_level: 7
mech_list: PLAIN LOGIN
authdaemond_path: /tmp/mysql.sock
--------------------------------------------------------------
#install postfix
mv /usr/bin/newaliases /usr/bin/newaliases.postfix
mv /usr/bin/maiq /usr/bin/maiq.postfix
mv /usr/sbin/sendmail /usr/sbin/sendmail.postfix
groupadd postfix
groupadd postdrop
useradd postfix -g postfix -s /bin/false -d /no/where
setenv LD_LIBRARY_PATH
patch < postfix-2.1*.patch
gmake -f Makefile.init makefiles 'CCARGS=-DUSE_SASL_AUTH -DHAS_MYSQL -I/usr/include/mysql -I/usr/include/sasl' 'AUXLIBS=-L/opt/csw/mysql4/lib/mysql -lmysqlclient -L/opt/csw/lib -lsasl2 -lz -lm -L/usr/lib' CC=/opt/SUNWspro/bin/cc
gmake
gmake install
/usr/sbin/postfix start/reload/stop
#Note: postfix log file is usually called /var/log/maillog or /var/log/mail; the exact pathname is defined in the /etc/syslog.conf file.
# The log file is /var/log/syslog in Solaris instead of /var/log/maillog
/usr/sbin/newaliases
echo 'postfix:root' >>/etc/aliases
mkdir /var/spool/postfix/sestest1
mkdir /var/spool/postfix/sestest1/cur /var/spool/postfix/sestest1/new /var/spool/postfix/sestest1/tmp
chown -R postfix:postfix /var/spool/postfix/sestest1
#setting in main.cf
myhostname = abchan-sun.us.oracle.com
mydomain = us.oracle.com
queue_directory = /var/spool/postfix
mydestination = localhost, localhost.$mydomain
mail_spool_directory = /var/mail
debug_peer_level = 2
#transport_maps = mysql:/etc/postfix/mysql_domain_transport.cf
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_base = /var/spool/postfix
#virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_domains = $myhostname
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_transport = virtual
virtual_gid_maps = static:55542
virtual_uid_maps = static:94252
virtual_minimum_uid = 1001
# Additional for quota support
virtual_mailbox_limit = 51200000
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/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
smtpd_sasl_auth_enable = yes
smtpd_sasl2_auth_enable = yes
#smtpd_sasl_local_domain =
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination
reject_non_fqdn_hostname,
#setting in master.cf
smtp inet n - n - - smtpd -v
virtual unix - n n - - virtual
#setting in mysql_domain_transport.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = domain
select_field = transport
where_field = domain
#additional_conditions = and backupmx = '0' and active = '1'
#setting in mysql_relay_domains_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = domain
select_field = domain
where_field = domain
additional_conditions = and backupmx = '1'
#setting in mysql_virtual_alias_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = alias
select_field = goto
where_field = address
#setting in mysql_virtual_domains_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = domain
select_field = domain
where_field = domain
#additional_conditions = and backupmx = '0' and active = '1'
#setting in mysql_virtual_mailbox_limit_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = quota
where_field = username
#additional_conditions = and active = '1'
#setting in mysql_virtual_mailbox_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = maildir
where_field = username
#additional_conditions = and active = '1'
test with "telnet localhost 25" - can send messages to the email account
--------------------------------------------------------------
#install courier-authlib
./configure CPPFLAGS="-I/opt/csw/bdb4/include" LDFLAGS="-L/opt/csw/bdb4/lib" --prefix=/opt/csw/courier --with-mysql-libs=/opt/csw/mysql4/lib/mysql --with-mysql-includes=/opt/csw/mysql4/include/mysql --with-mailuser=postfix --with-mailgroup=postfix --with-authmysql --with-authmysql=yes --with-authchangepwdir
gmake
gmake install
gmake install-configure
/opt/csw/courier/sbin/authdaemond start/stop
#add "courier_authdaemond_enable=YES" to /etc/rc.conf
#setting in /opt/csw/courier/etc/authlib/authdaemonrc
authmodulelist="authmysql"
authmodulelistorig="authuserdb authpam authldap authmysql authcustom authpipe"
daemons=2
version="authdaemond.mysql"
authdaemonvar=/opt/csw/courier/var/spool/authdaemon
#setting in /opt/csw/courier/etc/authlib/authmysqlrc
MYSQL_SERVER localhost
MYSQL_DATABASE postfix
MYSQL_USERNAME postfix
MYSQL_PASSWORD postfix
MYSQL_USER_TABLE mailbox
MYSQL_GID_FIELD '55542'
MYSQL_UID_FIELD '94252'
#MYSQL_CRYPT_PWFIELD password
MYSQL_CLEAR_PWFIELDpassword
MYSQL_HOME_FIELD '/var/spool/postfix'
MYSQL_LOGIN_FIELD name
MYSQL_MAILDIR_FIELD maildir
MYSQL_NAME_FIELD name
MYSQL_OPT 0
#MYSQL_PORT 0
# Uncomment below if you want quota support.
#MYSQL_QUOTA_FIELD quota
MYSQL_SOCKET /tmp/mysql.sock
NOTE: Make sure that there are no (trailing) spaces in this file, only tabs!!
--------------------------------------------------------------
#install courier-imap
./configure CPPFLAGS="-I/opt/csw/bdb4/include -I/opt/csw/courier/include/" LDFLAGS="-L/opt/csw/bdb4/lib -L/opt/csw/courier/lib -L/opt/csw/courier/lib/courier-authlib" --prefix=/opt/csw/courier --with-mysql-libs=/opt/csw/mysql4/lib/mysql --with-mysql-includes=/opt/csw/mysql4/include/mysql --with-authmysql --with-authmysql=yes --with-authchangpwdir --with-waitfunc=wait3
gmake
gmake install
gmake install-configure
ln -s /opt/csw/courier/libexe/imapd.rc /opt/csw/courier/sbin/imapd
/opt/csw/courier/sbin/imapd start/stop
#setting in /opt/csw/courier/etc/imapd
IMAPDSTART=YES
IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE"
test with "telnet localhost 143"
test with Thunderbird or other email clients - can log into the email account and receive messages
王志军 # 30. April 2006, 10:04
By Luigi Ceneri
URL: http://www.dbaoncall.net/references/ht_change_host_name.html
Just edit the following files and substitute each occurrence of the old hostname with the new one. The smart Sys Admin has available the DbaOnCall.net VI Reference and knows that with only one command he can change all the occurrences of a particular string with another one.
/etc/hosts
/etc/nodename
/etc/hostname.xxn
(xxn = network interface, such as hme0)
/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts
/etc/inet/ipnodes
(if this file exists and if a hostname entry exists)
王志军 # 30. April 2006, 10:15
1. 如果用binary方式安装,首先安装pkg-get(类似aptget),在http://www.blastwave.org/pkg-get.php有详细说明;在/opt/csw/etc/pkg-get.conf中设置proxy和source list。
2. pkg-get [-U] -i openldap 注:-U在dependent软件版本冲突时使用
3. 其它相关命令
pkginfo
pkgadd -d openldap
pkgrm openldap
王志军 # 13. June 2006, 23:55
1。修改/etc/postfix/emails.sql文件;
2。mysql -upostfix -ppostfix
> source emails.sql
3。在/var/spool/postfix目录下创建帐号对应文件目录和子目录cur,new,tmp;
4。chown -R postfix:postfix 帐号目录
[5。在OID中增加一个entry,用于动态email account]