postfix安装记录二postfix安装

四、安装courier-ahthlib


1首先需要安装expect


#yum install expect

[root@mail www]# rpm -qa |grep expect

expect-5.43.0-8.el5


2、安装courier-authlib


[root@mail www]# groupadd -g 1000 vmail

[root@mail www]# useradd -g 1000 -u1000vmail


[root@mail www]# id vmail

uid=1000(vmail) gid=1000(vmail)groups=1000(vmail)



[root@mail sourcepack]# tar jxvfcourier-authlib-0.63.0.tar.bz2 -C ../installpack/

[root@mail installpack]# cdcourier-authlib-0.63.0/


./configure --prefix=/usr/local/courier-authlib--without-stdheaderdir --sysconfdir=/etc--without-authuserdb --without-authpam --without-authldap--without-authpwd --without-authshadow --without-authvchkpw --without-authpgsql--without-authcustom --with-authmysql--with-mysql-libs=/usr/local/mysql/lib/mysql--with-mysql-includes=/usr/local/mysql/inculde/mysql --with-redhat--with-mailuser=vmail--with-mailgroup=vmail


[root@mail courier-authlib-0.63.0]# make

[root@mail courier-authlib-0.63.0]# makeinstall


3、加入搜索路径


[[email protected]]# echo

"/usr/local/courier-authlib/lib/courier-authlib">>/etc/ld.so.conf

[root@mail courier-authlib-0.63.0]#ldconfig


4、修改配置文件



# cd /etc/authlib/

#cp -p authmysqlrc.distauthmysqlrc

#cp -p authdaemonrc.distauthdaemonrc


[root@mail authlib]# ll

total 32

-rw-rw---- 1 vmail vmail 3573 Oct5 14:43 authdaemonrc

-rw-rw---- 1 vmail vmail 3587 Oct5 09:31 authdaemonrc.dist

-rw-rw---- 1 vmail vmail 8883 Oct5 15:26 authmysqlrc

-rw-rw---- 1 vmail vmail 8812 Oct5 09:31 authmysqlrc.dist




[root@mail authlib]# cat authdaemonrc |grep-v '^#' | grep -v '^$'

authmodulelist="authmysql"

authmodulelistorig="authmysql"

daemons=10

DEBUG_LOGIN=2



这个修改前两行表示用mysql认证模块;把DEBUG_LOGIN的值有默认的“0”改成“2”的用意是运行postfix时有更多的信息输出,通过生成的日志以帮助排错。



[root@mail authlib]# cat authmysqlrc |grep-v '^#' | grep -v '^$'

MYSQL_SERVERlocalhost

MYSQL_USERNAME extmail

MYSQL_PASSWORDextmail

MYSQL_SOCKET/tmp/mysql.sock

MYSQL_PORT3306

MYSQL_OPT0

MYSQL_DATABASEextmail

MYSQL_USER_TABLEmailbox

MYSQL_CRYPT_PWFIELDpassword

MYSQL_UID_FIELD"1000"

MYSQL_GID_FIELD"1000"

MYSQL_LOGIN_FIELDusername

MYSQL_HOME_FIELDconcat("/var/mailbox/",homedir)

MYSQL_MAILDIR_FIELDconcat("/var/mailbox/",maildir)

MYSQL_QUOTA_FIELDconcat(quota,"S")

特别注意MYSQL_UID_FIELDMYSQL_GID_FIELD字段的值,这里是‘1000’,也可以是其它的,但一定要与vmail用户及组相一致(id vmail可以得出这两者的值)



5、启动及加入自动运行队列


[root@mail courier-authlib-0.63.0]#pwd

/usr/local/src/installpack/courier-authlib-0.63.0


# cp courier-authlib.sysvinit/etc/rc.d/init.d/courier-authlib


# chmod 755/etc/rc.d/init.d/courier-authlib

# chkconfig --add courier-authlib

# chmod a+x/usr/local/courier-authlib/var/spool/authdaemon

# chkconfig courier-authlib on

# service courier-authlib start





五、安装courier-imap

1、安装软件

root@mail installpack]# tar jxvfcourier-imap-4.9.3.tar.bz2 -C ../installpack/

[root@mail installpack]# cdcourier-imap-4.9.3/

[root@mail courier-imap-4.9.3]# ./configure--prefix=/usr/local/courier-imap --with-redhat --enable-unicode --disable-root-check--with-trashquota --without-ipv6COURIERAUTHCONFIG="/usr/local/courier-authlib/bin/courierauthconfig"


[root@mail courier-imap-4.9.3]# make

[root@mail courier-imap-4.9.3]# makeinstall


2、编辑配置文件


[root@mail etc]# pwd

/usr/local/courier-imap/etc

[root@mail etc]# ll

total 64

-rw------- 1 root root367 Oct1 23:28 imapd.cnf

-rw------- 1 root root 13928 Oct1 23:28 imapd.dist

-rw------- 1 root root 10081 Oct1 23:28 imapd-ssl.dist

-rw------- 1 root root367 Oct1 23:28 pop3d.cnf

-rw------- 1 root root3345 Oct1 23:28 pop3d.dist

-rw------- 1 root root9640 Oct1 23:28 pop3d-ssl.dist

-r--r--r-- 1 root root516 Oct1 23:28 quotawarnmsg.example

drwxr-xr-x 2 root root4096 Oct1 23:28 shared

drwxr-xr-x 2 root root4096 Oct1 23:28 shared.tmp



[root@orcl etc]# cp -p imapd.dist imapd

[root@orcl etc]# cp -p pop3d.dist pop3d

[root@orcl etc]# cp -p imapd-ssl.dist imapd-ssl

[root@orcl etc]# cp -p pop3d-ssl.dist pop3d-ssl


主要是编辑pop3dsmtpd两个文件把POP3DSTARTIMAPDSTART由原来的NO改为YES


[root@mail etc]# egrep -i 'path|start'pop3d |grep -v '^#'

POP3DSTART=YES

MAILDIRPATH=Maildir

[root@mail etc]# egrep -i 'path|start'imapd |grep -v '^#'

IMAPDSTART=YES

MAILDIRPATH=Maildir




3、启动及加入自动运行队列


[root@mail etc]# cp/usr/local/src/installpack/courier-imap-4.9.3/courier-imap.sysvinit

/etc/rc.d/init.d/courier-imapd


# chmod 755 /etc/rc.d/init.d/courier-imapd


# chkconfig --add courier-imapd


# chkconfig courier-imapd on


# service courier-imapd start

Starting Courier-IMAP server: imap pop3

[root@mail etc]# netstat -ntpl |egrep'110|143'

tcp00 0.0.0.0:1100.0.0.0:*LISTEN29607/couriertcpd

tcp00 0.0.0.0:1430.0.0.0:*LISTEN29601/couriertcpd







六、安装cyrus-sasl

1、安装软件

[root@mail sourcepack]# tar zxvfcyrus-sasl-2.1.22.tar.gz -C ../installpack/

# cd cyrus-sasl-2.1.22/


./configure --enable-plain --enable-cram --enable-digest --enable-login --enable-sql --disable-anon --disable-ntlm --disable-gssapi --disable-krb4 --disable-otp --disable-srp--disable-srp-setpass --with-mysql=/usr/local/mysql --with-mysql-includes=/usr/local/mysql/include/mysql --with-mysql-libs=/usr/local/mysql/lib/mysql --with-authdaemond=/usr/local/courier-authlib/var/spool/authdaemon/socket


[root@mail cyrus-sasl-2.1.22]# make

[root@mail cyrus-sasl-2.1.22]# make install



2、创建共享连接库



# ln -sv /usr/local/lib/sasl2/usr/lib/sasl2


# echo"/usr/local/lib">>/etc/ld.so.conf


# ldconfig



3、建立smtpd用户认证的配置文件,编辑smtpd认证配置文件,该文件默认不存在


[root@mail sasl2]# cat smtpd.conf

pwcheck_method: authdaemond

mech_list: plain login

log_level: 3

authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socket


Sasl2需要使用文件/usr/local/authlib/var/spool/authdaemon/socket,但默认情况下,其属性是744,需要把它加上执行权限,以便文件属组(主)而外的其它用户可以执行。运行命令

chmod +x/usr/local/authlib/var/spool/authdaemon即可,如果不这样处理,smtp验证无一例外会失败的。



4、创建运行时需要的目录

[root@mail sasl2]# mkdir -pv/var/state/saslauthd

mkdir: created directory `/var/state'

mkdir: created directory`/var/state/saslauthd'


5、启动并测试


root@mail sasl2]# /usr/local/sbin/saslauthd -a shadow pam -d

saslauthd[26689] :main: num_procs: 5

saslauthd[26689] :main: mech_option: NULL

saslauthd[26689] :main: run_path: /var/state/saslauthd

saslauthd[26689] :main: auth_mech: shadow

saslauthd[26689] :ipc_init:using accept lock file: /var/state/saslauthd/mux.accept

saslauthd[26689] :detach_tty: master pid is: 0

saslauthd[26689] :ipc_init: listening on socket:/var/state/saslauthd/mux

saslauthd[26689] :main: using process model

saslauthd[26690] :get_accept_lock :acquired accept lock

saslauthd[26689] :have_baby: forked child: 26690

saslauthd[26689] :have_baby: forked child: 26691

saslauthd[26689] :have_baby: forked child: 26692

saslauthd[26689] :have_baby: forked child: 26693

看有没有报错然后ctrl+c

saslauthd[26693] :server_exit: child exited: 26693

saslauthd[26692] :server_exit: child exited: 26692

saslauthd[26691] :server_exit: child exited: 26691

saslauthd[26690] :server_exit: child exited: 26690

saslauthd[26689] :handle_sigchld: child exited: 26690

saslauthd[26689] :handle_sigchld: child exited: 26691

saslauthd[26689] :handle_sigchld: child exited: 26692

saslauthd[26689] :handle_sigchld: child exited: 26693

saslauthd[26689] :server_exit: pid file lock removed:/var/state/saslauthd/saslauthd.pid.lock

saslauthd[26689] :ipc_cleanup: accept lock file removed:/var/state/saslauthd/mux.accept

saslauthd[26689] :ipc_cleanup: socket removed: /var/state/saslauthd/mux

saslauthd[26689] :server_exit: master exited: 0



[root@mail sasl2]#/usr/local/sbin/saslauthd -v //查看版本

saslauthd 2.1.22

authentication mechanisms: getpwent pamrimap shadow



#/usr/local/sbin/saslauthd -a shadow pam//启动


[root@mail local]#/usr/local/sbin/testsaslauthd -u root -p aa123456 //测试root帐号

和密码

0: OK "Success."


6、开机自启动

[root@mail sasl2]# echo "/usr/local/sbin/saslauthd-a shadow pam">>/etc/rc.local




七、安装postfix


1、添加用户和安装


# groupadd -g 105 postfix


# useradd -g 105 -u 105 -M -s /sbin/nologinpostfix


# groupadd -g 106 postdrop


# useradd -g 106 -u 106 -M -s /sbin/nologinpostdrop



[root@mail sourcepack]# tar zxvfpostfix-2.8.15.tar.gz -C ../installpack/



[root@mail postfix-2.8.15]# make -fMakefile.init Makefiles

"CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include/mysql -DUSE_CYRUS_SASL-DUSE_SASL_AUTH -I/usr/local/include/sasl" "AUXLIBS=-L/usr/local/mysql/lib/mysql-lmysqlclient -lz -lm -L/usr/local/lib -lsasl2"


# make

# make install

2、按照以下的提示输入相关的路径([]号中的是缺省值,”]”后的是输入值)


install_root: [/]

tempdir: [/root/postfix-2.6.5] /tmp//其他的都是默认

config_directory: [/etc/postfix]

command_directory: [/usr/sbin]

daemon_directory: [/usr/libexec/postfix]

data_directory: [/var/lib/postfix]

html_directory: [no]

mail_owner: [postfix]

mailq_path: [/usr/bin/mailq]

manpage_directory: [/usr/local/man]

newaliases_path: [/usr/bin/newaliases]

queue_directory: [/var/spool/postfix]

readme_directory: [no]

sendmail_path: [/usr/sbin/sendmail]

setgid_group: [postdrop]


3、生产二进制文件

# newaliases


//有的网友说安装postfix之前要独立安装BerkeleyDB,在生成makefiles文件时,编译postfix的时候没有加-L/usr/local/BerkeleyDB/libnewaliases会去找系统自带的4.3.29的库.会报错.但是这里并没有报错,我测试的结果是如果在编译postfix前把系统自带的db4卸载,独立安装了BerkeleyDB,那么在后面的安装amavisd相关模块时会起冲突。如下所示,所以为了以后能顺利安装,所以还是不要装独立BerkeleyDB;

[root@post amavisd-new-2.6.2]# /usr/local/sbin/amavisd debug

Problem in Amavis::DB or Amavis::DB::SNMP code:

BerkeleyDB needs compatible versions of libdb & db.h

you have db.h version4.3.29 and libdb version 4.5.20

Compilation failed in require at (eval 68) line 19.

BEGIN failed--compilation aborted at (eval 68) line 19.




4、建立邮件存放目录


# mkdir -pv /var/mailbox


# chown -R vmail.vmail /var/mailbox



5、修改postfix配置文件main.cf

# mv main.cf main.cf.old

# vi main.cf

myhostname = mail.test.com

mydomain = test.com

myorigin = $mydomain

mydestination =

mynetworks = 192.168.0.0/16, 127.0.0.0/8

inet_interfaces = all

readme_directory = no

sample_directory = /etc/postfix

sendmail_path = /usr/sbin/sendmail

html_directory = no

setgid_group = postdrop

command_directory = /usr/sbin

manpage_directory = /opt/postfix/man

daemon_directory = /usr/libexec/postfix

newaliases_path = /usr/bin/newaliases

mailq_path = /usr/bin/mailq

queue_directory = /var/spool/postfix

mail_owner = postfix

virtual_mailbox_base = /var/mailbox

virtual_mailbox_maps =mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

virtual_mailbox_domains =mysql:/etc/postfix/mysql_virtual_domains_maps.cf

virtual_alias_domains =

virtual_alias_maps =mysql:/etc/postfix/mysql_virtual_alias_maps.cf

virtual_uid_maps= static:1000

virtual_gid_maps= static:1000

virtual_transport = maildrop:

maildrop_destination_recipient_limit = 1

maildrop_destination_concurrency_limit = 1

message_size_limit = 52428800

mailbox_size_limit = 209715200

virtual_mailbox_limit = 209715200

virtual_create_maildirsize = yes

virtual_mailbox_extended = yes

virtual_mailbox_limit_maps =mysql:/etc/postfix/mysql_virtual_limit_maps.cf

virtual_mailbox_limit_override = yes

virtual_maildir_limit_message = Sorry, theuser's maildir has overdrawn his diskspace quota.

virtual_overquota_bounce = yes

smtpd_helo_required = yes

disable_vrfy_command = yes

strict_rfc821_envelopes = yes

invalid_hostname_reject_code = 554

multi_recipient_bounce_reject_code = 554

non_fqdn_reject_code = 554

relay_domains_reject_code = 554

unknown_address_reject_code = 554

unknown_client_reject_code = 554

unknown_hostname_reject_code = 554

unknown_local_recipient_reject_code = 554

unknown_relay_recipient_reject_code = 554

unknown_sender_reject_code = 554

unknown_virtual_alias_reject_code = 554

unknown_virtual_mailbox_reject_code = 554

unverified_recipient_reject_code = 554

unverified_sender_reject_code = 554

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

notify_classes = bounce, 2bounce, delay,policy, protocol, resource, software

bounce_template_file = /etc/postfix/bounce.cf

2bounce_notice_recipient = postmaster

bounce_notice_recipient = postmaster

delay_notice_recipient = postmaster

error_notice_recipient = postmaster

smtpd_sasl_auth_enable = yes

smtpd_sasl_local_domain = $mydomain

smtpd_sasl_security_options = noanonymous

smtpd_sasl_application_name = smtpd

smtpd_banner = Welcome to our $myhostnameESMTP,Warning: Version not Available!

alias_maps = hash:/etc/aliases

content_filter=amavisfeed:[127.0.0.1]:10024




6添加为支持虚拟域和虚拟用户所用到的配置文件,其实是直接在extman中复制过去


# tar zxvf extman-1.1.tar.gz


# cd extman-1.1


# cp docs/mysql_virtual_* /etc/postfix/


7启动postfix并加入到自启动


# /usr/sbin/postfix start


# echo "/usr/sbin/postfixstart">>/etc/rc.local


root@mail postfix]# netstat -anlt |egrep'110|143|25|80'

tcp00 0.0.0.0:1100.0.0.0:*LISTEN

tcp00 0.0.0.0:1430.0.0.0:*LISTEN

tcp00 0.0.0.0:800.0.0.0:*LISTEN

tcp00 0.0.0.0:250.0.0.0:*LISTEN








八、安装maildrop


1、安装和配置maildrop

安装maildrop 要安装pcre-devel ,如果没有则用yum 安装

[root@mail postfix]# rpm -qa |greppcre-devel

pcre-devel-6.6-6.el5_6.1


courier-authlib的头文件及库文件链接至/usr目录(编译maildrop时会到此目录下找此些相关的文件):


[root@mail maildrop-2.5.4]# ln -sv/usr/local/courier-authlib/bin/courierauthconfig

/usr/bin/courierauthconfig


create symbolic link`/usr/bin/courierauthconfig' to `/usr/local/courier-authlib/bin/courierauthconfig'



[root@mail sourcepack]# tar jxvfmaildrop-2.5.4.tar.bz2 -C ../installpack/


[root@mail maildrop-2.5.4]# ./configure--prefix=/usr/local/maildrop

--enable-sendmail=/usr/sbin/sendmail --enable-trusted-users="rootvmail" --enable-syslog=1 --enable-maildirquota --enable-maildrop-uid=1000 --enable-maildrop-gid=1000

--with-trashquota--with-dirsync


# make && make install

# cp /usr/local/maildrop/bin/maildrop/usr/local/bin/


2、检查安装结果


[root@mail maildrop-2.5.4]# maildrop -v

maildrop 2.5.4 Copyright 1998-2005 DoublePrecision, Inc.

GDBM/DB extensions enabled.

Courier Authentication Libraryextension enabled.//确保这一行显示

Maildir quota extension are now alwaysenabled.

This program is distributed under the termsof the GNU General Public

License. See COPYING for additionalinformation.

如果没有显示Courier Authentication Libraryextension enabled.说明你的maidrop还不支持courier auth,请仔细检查,重新编译maildrop建议不要自定义目录安装,可以减少不必要的麻烦,删除很方便:直接在已经编译的源代码目录 make uninstall 就行

知道maildrop把邮件移动到哪个用户目录还是非常有必要的,这个操作就是maildrop的日志记录。


3、配置Maildrop 日志文件; 这里我们创建一个新文件/etc/maildroprc

[root@mail maildrop]# cat /etc/maildroprc

logfile "/var/log/maildrop.log"

to "$HOME/Maildir"

VERBOSE="4"



4、下面的这个处理垃圾邮件,将垃圾邮件转移到垃圾邮件收件箱中


[root@mail maildrop]# touch/var/log/maildrop.log

[root@mail maildrop]# chown vmail.vmail/var/log/maildrop.log


5、配置postfix

# vi /etc/postfix/master.cf


去掉下面两行前面的#


67#maildropunix-nn--pipe

68#flags=DRhu user=vmailargv=/usr/local/bin/maildrop -d ${recipient}


第二行修改如下

flags=DRhu user=vmailargv=/usr/local/bin/maildrop -w 90 -d ${user}@${nexthop} ${recipient} ${user} ${extension}{nexthop}


此处要注意argv=后边的maildrop要加上路径,否则会出现


temporaryfailure. Command output: pipe: fatal: pipe_command: execvp maildrop: No suchfile or directory


注意maildrop unix这行前边不能有空格,要不会出现以下错误提示


warning: connect to transport maildrop: Nosuch file or directory

localhost postfix/error[2235]: BE0AE27DAF6:to=<[email protected]>,relay=none,delay=1443,delays=1443/0.24/0/0.02,dsn=4.3.0,status=deferred (mail transport unavailable)


注意flags=Drhu这一行前边有两个空格,要不会出现以下错(fatal: /etc/postfix/master.cf: line 100: bad transport type: user=vmail)。注意前面要保留两个空格,不然会有问题



编辑main.cf确保有

virtual_uid_maps = static:1000

virtual_gid_maps = static:1000

virtual_transport = maildrop


编辑/etc/authmysqlrc

# vi /etc/authmysqrc

MYSQL_UID_FIELD'1000'

MYSQL_GID_FIELD'1000'


十、安装配置extmail extman

1、安装extmal

[root@mail var]# cd /var/www/

[root@mail www]# mkdir extsuite

[root@mail sourcepack]# tar -zxvfextmail-1.2.tar.gz -C /var/www/extsuite/

[root@mail extsuite]# mv extmail-1.2/extmail

[root@mail extmail]# cd extmail/

[root@mail extmail]# cp -p webmail.cf.defaultwebmail.cf

[root@mail extmail]# vim webmail.cf


#SYS_USER_LANG = en_US修改为SYS_USER_LANG = zh_CN


128 #SYS_MAILDIR_BASE = /home/domains修改为129 SYS_MAILDIR_BASE = /var/mailbox


140 #SYS_MYSQL_USER = db_user

141 #SYS_MYSQL_PASS = db_pass


修改为


142 SYS_MYSQL_USER = extmail

143 SYS_MYSQL_PASS = extmail


SYS_MYSQL_SOCKET =/var/lib/mysql/mysql.sock

修改为连接数据库的sock

146 SYS_MYSQL_SOCKET = / tmp/mysql.sock


SYS_AUTHLIB_SOCKET =/var/spool/authdaemon/socket

此句用来指明authdaemo socket文件的位置,这里修改为:

SYS_AUTHLIB_SOCKET =/usr/local/courier-authlib/var/spool/authdaemon/socket


其他的保持默认就可以了



修改cgi 执行文件属主为apache运行的身份

[root@mail extmail]# chown -R vmail.vmailcgi/


2、安装extman


[root@mail installpack]# mv extman-1.1//var/www/extsuite/extman


#cd /var/www/extsuite/extman

# mv webman.cf.default webman.cf



12 #SYS_MAILDIR_BASE = /home/domains

修改为

13 SYS_MAILDIR_BASE = /var/mailbox



131 SYS_MYSQL_SOCKET =/usr/local/mysql/tmp/mysql.sock


修改为

132 #SYS_MYSQL_SOCKET = /tmp /mysql.sock


3、使用extman源码目录下docs目录中的extmail.sqlinit.sql建立数据库:


# cd /var/www/extsuite/extman


# mysql -u root -p <docs/extmail.sql


# mysql -u root -p <docs/init.sql


4、修改cgi目录的属主:


#chown -R vmail.vmail/var/www/extsuite/extman/cgi


5extmanextmail需要Perl-Unix-SyslogDBD-Mysqlperl-GD的支持


#perl -MCPAN -eshell


然后一路回车后出现:


cpan>


然后我们输入:


cpan>install Unix::Syslog


cpan>install GD


cpan>install DBI


-----cpan>install DBD::mysql # DBD-Mysql目前最新的版本为DBD-mysql-4.006,但它和系统中的perl结合使用时会造成extmail无法正常使用,因此我们采用3的版本


# tar -zxvf DBD-mysql-3.0008.tar.gz


# cd DBD-mysql-3.0008


# perl Makefile.PL


# make


# make install


6、建立extmanextmail的目录


# mkdir /tmp/extman


# chown -R vmail.vmail /tmp/extman/


# mkdir /tmp/extmail


# chown -R vmail.vmail /tmp/extmail/


7apache相关配置


# vi /usr/local/apache2/conf/httpd.conf


去掉这行前面的#


Include conf/extra/httpd-vhosts.conf



# vi /usr/local/apache2/conf/extra/httpd-vhosts.conf


去后面的<VirtualHost>两段


<VirtualHost *:80>


....


</VirtualHost>


添加下面内容


<VirtualHost *:80>

ServerName mail.test.com

DocumentRoot /var/www/extsuite/extmail/html

ScriptAlias /extmail/cgi//var/www/extsuite/extmail/cgi/

Alias /extmail//var/www/extsuite/extmail/html/

ScriptAlias /extman/cgi//var/www/extsuite/extman/cgi/

Alias /extman//var/www/extsuite/extman/html/

SuexecUserGroup vmail vmail

</VirtualHost>


8、重启一下apache服务器


#/usr/local/apache/bin/ apachectl restart


到此,就全配置完了


9、到win终端。修改hosts文件

192.168.x.x mail.test.com


在浏览器中输入http://mail.test.com/extman进入管理界面,默认内置账号是[email protected],密码是extmail*123*,添加一个域和用户,extman可以管理多个域;


http://mail.test.com/extmail中登陆


你可能感兴趣的:(postfix,amavisd,垃圾邮件过滤)