基于虚拟账号的邮件系统之×××

postfix是Wietse Venema在IBM的GPL协议之下开发的MTA(邮件传输代理)软件。postfix是Wietse Venema想要为使用最广泛的sendmail提供替代品的一个尝试。在nternet世界中,大部分的电子邮件都是通过sendmail来投递的,大约有100万用户使用sendmail,每天投递上亿封邮件。这真是一个让人吃惊的数字。Postfix试图更快、更容易管理、更安全,同时还与sendmail保持足够的兼容性。

一、预安装环境

1.软件包准备

Unix-Syslog-1.1.tar.gz

extmail-1.2.tar.gz

extman-1.1.tar.gz

postfix-2.8.2.tar.gz

courier-authlib-0.63.1.20111230.tar.bz2

将软件包上传到服务器,可以上传到管理员家目录(略)

2.系统环境

Linux 5.4 (2.6.18-164.el5)

想要实现源码安装,必须先要配置好编译环境。使用yum grouplist |less进行查看。

Development Tools --开发工具

Legacy Software Development -- 传统软件开发工具

Development Libraries –开发工具库

如果需要图形。那么以下安装包是需要的。

Kde环境需要安装:

Kde software development

Gnome环境需要安装:

Gnome software development

X software development

[root@server ~]# yum groupinstall "Development Libraries"

[root@server ~]# yum groupinstall "Development Tools"

3.修改相关文件

卸载sendmail

[root@phoenix ~]# rpm -e sendmail --nodeps

[root@phoenix ~]# vim /etc/resolv.conf

clip_image002

修改网卡

[root@phoenix ~]# vim /etc/sysconfig/network

clip_image004

修改主机名称

[root@phoenix ~]# hostname mail.phoenix.com

[root@phoenix ~]# export hostname

[root@phoenix ~]# init 6

[root@mail ~]# hostname

mail.phoenix.com

4.安装DNS

安装DNS

[root@phoenix /]# yum install bind bind-chroot caching-nameserver -y

修改相关文件

[root@phoenix ~]# cd /var/named/chroot/etc/

[root@phoenix etc]# ll

total 16

-rw-r--r-- 1 root root 405 Feb 8 02:08 localtime

-rw-r----- 1 root named 1230 Jul 30 2009 named.caching-nameserver.conf

-rw-r----- 1 root named 955 Jul 30 2009 named.rfc1912.zones

-rw-r----- 1 root named 113 Feb 8 02:43 rndc.key

[root@phoenix etc]# cp -p named.caching-nameserver.conf named.conf

[root@phoenix etc]# vim named.conf

clip_image006

[root@phoenix etc]# vim named.rfc1912.zones

clip_image008

[root@phoenix etc]# pwd

/var/named/chroot/etc

[root@phoenix etc]# cd ../var/named

[root@phoenix named]# pwd

/var/named/chroot/var/named

[root@phoenix named]# ll

total 36

drwxrwx--- 2 named named 4096 Aug 26 2004 data

-rw-r----- 1 root named 198 Jul 30 2009 localdomain.zone

-rw-r----- 1 root named 195 Jul 30 2009 localhost.zone

-rw-r----- 1 root named 427 Jul 30 2009 named.broadcast

-rw-r----- 1 root named 1892 Jul 30 2009 named.ca

-rw-r----- 1 root named 424 Jul 30 2009 named.ip6.local

-rw-r----- 1 root named 426 Jul 30 2009 named.local

-rw-r----- 1 root named 427 Jul 30 2009 named.zero

drwxrwx--- 2 named named 4096 Jul 27 2004 slaves

[root@phoenix named]# cp -p localhost.zone phoenix.com.db

[root@phoenix named]# cp -p named.local 10.168.192.db

[root@phoenix named]# vim phoenix.com.db

clip_image010

[root@phoenix named]# vim 10.168.192.db

clip_image012

测试DNS是否正常启动

[root@phoenix named]# rndc reload

server reload successful

[root@phoenix named]# service named restart

Stopping named: [ OK ]

Starting named: [ OK ]

[root@phoenix named]#

[root@mail ~]# chkconfig named on

[root@mail ~]# chkconfig --list |grep named

named 0:off 1:off 2:on 3:on 4:on 5:on 6:off

clip_image014

5.开启mysql

开启mysql

[root@mail ~]# service mysqld start

Starting MySQL: [ OK ]

[root@mail ~]# chkconfig mysqld on

[root@mail ~]# chkconfig --list |grep mysqld

mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off

[root@mail ~]#

[root@mail ~]# mysql

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

Your MySQL connection id is 2

Server version: 5.0.77 Source distribution

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

mysql> show databases;

+--------------------+

| Database |

+--------------------+

| information_schema |

| mysql |

| test |

+--------------------+

3 rows in set (0.00 sec)

mysql> \q

Bye

[root@mail ~]#

但是这样并不安全,需要修改密码

[root@mail ~]# mysqladmin -u root -p password 'redhat'

Enter password:

[root@mail ~]#

可以发现直接登录失败

[root@mail ~]# mysql

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

[root@mail ~]#

添加远程管理等

[root@mail ~]# mysql -u root -p

Enter password:

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

Your MySQL connection id is 14

Server version: 5.0.77 Source distribution

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

mysql> SET PASSWORD FOR root@'localhost'=PASSWORD('redhat'); //授权本地用户

Query OK, 0 rows affected (0.00 sec)

mysql> SET PASSWORD FOR root@'127.0.0.1'=PASSWORD('redhat'); //授权本地用户

Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES; //让设置的内容生效

Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'redhat'; //授权远程用户

Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES; //让设置的内容生效

Query OK, 0 rows affected (0.01 sec)

mysql> \q

Bye

[root@mail ~]#

二、安装postfix

1.创建有关用户

[root@mail ~]# groupadd -g 2525 postfix

[root@mail ~]# useradd -g postfix -u 2525 -s /sbin/nologin -M postfix

[root@mail ~]# groupadd -g 2526 postdrop

[root@mail ~]# useradd -g postdrop -u 2526 -s /bin/false -M postdrop

[root@mail ~]#

2.拆包

[root@mail ~]# ll

total 6972

-rw------- 1 root root 1291 Feb 8 02:05 anaconda-ks.cfg

-rw-r--r-- 1 root root 2268626 Feb 8 02:37 courier-authlib-0.63.1.20111230.tar.bz2

-rw-r--r-- 1 root root 541279 Feb 8 02:37 extmail-1.2.tar.gz

-rw-r--r-- 1 root root 586234 Feb 8 02:37 extman-1.1.tar.gz

-rw-r--r-- 1 root root 35236 Feb 8 02:04 install.log

-rw-r--r-- 1 root root 3995 Feb 8 02:02 install.log.syslog

-rw-r--r-- 1 root root 3644570 Feb 8 02:37 postfix-2.8.2.tar.gz

-rw-r--r-- 1 root root 13738 Feb 8 02:37 Unix-Syslog-1.1.tar.gz

[root@mail ~]# tar -zxvf postfix-2.8.2.tar.gz -C /usr/src

3.配置

[root@mail ~]# cd /usr/src/postfix-2.8.2/

[root@mail postfix-2.8.2]# make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS ' 'AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/lib/sasl2 -lsasl2 -lssl -lcrypto'

4.编译安装

[root@mail postfix-2.8.2]# make

[root@mail postfix-2.8.2]# make install

clip_image016

5.查看支持的模块

[root@mail postfix-2.8.2]# postconf -m

btree

cidr

environ

hash

internal

mysql

nis

proxy

regexp

static

tcp

texthash

unix

[root@mail postfix-2.8.2]#

6.修改相关配置文件

[root@mail postfix-2.8.2]# cd /etc/postfix/

[root@mail postfix]# cp -p main.cf main.cf.bak //可以进行备份,防止将文件修改错误后无法进行恢复

[root@mail postfix]# vim main.cf

clip_image018

相关参数说明:

myorigin参数用来指明发件人所在的域名;

mydestination参数指定postfix接收邮件时收件人的域名,即您的postfix系统要接收到哪个域名的邮件;

myhostname 参数指定运行postfix邮件系统的主机的主机名,默认情况下,其值被设定为本地机器名;

mydomain参数指定您的域名,默认情况下,postfix将myhostname的第一部分删除而作为mydomain的值;

mynetworks 参数指定你所在的网络的网络地址,postfix系统根据其值来区别用户是远程的还是本地的,如果是本地网络用户则允许其访问;

inet_interfaces 参数指定postfix系统监听的网络接口;

注意:

1、在postfix的配置文件中,参数行和注释行是不能处在同一行中的;

2任何一个参数的值都不需要加引号,否则,引号将会被当作参数值的一部分来使用;

3每修改参数及其值后执行 postfix reload 即可令其生效;但若修改了inet_interfaces,则需重新启动postfix;

4如果一个参数的值有多个,可以将它们放在不同的行中,只需要在其后的每个行前多置一个空格即可;postfix会把第一个字符为空格或tab的文本行视为上一行的延续;

7.为了使用方便使用脚本

[root@mail postfix]# mkdir ~/abc

[root@mail postfix]# cd ~/abc

[root@mail abc]# cp /mnt/cdrom/Server/postfix-2.3.3-2.1.el5_2.i386.rpm ./ //从光盘复制到本地

[root@mail abc]# rpm2cpio postfix-2.3.3-2.1.el5_2.i386.rpm |cpio –id //拆解文件

[root@mail abc]# cd etc/rc.d/init.d/

[root@mail init.d]# ll

total 4

-rwxr-xr-x 1 root root 2404 Feb 8 04:24 postfix

[root@mail init.d]# cp postfix /etc/init.d

[root@mail init.d]# ll /etc/init.d/postfix

-rwxr-xr-x 1 root root 2404 Feb 8 04:26 /etc/init.d/postfix

[root@mail init.d]# vim /etc/init.d/postfix //如果您需要修改本配置脚本,可以进行修改,但是建议保持为默认

clip_image020

重启服务

[root@mail init.d]# service postfix start

Starting postfix: [ OK ]

[root@mail init.d]# chkconfig --add postfix

[root@mail init.d]# chkconfig postfix on

[root@mail init.d]# chkconfig --list |grep postfix

postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off

[root@mail init.d]#

8.小问题

[root@mail ~]# ll /etc/aliases*

-rw-r--r-- 1 root root 1512 Apr 26 2005 /etc/aliases

-rw-r--r-- 1 root root 12288 Feb 8 04:27 /etc/aliases.db //如果您发现并没有此文件,那么您应该执行 newaliases ,手工进行创建该文件

9.测试

clip_image022

clip_image024

三、为postfix开启基于cyrus-sasl的认证功能

1.查看

[root@mail ~]# postconf -a

cyrus

dovecot

[root@mail ~]#

2.修改相关文件

root@mail ~]# vim /etc/postfix/main.cf

clip_image026

[root@mail ~]# cd /usr/lib/sasl2/

[root@mail sasl2]# vim smtpd.conf

clip_image028

3.重启服务

[root@mail ~]# service saslauthd start

Starting saslauthd: [ OK ]

[root@mail ~]# chkconfig saslauthd on

[root@mail ~]# chkconfig --list |grep saslauthd

saslauthd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

[root@mail ~]# service postfix restart

Shutting down postfix: [ OK ]

Starting postfix: [ OK ]

[root@mail ~]#

4.再次查看

[root@mail ~]# postfix reload //让postfix重新加载配置文件

查看

clip_image030

四、安装Courier authentication library

1.拆包

[root@mail ~]# ll

total 6980

drwxr-xr-x 5 root root 4096 Feb 8 04:24 abc

-rw------- 1 root root 1291 Feb 8 02:05 anaconda-ks.cfg

-rw-r--r-- 1 root root 2268626 Feb 8 02:37 courier-authlib-0.63.1.20111230.tar.bz2

-rw-r--r-- 1 root root 541279 Feb 8 02:37 extmail-1.2.tar.gz

-rw-r--r-- 1 root root 586234 Feb 8 02:37 extman-1.1.tar.gz

-rw-r--r-- 1 root root 35236 Feb 8 02:04 install.log

-rw-r--r-- 1 root root 3995 Feb 8 02:02 install.log.syslog

-rw------- 1 root root 488 Feb 8 04:31 mbox

-rw-r--r-- 1 root root 3644570 Feb 8 02:37 postfix-2.8.2.tar.gz

-rw-r--r-- 1 root root 13738 Feb 8 02:37 Unix-Syslog-1.1.tar.gz

[root@mail ~]# tar -jxvf courier-authlib-0.63.1.20111230.tar.bz2 -C /usr/src

2.配置

[root@mail ~]# cd /usr/src/courier-authlib-0.63.1.20111230/

[root@mail courier-authlib-0.63.1.20111230]# ./configure --prefix=/usr/local/courier-authlib --sysconfdir=/etc --with-authmysql --with-mysql-libs=/usr/lib/mysql --with-mysql-includes=/usr/include/mysql --with-redhat --with-authmysqlrc=/etc/authmysqlrc --with-authdaemonrc=/etc/authdaemonrc --with-ltdl-lib=/usr/lib --with-ltdl-include=/usr/include

3.编译安装

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

[root@mail courier-authlib-0.63.1.20111230]# make install

4.修改有关文件

[root@mail courier-authlib-0.63.1.20111230]# cd ~

[root@mail ~]#

[root@mail ~]# chmod 755 /usr/local/courier-authlib/var/spool/authdaemon

[root@mail ~]# cp /etc/authdaemonrc.dist /etc/authdaemonrc

[root@mail ~]# cp /etc/authmysqlrc.dist /etc/authmysqlrc

[root@mail ~]#

[root@mail ~]# vim /etc/authdaemonrc

clip_image032

[root@mail ~]# vim /etc/authmysqlrc

clip_image034

[root@mail ~]# cp /usr/src/courier-authlib-0.63.1.20111230/courier-authlib.sysvinit /etc/init.d/courier-authlib

[root@mail ~]# chmod 755 /etc/init.d/courier-authlib

重启服务

[root@mail ~]# chkconfig --add courier-authlib

[root@mail ~]# chkconfig --level 2345 courier-authlib on

[root@mail ~]# cd /usr/local/courier-authlib/lib

[root@mail lib]# ldconfig -v |grep courier

[root@mail lib]# echo "/usr/local/courier-authlib/lib/courier-authlib" >> /etc/ld.so.conf.d/courier-authlib.conf

[root@mail lib]#

[root@mail lib]# service courier-authlib start

Starting Courier authentication services: authdaemond

[root@mail lib]#

[root@mail lib]# ldconfig -v |grep courier

/usr/local/courier-authlib/lib/courier-authlib:

libcourierauth.so -> libcourierauth.so.0

libcourierauthcommon.so -> libcourierauthcommon.so.0

libcourierauthsasl.so -> libcourierauthsasl.so.0

libcourierauthsaslclient.so -> libcourierauthsaslclient.so.0

[root@mail lib]#

新建虚拟用户邮箱所在的目录,并将其权限赋予postfix用户:

[root@mail ~]# mkdir -pv /var/mailbox

mkdir: created directory `/var/mailbox'

[root@mail ~]# chown -R postfix /var/mailbox/

接下来重新配置SMTP 认证,编辑 /usr/local/lib/sasl2/smtpd.conf ,确保其为以下内容:

[root@mail ~]# vim /usr/lib/sasl2/smtpd.conf

clip_image036

五、让postfix支持虚拟域和虚拟用户

1.编辑文件

[root@mail ~]# vim /etc/postfix/main.cf

clip_image038

clip_image040

2.拆包

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

[root@mail ~]# ll

total 6980

drwxr-xr-x 5 root root 4096 Feb 8 04:24 abc

-rw------- 1 root root 1291 Feb 8 02:05 anaconda-ks.cfg

-rw-r--r-- 1 root root 2268626 Feb 8 02:37 courier-authlib-0.63.1.20111230.tar.bz2

-rw-r--r-- 1 root root 541279 Feb 8 02:37 extmail-1.2.tar.gz

-rw-r--r-- 1 root root 586234 Feb 8 02:37 extman-1.1.tar.gz

-rw-r--r-- 1 root root 35236 Feb 8 02:04 install.log

-rw-r--r-- 1 root root 3995 Feb 8 02:02 install.log.syslog

-rw------- 1 root root 488 Feb 8 04:31 mbox

-rw-r--r-- 1 root root 3644570 Feb 8 02:37 postfix-2.8.2.tar.gz

-rw-r--r-- 1 root root 13738 Feb 8 02:37 Unix-Syslog-1.1.tar.gz

[root@mail ~]# tar -zxvf extman-1.1.tar.gz

[root@mail ~]# cd extman-1.1

[root@mail extman-1.1]# cd docs/

[root@mail docs]# mysql -u root -p <extmail.sql

Enter password:

[root@mail docs]# mysql -u root -p &lt;init.sql

Enter password:

[root@mail docs]#

[root@mail docs]# mysql -u root -p

Enter password:

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

Your MySQL connection id is 19

Server version: 5.0.77 Source distribution

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

mysql> show databases;

+--------------------+

| Database |

+--------------------+

| information_schema |

| extmail |

| mysql |

| test |

+--------------------+

4 rows in set (0.00 sec)

mysql&gt; \q

Bye

[root@mail docs]#

[root@mail docs]# cp mysql* /etc/postfix/

[root@mail docs]# service postfix restart

Shutting down postfix: [ OK ]

Starting postfix: [ OK ]

3.授权

clip_image042

声明:未完,由于文章格式的问题,本篇被迫分为上、下两篇,如果您对本文章感兴趣,您可以继续浏览本篇文章下篇,给您造成的不便,笔者表示抱歉!

接上,由于文章格式的问题,本篇被迫分为上、下两篇,给您造成的不便,笔者表示抱歉!

六、配置dovecot

1.修改dovecot文件

[root@mail ~]# vim /etc/dovecot.conf //把userdb的其他相关禁用

clip_image044

[root@mail etc]# vim /etc/postfix/main.cf

clip_image046

[root@mail etc]# vim /etc/dovecot-mysql.conf

clip_image048

2.重启服务

[root@mail etc]# service dovecot start

Starting Dovecot Imap: [ OK ]

[root@mail etc]# chkconfig dovecot on

[root@mail etc]# chkconfig --list |grep dovecot

dovecot 0:off 1:off 2:on 3:on 4:on 5:on 6:off

[root@mail etc]#

七、安装Extmail-1.2

1.创建文件夹

[root@mail ~]# mkdir -pv /var/www/extsuite

mkdir: created directory `/var/www/extsuite'

[root@mail ~]#

2.拆包

[root@mail ~]# ll

total 6984

drwxr-xr-x 5 root root 4096 Feb 8 04:24 abc

-rw------- 1 root root 1291 Feb 8 02:05 anaconda-ks.cfg

-rw-r--r-- 1 root root 2268626 Feb 8 02:37 courier-authlib-0.63.1.20111230.tar.bz2

-rw-r--r-- 1 root root 541279 Feb 8 02:37 extmail-1.2.tar.gz

drwxr-xr-x 11 bluefalcon bluefalcon 4096 Dec 24 2009 extman-1.1

-rw-r--r-- 1 root root 586234 Feb 8 02:37 extman-1.1.tar.gz

-rw-r--r-- 1 root root 35236 Feb 8 02:04 install.log

-rw-r--r-- 1 root root 3995 Feb 8 02:02 install.log.syslog

-rw------- 1 root root 488 Feb 8 04:31 mbox

-rw-r--r-- 1 root root 3644570 Feb 8 02:37 postfix-2.8.2.tar.gz

-rw-r--r-- 1 root root 13738 Feb 8 02:37 Unix-Syslog-1.1.tar.gz

[root@mail ~]# tar -zxvf extmail-1.2.tar.gz -C /var/www/extsuite/

[root@mail ~]# tar -zxvf extman-1.1.tar.gz -C /var/www/extsuite/

3.移动有关目录

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

[root@mail extsuite]#

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

[root@mail extsuite]# ll

total 8

drwxr-xr-x 7 bluefalcon bluefalcon 4096 Dec 25 2009 extmail-1.2

drwxr-xr-x 11 bluefalcon bluefalcon 4096 Dec 24 2009 extman-1.1

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

[root@mail extsuite]# mv extman-1.1 extman

[root@mail extsuite]# ll

total 8

drwxr-xr-x 7 bluefalcon bluefalcon 4096 Dec 25 2009 extmail

drwxr-xr-x 11 bluefalcon bluefalcon 4096 Dec 24 2009 extman

[root@mail extsuite]#

4.修改有关文件

[root@mail extsuite]# cd extmail/

[root@mail extmail]# cp webmail.cf.default webmail.cf

[root@mail extmail]# vim webmail.cf

clip_image050

修改 cgi执行文件属主为apache运行身份用户:

[root@mail ~]# chown -R postfix.postfix /var/www/extsuite/extmail/cgi/

[root@mail ~]# vim /etc/httpd/conf/httpd.conf

clip_image052

5.重启服务

[root@mail ~]# service httpd start

Starting httpd: [ OK ]

[root@mail ~]# chkconfig httpd on

[root@mail ~]# chkconfig --list |grep httpd

httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

[root@mail ~]#

6.依赖问题解决

extmail将会用到perl的Unix::syslogd功能,您可以去http://search.cpan.org搜索下载原码包进行安装。

[root@mail ~]# ll

total 6984

drwxr-xr-x 5 root root 4096 Feb 8 04:24 abc

-rw------- 1 root root 1291 Feb 8 02:05 anaconda-ks.cfg

-rw-r--r-- 1 root root 2268626 Feb 8 02:37 courier-authlib-0.63.1.20111230.tar.bz2

-rw-r--r-- 1 root root 541279 Feb 8 02:37 extmail-1.2.tar.gz

drwxr-xr-x 11 bluefalcon bluefalcon 4096 Dec 24 2009 extman-1.1

-rw-r--r-- 1 root root 586234 Feb 8 02:37 extman-1.1.tar.gz

-rw-r--r-- 1 root root 35236 Feb 8 02:04 install.log

-rw-r--r-- 1 root root 3995 Feb 8 02:02 install.log.syslog

-rw------- 1 root root 488 Feb 8 04:31 mbox

-rw-r--r-- 1 root root 3644570 Feb 8 02:37 postfix-2.8.2.tar.gz

-rw-r--r-- 1 root root 13738 Feb 8 02:37 Unix-Syslog-1.1.tar.gz

[root@mail ~]# tar -zxvf Unix-Syslog-1.1.tar.gz

[root@mail ~]# cd Unix-Syslog-1.1

[root@mail Unix-Syslog-1.1]# perl Makefile.PL

Checking if your kit is complete...

Looks good

Writing Makefile for Unix::Syslog

[root@mail Unix-Syslog-1.1]# make

[root@mail Unix-Syslog-1.1]# make install

八、安装Extman-1.1

1.修改相关文件

[root@mail ~]# cd /var/www/extsuite/extman/

[root@mail extman]# cp webman.cf.default webman.cf

[root@mail extman]# vim webman.cf

clip_image054

[root@mail extman]# chown -R postfix.postfix /var/www/extsuite/extman/cgi/

[root@mail extman]# vim /etc/httpd/conf/httpd.conf

clip_image056

[root@mail extman]# cd ~

[root@mail ~]# mkdir -pv /tmp/extman

mkdir: created directory `/tmp/extman'

[root@mail ~]# chown postfix.postfix /tmp/extman

[root@mail ~]#

2.重启服务

[root@mail ~]# service httpd restart

Stopping httpd: [ OK ]

Starting httpd: [ OK ]

[root@mail ~]# service postfix restart

Shutting down postfix: [ OK ]

Starting postfix: [ OK ]

[root@mail ~]# service dovecot restart

Stopping Dovecot Imap: [ OK ]

Starting Dovecot Imap: [ OK ]

[root@mail ~]#

3.解决小问题

到此,基本上可以实现了邮件的web登录。

但是启用虚拟域以后,需要取消中心域,即注释掉myhostname, mydestination, mydomain, myorigin几个指令;当然,你也可以把mydestionation的值改为你自己需要的。

如果您不注释掉mydestination,将会出现无法接收邮件的问题。

[root@mail ~]# vim /etc/postfix/main.cf

clip_image058

4.测试

好了,到此为止,重新启动apache服务器后,您的Webmail和Extman已经可以使用了,可以在浏览器中输入指定的虚拟主机的名称进行访问,如下:

http://mail.phoenix.com

选择管理即可登入extman进行后台管理了。默认管理帐号为:[email protected] 密码为:extmail*123*

clip_image060

clip_image062

clip_image064

创建域

clip_image066

clip_image068

clip_image070

创建用户

clip_image072

clip_image074

给用户自己发送信件

clip_image076

clip_image078

clip_image080

clip_image082

创建一个新用户(略),使用user1给新用户发信

clip_image084

clip_image086

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章