Centos7搭建邮件服务器-Postfix+Cyrus-sasl+Courier-authlib+Dovecot+ExtMail+Centos7
1.环境介绍
MTA: Postfix 3.1.4
SASL: Cyrus-sasl 2.1.26 ; Courier-authlib 0.66.1(Cyrus-sasl使用Courier-authlib与MySQL建立关联)
MDA: Dovecot 2.2.10
DataBase: 5.5.52-MariaDB MariaDB Server
WebMail: ExtMail 1.2(普通用户界面); ExtMan 1.1(管理员界面)
Web服务器(用于发布WebMail程序): Apache 2.4.6
服务器操作系统版本:Centos7
2.安装前的一些准备工作
Courier-authlib : http://www.courier-mta.org/download.html , 我这里下载的是最新的 courier-0.76.4.tar.bz2 。
postfix : ftp://ftp.cuhk.edu.hk/pub/packages/mail-server/postfix/index.html , 我这里下载的是最新版本的
2.1 安装开发环境
yum groups install "Compatibility Libraries" "Development Tools" "Development and Creative Workstation" -y # 安装必要的开发环境
2.2 安装安装所需的rpm包
yum install httpd, mariadb-server,mariadb, mariadb-devel, openssl-devel, dovecot, perl-DBD-MySQL, tcl, tcl-devel, libart_lgpl, libart_lgpl-devel, libtool-ltdl, libtool-ltdl-devel, expect -y
2.3卸载系统默认的postfix
yum remove postfix #卸载postfix
3配置dns服务器
3.1 安装bind
yum install bind bind-libs bind-devel -y
3.2 编辑/etc/named.conf
注释一下几行
// listen-on port 53 { 127.0.0.1; };
// listen-on-v6 port 53 { ::1; };
// allow-query { localhost; };
3.3 编辑 /etc/named.rfc1912.zones
最后添加如下几行
zone "linuxpanda.com" IN {
type master;
file "linuxpanda.com.zone";
};
zone "137.168.192.in-addr.arpa" IN {
type master;
file "192.168.137.zone";
};
3.4 新增区域文件
vim /var/named/192.168.137.zone
内容为
$TTL 1D
@ IN SOA ns.linuxpanda.com. admin.linuxpanda.com. (
20170201 ; serial
2H ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS ns.linuxpanda.com.
200 IN PTR ns.linuxpanda.com.
200 IN PTR mail.linuxpanda.com.
200 IN PTR www.linuxpanda.com.
200 IN PTR win.linuxpanda.com.
vim /var/named/linuxpanda.com.zone
内容为
$TTL 1D
@ IN SOA ns.linuxpanda.com. admin.linuxpanda.com. (
20170201 ; serial
2H ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS ns
IN MX 10 mail ns IN A 192.168.137.101
mail IN A 192.168.137.101
www IN A 192.168.137.101
3.5 修改文件权限
#chown root.named 192.196.137.zone #修改文件属主和属组
#chown root.named linuxpanda.com.zone #修改文件属主和属组
#chmod 640 192.196.137.zone #修改文件权限
#chmod 640 linuxpanda.com.zone #修改文件权限
3.6启动named服务并测试
# netstat -tunlp #查看端口信息
# systemctl restart named #重新启动named服务
# systemctl enable named #加入chkconfg中去
[root@mail named]# dig -t A mail.linuxpanda.com @192.168.137.101 #测试正向 ; <<>> DiG 9.9.4-RedHat-9.9.4-37.el7 <<>> -t A mail.linuxpanda.com @192.168.137.101
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65454
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2 ;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;mail.linuxpanda.com. IN A ;; ANSWER SECTION:
mail.linuxpanda.com. 86400 IN A 192.168.137.101 ;; AUTHORITY SECTION:
linuxpanda.com. 86400 IN NS ns.linuxpanda.com. ;; ADDITIONAL SECTION:
ns.linuxpanda.com. 86400 IN A 192.168.137.101 ;; Query time: 1 msec
;; SERVER: 192.168.137.101#53(192.168.137.101)
;; WHEN: Fri Feb 10 07:50:27 CST 2017
;; MSG SIZE rcvd: 97
[root@mail named]# dig -t A mail.linuxpanda.com #测试反向 ; <<>> DiG 9.9.4-RedHat-9.9.4-37.el7 <<>> -t A mail.linuxpanda.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40123
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2 ;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;mail.linuxpanda.com. IN A ;; ANSWER SECTION:
mail.linuxpanda.com. 86400 IN A 192.168.137.101 ;; AUTHORITY SECTION:
linuxpanda.com. 86400 IN NS ns.linuxpanda.com. ;; ADDITIONAL SECTION:
ns.linuxpanda.com. 86400 IN A 192.168.137.101 ;; Query time: 0 msec
;; SERVER: 192.168.137.101#53(192.168.137.101)
;; WHEN: Fri Feb 10 07:50:58 CST 2017
;; MSG SIZE rcvd: 97
4.编译安装postfix
4.1 删除postfix的文件和用户
# find / -user postfix #找到的文件都删除了
# userdel postfix
4.2创建postfix、postdrop用户组和用户
# groupadd -g 2525 postfix
# useradd -g postfix -u 2525 -s /sbin/nologin -M postfix
# groupadd -g 2526 postdrop
# useradd -g postdrop -u 2526 -s /sbin/nologin -M postdrop
4.2开始编译安装
# tar zxvf postfix-3.1..tar.gz
# cd postfix-3.1.
# make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS ' 'AUXLIBS=-L/usr/lib64/mysql -lmysqlclient -lz -lm -L/usr/lib64/sasl2 -lsasl2 -lssl -lcrypto'
# make
# make install
4.3 postfix的一些基础配置设置。一路回车就可以了。
install_root: [/]
tempdir: [/root/Downloads/postfix-3.1.4]
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]
shlib_directory: [no]
meta_directory: [/etc/postfix]
注意: 这些路径都是要确认本地存在的。可以使用rpm -ql 命令获取rpm包的信息。
4.4 生成别名二进制文件
# newalias
4.5 修改post主配置文件
# vim /etc/postfix/main.cf
修改以下几项为您需要的配置
myhostname = mail.linuxpanda.com
myorigin = linuxpanda.com
mydomain = linuxpanda.com
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 192.168.137.0/24, 127.0.0.0/8
4.6 为postfix提供sysv服务脚本/etc/rc.d/init.d/postfix
# vim /etc/rc.d/init.d/postfix
#!/bin/bash
#
# postfix Postfix Mail Transfer Agent
#
# chkconfig: 2345 80 30
# description: Postfix is a Mail Transport Agent, which is the program \
# that moves mail from one machine to another.
# processname: master
# pidfile: /var/spool/postfix/pid/master.pid
# config: /etc/postfix/main.cf
# config: /etc/postfix/master.cf # Source function library.
. /etc/rc.d/init.d/functions # Source networking configuration.
. /etc/sysconfig/network # Check that networking is up.
[ $NETWORKING = "no" ] && exit 3 [ -x /usr/sbin/postfix ] || exit 4
[ -d /etc/postfix ] || exit 5
[ -d /var/spool/postfix ] || exit 6 RETVAL=0
prog="postfix" start() {
# Start daemons.
echo -n $"Starting postfix: "
/usr/bin/newaliases >/dev/null 2>&1
/usr/sbin/postfix start 2>/dev/null 1>&2 && success || failure $"$prog start"
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/postfix
echo
return $RETVAL
} stop() {
# Stop daemons.
echo -n $"Shutting down postfix: "
/usr/sbin/postfix stop 2>/dev/null 1>&2 && success || failure $"$prog stop"
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/postfix
echo
return $RETVAL
} reload() {
echo -n $"Reloading postfix: "
/usr/sbin/postfix reload 2>/dev/null 1>&2 && success || failure $"$prog reload"
RETVAL=$?
echo
return $RETVAL
} abort() {
/usr/sbin/postfix abort 2>/dev/null 1>&2 && success || failure $"$prog abort"
return $?
} flush() {
/usr/sbin/postfix flush 2>/dev/null 1>&2 && success || failure $"$prog flush"
return $?
} check() {
/usr/sbin/postfix check 2>/dev/null 1>&2 && success || failure $"$prog check"
return $?
} restart() {
stop
start
} # See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
reload)
reload
;;
abort)
abort
;;
flush)
flush
;;
check)
check
;;
status)
status master
;;
condrestart)
[ -f /var/lock/subsys/postfix ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|abort|flush|check|status|condrestart}"
exit 1
esac exit $? # END
4.7 给脚本授权并加入到服务列表中去
# chmod +x /etc/rc.d/init.d/postfix
# chkconfig --add postfix
# chkconfig postfix on
# service postfix restart
注意: 如果服务无法启动,请使用postconf检查postfix的配置错误信息。
5.测试postfix
5.1 使用telnet 命令发邮件
[root@mail Downloads]# telnet mail.linuxpanda.com 25
Trying 192.168.137.101...
Connected to mail.linuxpanda.com.
Escape character is '^]'.
220 mail.linuxpanda.com ESMTP Postfix
HELO mail.linuxpanda.com
250 mail.linuxpanda.com
mail from:root
250 2.1.0 Ok
rcpt to:oracle
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
hello oracle ,i'm root .
.
250 2.0.0 Ok: queued as 1C5D3399AAF
quit
221 2.0.0 Bye
Connection closed by foreign host.
5.2查看日志
# tail /var/log/maillog
Feb 10 21:57:31 mail postfix/trivial-rewrite[35445]: warning: smtputf8_enable is true, but EAI support is not compiled in
Feb 10 21:59:08 mail postfix/cleanup[35574]: warning: smtputf8_enable is true, but EAI support is not compiled in
Feb 10 21:59:08 mail postfix/smtpd[35443]: 1C5D3399AAF: client=mail.linuxpanda.com[192.168.137.101]
Feb 10 21:59:40 mail postfix/cleanup[35574]: 1C5D3399AAF: message-id=<20170210135908.1C5D3399AAF@mail.linuxpanda.com>
Feb 10 21:59:40 mail postfix/qmgr[34499]: 1C5D3399AAF: from=<root@linuxpanda.com>, size=352, nrcpt=1 (queue active)
Feb 10 21:59:40 mail postfix/local[35583]: warning: smtputf8_enable is true, but EAI support is not compiled in
Feb 10 21:59:40 mail postfix/local[35583]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Feb 10 21:59:40 mail postfix/local[35583]: 1C5D3399AAF: to=<oracle@linuxpanda.com>, orig_to=<oracle>, relay=local, delay=129, delays=129/0.05/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Feb 10 21:59:40 mail postfix/qmgr[34499]: 1C5D3399AAF: removed
Feb 10 21:59:43 mail postfix/smtpd[35443]: disconnect from mail.linuxpanda.com[192.168.137.101] helo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
5.3登录到oracle用户可以查收邮件的。
su - oracle
[oracle@mail ~]$ mail
Heirloom Mail version 12.5 7/5/10. Type ? for help.
"/var/spool/mail/oracle": 1 message 1 new
>N 1 root@linuxpanda.com Fri Feb 10 21:59 13/489
& 1
Message 1:
From root@linuxpanda.com Fri Feb 10 21:59:40 2017
Return-Path: <root@linuxpanda.com>
X-Original-To: oracle
Delivered-To: oracle@linuxpanda.com
Date: Fri, 10 Feb 2017 21:57:31 +0800 (CST)
From: root@linuxpanda.com
Status: R hello oracle ,i'm root .
6.为postfix服务开启用户别名支持
6.1在配置文件开启基于hash的别名文件支持
在main.cf中,找到如下指令,而后启用它(即移除前面的#号):
#alias_maps = hash:/etc/aliases
6.2 添加别名
编辑/etc/alias添加zhaojiedi: zhaojiedi1992行。格式说明,前一个字段为初始目标邮件地址,后一个字段为实际发往的地址。
6.3、将/etc/aliases转换为hash格式:
# postalias /etc/aliases
6.4 重新启动postfix
# service postfix restart
6.5 测试发送给zhaojiedi 是否转发到zhaojiedi1992邮箱中去。(这里测试跳过)。
7.为postfix开启基于cyrus-sasl的认证功能
7.1检查postfix是否支持了sasl功能
#postconf -a
cyrus
dovecot
7.2 编辑 /etc/postfix/main.cf 加入smtp认证设置信息
#vim /etc/postfix/main.cf
添加以下内容:
############################CYRUS-SASL############################
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_path = smtpd
smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!
7.3 编辑 /usr/lib/sasl2/smtpd.conf
vim /usr/lib64/sasl2/smtpd.conf
添加如下内容:
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
7.4 重新加载postfix
#/usr/sbin/postfix reload
7.5 测试sasl配置正确性
!tel
telnet mail.linuxpanda.com 25
Trying 192.168.137.101...
Connected to mail.linuxpanda.com.
Escape character is '^]'.
220 Welcome to our mail.linuxpanda.com ESMTP,Warning: Version not Available!
helo mail.linuxpanda.com
250 mail.linuxpanda.com
ehlo mail.linuxpanda.com
250-mail.linuxpanda.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
注意: 确保你的信息有250-AUTH=PLAIN LOGIN和250-ENHANCEDSTATUSCODES 这两行
8 安装Courier authentication library
8.1 安装libtool
# wget http://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz
# tar zxvf libtool-2.4.6.tar.gz
# ./configure --prefix=/usr/local/libtool --enable-ltdl-install
# make
# make install
8.2 安装courier-unicode
下载 courier-unicode
#wget https://sourceforge.net/projects/courier/files/latest/download?source=files
# tar zxvf libtool-2.4.6.tar.gz
# ./configure
# make
# make install
8.3开始安装courier-authlib
# tar jxvf ourier-authlib-0.67.0.tar.bz2
# cd courier-authlib-0.64.0
#./configure \
--prefix=/usr/local/courier-authlib \
--sysconfdir=/etc \
--without-authpam \
--without-authshadow \
--without-authvchkpw \
--without-authpgsql \
--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-mailuser=postfix \
--with-mailgroup=postfix \
--with-ltdl-lib=/usr/local/libtool/lib \
--with-ltdl-include=/usr/local/libtool/include \
--with-authdaemonvar=/var/spool/authdaemon
# make
# make install
8.4 创建和复制和修改文件
# chmod 755 /usr/local/courier-authlib/var/spool/authdaemon
# cp /etc/authdaemonrc.dist /etc/authdaemonrc
# cp /etc/authmysqlrc.dist /etc/authmysqlrc 修改/etc/authdaemonrc 文件
authmodulelist="authmysql"
authmodulelistorig="authmysql"
daemons=12
8.5 配置其通过mysql进行邮件帐号认证
vim /etc/authmysqlrc 为以下内容,其中2525,2525 为postfix 用户的UID和GID。
MYSQL_SERVER localhost
MYSQL_PORT 3306 (指定你的mysql监听的端口,这里使用默认的3306)
MYSQL_USERNAME extmail (这时为后文要用的数据库的所有者的用户名)
MYSQL_PASSWORD extmail (密码)
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_DATABASE extmail
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password
MYSQL_UID_FIELD '2525'
MYSQL_GID_FIELD '2525'
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD concat('/var/mailbox/',homedir)
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD concat('/var/mailbox/',maildir)
8.6提供SysV服务脚本
# cp courier-authlib.sysvinit /etc/rc.d/init.d/courier-authlib
# chmod 755 /etc/init.d/courier-authlib
# chkconfig --add courier-authlib
# chkconfig --level 2345 courier-authlib on
# service courier-authlib start #启动服务
8.7创建/var/mailbox目录
#mkdir –pv /var/mailbox
#chown –R postfix /var/mailbox
8.8编辑 /usr/lib/sasl2/smtpd.conf
内容有如下几项
pwcheck_method: authdaemond
log_level: 3
mech_list:PLAIN LOGIN
authdaemond_path:/var/spool/authdaemon/socket
9 让postfix支持虚拟域和虚拟用户
9.1编辑/etc/postfix/main.cf
添加如下内容
########################Virtual Mailbox Settings########################
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:2525
virtual_gid_maps = static:2525
virtual_transport = virtual
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1
注意,启用了虚拟域,需要将需要取消中心域,即注释掉myhostname, mydestination, mydomain, myorigin几行。
9.2使用extman源码目录下docs目录中的extmail.sql和init.sql建立数据库:
# tar zxvf extman-1.1.tar.gz
# cd extman-1.1/docs
# sed -i 's@TYPE=MyISAM@ENGINE=InnoDB@g' extmail.sql
# mysql -u root -p < extmail.sql
# mysql -u root -p <init.sql
# cp mysql* /etc/postfix/
9.3授予用户extmail访问extmail数据库的权限
mysql> GRANT all privileges on extmail.* TO extmail@localhost IDENTIFIED BY 'extmail';
mysql> GRANT all privileges on extmail.* TO extmail@127.0.0.1 IDENTIFIED BY 'extmail';
10.配置dovecot
10.1编辑配置文件
# vi /etc/dovecot/conf.d/10-mail.conf #设置email位置
mail_location = maildir:/var/mailbox/%d/%n/Maildir
# vim /etc/dovecot/conf.d/10-auth.conf #选择认证方式(mysql认证)
注释掉#!include auth-system.conf.ext行,去掉#!include auth-sql.conf.ext行的注释
#vim /etc/dovecot/dovecot-sql.conf.ext #配置认证sql语句
driver = mysql
connect = host=localhost dbname=extmail user=extmail password=extmail
default_pass_scheme = CRYPT
password_query = SELECT username AS user,password AS password FROM mailbox WHERE username = '%u'
user_query = SELECT maildir, uidnumber AS uid, gidnumber AS gid FROM mailbox WHERE username = '%u'
10.2 重启dovecot
# service dovecot start
# chkconfig dovecot on
11.安装配置extmail
11.1安装
# tar zxvf extmail-1.1.1.tar.gz
# mkdir -pv /var/www/extsuite
# mv extmail-1.1.1 /var/www/extsuite/extmail
# cp /var/www/extsuite/extmail/webmail.cf.default /var/www/extsuite/extmail/webmail.cf
11.2配置extmail
#vi /var/www/extsuite/extmail/webmail.cf
SYS_MESSAGE_SIZE_LIMIT = 5242880
SYS_MAILDIR_BASE = /var/mailbox
SYS_MYSQL_USER = extmail
SYS_MYSQL_PASS = extmail
SYS_MYSQL_TABLE = mailbox
SYS_MYSQL_ATTR_USERNAME = username
SYS_MYSQL_ATTR_DOMAIN = domain
SYS_MYSQL_ATTR_PASSWD = password
SYS_AUTHLIB_SOCKET = /var/spool/authdaemon/socket
SYS_AUTHLIB_SOCKET =/var/spool/authdaemon/socket
12.apach 配置
12.1编辑/etc/httpd/config/httpd.conf文件
添加如下内容
<VirtualHost *:80>
ServerName mail.magedu.com
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi
Alias /extmail /var/www/extsuite/extmail/html
</VirtualHost>
注释DocumentRoot 行
修改
User postfix
Group postfix
12.2依赖关系的解决
# tar zxvf Unix-Syslog-0.100.tar.gz
# cd Unix-Syslog-0.100
# perl Makefile.PL
# makelinli
# make install
12.3启动apach服务
# service httpd start
# chkconfig httpd on
13安装Extman-1.1
13.1安装及基本配置
# tar zxvf extman-1.1.tar.gz
# mv extman-1.1 /var/www/extsuite/extman
# cp /var/www/extsuite/extman/webman.cf.default /var/www/extsuite/extman/webman.cf
# vi /var/www/extsuite/extman/webman.cf
修改内容为如下
SYS_MAILDIR_BASE = /var/mailbox
SYS_DEFAULT_UID = 2525
SYS_DEFAULT_GID = 2525
SYS_MYSQL_USER = extmail
SYS_MYSQL_PASS = extmail
SYS_CAPTCHA_ON = 0
而后修改cgi目录的属主:
# chown -R postfix.postfix /var/www/extsuite/extman/cgi/
13.2在apache的主配置文件中Extmail的虚拟主机部分,添加如下两行:
ScriptAlias /extman/cgi /var/www/extsuite/extman/cgi
Alias /extman /var/www/extsuite/extman/html
修改后虚拟主机部分的内容为
<VirtualHost *:80>
ServerName mail.linuxpanda.com
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi
Alias /extmail /var/www/extsuite/extmail/html
#SuexecUserGroup postfix postfix
ScriptAlias /extman/cgi /var/www/extsuite/extman/cgi
Alias /extman /var/www/extsuite/extman/html
</VirtualHost>
13.3 创建运行目录
创建其运行时所需的临时目录,并修改其相应的权限:
#mkdir -pv /var/www/tmp/extman
#chown postfix.postfix /var/www/tmp/extman
13.4测试webmail配置如何
打开浏览器输入192.168.137.101/extman 就可以了。
extman默认管理帐号为:root@extmail.org 密码为:extmail*123*
注:如果在后台创建的用户无法调整,编辑/var/www/extsuite/extmail/libs/Ext/Logger/File.pm 注释第45行:printf $fh "$time $host extmail[$$]: $msg\n", @_;
在浏览器192.168.137.101/extmail 页面注册2个用户, 测试邮件发送。
Centos7搭建邮件服务器-Postfix+Cyrus-sasl+Courier-authlib+Dovecot+ExtMail+Centos7的更多相关文章
- 搭建邮件服务器 Postfix + Dovecot (CentOS)
最近分配到一台ECS服务器,需要搭建一台邮件服务器. 查了一波资料选择了Postfix (smtp)和 Dovecot(pop3). 推荐教程:http://www.cnblogs.com/zlbei ...
- Linux搭建邮件服务器Postfix+Dovecot+MySQL+PHP
用于搭建的服务器信息 阿里云 Centos 6.5 32位 安装过程1.安装Postfix 版本(2:2.6.6-8.el6) yum -y install postfix 安装完成还需要替换系统自带 ...
- CentOS利用postfix搭建邮件服务器
之前我用nodemailer通过163邮箱来发送邮件,不过没过几天就一直ETIMEDOUT,不知道什么原因,想着还是自己搭一个来发邮件可能靠谱点(flag?) 安装postfix CentOS 7 自 ...
- 搭建邮件服务器,使用Postfix与Dovecot收发电子邮件
小知识: 我们为什么要搭建邮件服务器呢?有时候我们处于一个局域网内,不能及时的分享各自的研究成果,迫切的需要一种能够借助于网络且建立在计算机之间的传输数据的方法.所以我们需要搭建邮件服务器,这样的话既 ...
- CentOS 使用PostFix搭建邮件服务器
搭建环境: 关于PostFix是什么以及邮件服务器接受发送邮件流程网上有很多文章,这里就不再写了,这里只记录如何搭建邮件服务器,使用PostFix接受发送邮件 CentOS6.8 32位,postfi ...
- Linux中用postfix搭建邮件服务器实战详解
Linux中用postfix搭建邮件服务器实战详解 postfix是Wietse Venema在IBM的GPL协议之下开发的MTA(邮件传输代理)软件.Postfix试图更快.更容易管理.更安全,同时 ...
- Postfix+Dovecot+MySQL搭建邮件服务器
网上有很多使用Postfix搭建邮件服务器的文章,但目前貌似没有看到较为完整的一篇.本例将尝试在Ubuntu系统中使用Postfix+Dovecot+MySQL搭建邮件服务器. 说到邮件服务器,网上有 ...
- centos7搭建svn服务器及客户端设置
centos7搭建svn服务器及客户端设置 centos7貌似预装了svn服务(有待确认),因此我们直接启动该服务即可 一.svn服务端配置(服务器IP假设为192.168.100.1) 步骤1:创建 ...
- linux邮件服务器postfix配置实例
linux邮件服务器postfix配置实例(超级详细!!!) 2013-03-13 13:30:21 标签:邮件服务器 linux 1. 系统安装:1)centos4.3 选上MAIL组件里的全部.2 ...
随机推荐
- 爬取QQ音乐(讲解爬虫思路)
一.问题描述: 本次爬取的对象是QQmusic,为自己后面做django音乐网站的开发获取一些资源. 二.问题分析: 由于QQmusic和网易音乐的方式差不多,都是讲歌曲信息放入到播放界面播放,在其他 ...
- Spring Boot不同版本整合Redis的配置
1. Spring Boot为1.4及其他低版本 1.1 POM.XML配置 <!--引入 spring-boot-starter-redis(1.4版本前)--> <depende ...
- 87、代码适配IphoneX
一.APP在iphoneX运行后不能占满,上下都有多余的边 解决方法:把旧的image.xcassets中的LaunchImage删掉,重新创建并在Images.xcassets中为iPhone X添 ...
- Mybatis in 查询
1.先创建一个传参的工具类 import java.util.HashMap; /** * * ClassName: DataMap * @Description: 封装Map, * @date 20 ...
- Python核心团队计划2020年停止支持Python2,NumPy宣布停止支持计划表
Python核心团队计划在2020年停止支持Python 2.NumPy项目自2010年以来一直支持Python 2和Python 3,并且发现支持Python 2对我们有限的资源增加了负担:因此,我 ...
- 《python语言程序设计》_第二章笔记
#2.2_编写一个简单的程序 项目1: 设计:radius=20,求面积area? 程序: radius=20 #给变量radius复制area=radius*radius*3.14159 #编写ar ...
- iOS 数据归档----温故而知新
#import "StudyViewController.h" #import "person.h" @interface StudyViewControlle ...
- JavaScript实现页面刷新滚动条位置不变(利用cookie)
实验环境:vs2015 asp.net(C#) 主要原理: 1.在页面滚动时或点击按钮时将当前滚动条位置记录到cookie[pos], 2.页面刷新或重载时查询cookie[pos]中的值是否存在,若 ...
- [转]Comparing sFlow and NetFlow in a vSwitch
As virtualization shifts the network edge from top of rack switches to software virtual switches run ...
- 谈谈一些有趣的CSS题目(十六)-- 奇妙的 background-clip: text
开本系列,谈谈一些有趣的 CSS 题目,题目类型天马行空,想到什么说什么,不仅为了拓宽一下解决问题的思路,更涉及一些容易忽视的 CSS 细节. 解题不考虑兼容性,题目天马行空,想到什么说什么,如果解题 ...