Postfix - Extmail 邮箱系统

Postfix dovecot Extmail 邮箱系统早前的内部邮箱系统重新整理下,现在Extmail官方有集成镜像的EMOS_1.6_x86_64免费版;
系统环境:
linux 6.7 x64 4G
hosts:
172.16.2.19
mail.18mail.com

一、准备  环境

简便的可以 yum 进行安装;安装 yum 源;
rpm -ivh http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
1、环境的基础依赖包:
yum install gcc gcc-c++ gdbm libtool-ltdl
yum install cyrus-sasl-md5 perl-GD perl-DBD-MySQL perl-GD perl-CPAN perl-CGI perl-CGI-Session cyrus-sasl-lib cyrus-sasl-plain cyrus-sasl cyrus-sasl-devel libtool-ltdl-devel telnet mail libicu-devel

2、lamp 环境:
yum -y install httpd mysql-server mysql mysql-devel php56w php56w-fpm php56w-mysql php56w-common php56w-gd php56w-mbstring php56w-mcrypt php56w-devel php56w-xml php56w-imap php56w-pear php56w-snmp

二、安装 postfix dovecot

yum install postfix -y

创建邮箱属于账户组:
groupadd -g 5000 18mail
useradd -g 18mail -u 5000 -s /sbin/nologin 18mail

  1、配置 postfix :
  postfix 的 需要更改的文件是 main.cf  和 master.cf  后面第六条会配置;

三、安装 dovecot

# yum install dovecot dovecot-devel dovecot-mysql pam-devel -y

四、安装 courier-authlib

  1、courier-authlib 是需要 courier-unicode 依赖

# wget https://sourceforge.net/projects/courier/files/courier-unicode/1.2/courier-unicode-1.2.tar.bz2
tar -jxvf 解压缩进行编译安装
# cd courier-unicode
# ./configure
# make && make install

  2、先编译安装 courier-authlib:

# wget https://sourceforge.net/projects/courier/files/authlib/0.66.2/courier-authlib-0.66.2.tar.bz2
# tar -jxvf courier-authlib-0.66.2.tar.bz2
解压之后缩进行编译安装 # cd courier-authlib
# ./configure --prefix=/usr/local/courier-authlib --sysconfdir=/etc --without-authpam --without-authshadow --without-authvchkpw --without-authpgsql --with-authmysql --with-mysql-libs=/usr/lib64/mysql --with-mysql-includes=/usr/include/mysql --with-redhat --with-authmysqlrc=/etc/authmysqlrc --with-authdaemonrc=/etc/authdaemonrc --with-mailuser=18mail
# make && make install

  3、配置 courier-authlib:

# chmod 755 /usr/local/courier-authlib/var/spool/authdaemon
# cd /usr/local/courier-authlib/拷贝 auth 验证文件:
# cp /etc/authdaemonrc.dist /etc/authdaemonrc
# cp /etc/authmysqlrc.dist /etc/authmysqlrc

  4、配置验证方式:这里只使用了 authmysql

# cat /etc/authdaemonrc |grep -v ^$ |grep -v ^#

authmodulelist="authmysql"
authmodulelistorig="authmysql"
daemons=5
authdaemonvar=/usr/local/courier-authlib/var/spool/authdaemon
DEBUG_LOGIN=0
DEFAULTOPTIONS=""
LOGGEROPTS=""

  5、配置验证存储信息 (邮箱的目录 数据存放库的名称 密码 以及自己的域名)

# cat /etc/authmysqlrc |grep -v ^$ |grep -v ^#

MYSQL_SERVER localhost
MYSQL_USERNAME extmail
MYSQL_PASSWORD extmail
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_PORT 3306
MYSQL_OPT 0
MYSQL_DATABASE extmail
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password
MYSQL_UID_FIELD uidnumber
MYSQL_GID_FIELD gidnumber
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD homedir
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD maildir
MYSQL_QUOTA_FIELD quota
MYSQL_SELECT_CLAUSE SELECT username,password,"",uidnumber,gidnumber, CONCAT(‘/home/18mail/‘,homedir), CONCAT(‘/home/18mail/‘,maildir), quota, name, CONCAT("disableimap=",disableimap,",disablepop3=", disablepop3,",disablewebmail=",disablewebmail, ",disablesmtpd=",disablesmtpd,",disablesmtp=", disablesmtp,",disablenetdisk=",disablenetdisk, ",netdiskquota=",netdiskquota) FROM mailbox WHERE username = ‘$(local_part)@$(domain)‘
DEFAULT_DOMAIN    18mail.com

  6、courier-authlib 配置服务启动:

# cp courier-authlib.sysvinit /etc/init.d/courier-authlib
# chmod +x /etc/init.d/courier-authlib
# chkconfig --add courier-authlib
# chkconfig courier-authlib on
# echo "/usr/local/courier-authlib/lib/courier-authlib" >> /etc/ld.so.conf.d/courier-authlib.conf
# ldconfig
# service courier-authlib start

  7、smtp以及虚拟用户相关的设置:
  手动创建 smtpd.conf

# vi /usr/lib64/sasl2/smtpd.conf

pwcheck_method: authdaemond
log_level: 3
mech_list: PLAIN LOGIN
authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socket

五、安装 extmail

# wget http://7xivyw.com1.z0.glb.clouddn.com/extmail-1.2.tar.gz
# wget http://7xivyw.com1.z0.glb.clouddn.com/extman-1.1.tar.gz

  1、创建extmail 临时文件目录与session目录;并设置邮箱账户的用户组的权限;

# mkdir -p /tmp/extmail/upload
# chown -R 18mail:18mail /tmp/extmail/

同样的为 extman创建临时目录:
# mkdir /tmp/extman
# chown -R 18mail:18mail /tmp/extman/

  2、在 http web创建extsuite 目录 ( 默认/var/www/ )

# mkdir -p /var/www/extsuite 
解压缩 extmail extman 至 /var/www/extsuite 目录
更改 extmail 和 extman 下的 cgi目录的属主属组:
# chown -R 18mail:18mail /var/www/extsuite/

  3、配置 extmail 相关配置;

# cd /var/www/extsuite/extmail
# cp -rp webmail.cf.default webmail.cf

  更改 webmail.cf 配置

# cat /var/www/extsuite/extmail/webmail.cf |grep -v ^$ |grep -v ^#

SYS_CONFIG = /var/www/extsuite/extmail/
SYS_LANGDIR = /var/www/extsuite/extmail/lang
SYS_TEMPLDIR = /var/www/extsuite/extmail/html
SYS_HTTP_CACHE = 0
SYS_SMTP_HOST = localhost
SYS_SMTP_PORT = 25
SYS_SMTP_TIMEOUT = 5
SYS_SPAM_REPORT_ON = 0
SYS_SPAM_REPORT_TYPE = dspam
SYS_SHOW_WARN = 0
SYS_IP_SECURITY_ON = 1
SYS_PERMIT_NOQUOTA = 1
SYS_SESS_DIR = /tmp/extmail
SYS_UPLOAD_TMPDIR = /tmp/extmail/upload
SYS_LOG_ON = 1
SYS_LOG_TYPE = syslog
SYS_LOG_FILE = /var/log/extmail.log
SYS_SESS_TIMEOUT = 0
SYS_SESS_COOKIE_ONLY = 1
SYS_USER_PSIZE = 10
SYS_USER_SCREEN = auto
SYS_USER_LANG = zh_CN
SYS_APP_TYPE = WebMail
SYS_USER_TEMPLATE = default
SYS_USER_CHARSET = utf-8
SYS_USER_TRYLOCAL = 1
SYS_USER_TIMEZONE = +0800
SYS_USER_CCSENT = 1
SYS_USER_SHOW_HTML = 1
SYS_USER_COMPOSE_HTML = 1
SYS_USER_CONV_LINK =1
SYS_USER_ADDR2ABOOK = 1
SYS_MESSAGE_SIZE_LIMIT = 5242880
SYS_MIN_PASS_LEN = 2
SYS_MFILTER_ON = 1
SYS_NETDISK_ON = 1
SYS_SHOW_SIGNUP = 1
SYS_DEBUG_ON = 1
SYS_AUTH_TYPE = mysql
SYS_MAILDIR_BASE = /home/18mail
SYS_AUTH_SCHEMA = virtual
SYS_CRYPT_TYPE = md5crypt
SYS_MYSQL_USER = extmail
SYS_MYSQL_PASS = extmail
SYS_MYSQL_DB = extmail
SYS_MYSQL_HOST = localhost
SYS_MYSQL_SOCKET = /var/lib/mysql/mysql.sock
SYS_MYSQL_TABLE = mailbox
SYS_MYSQL_ATTR_USERNAME = username
SYS_MYSQL_ATTR_DOMAIN = domain
SYS_MYSQL_ATTR_PASSWD = password
SYS_MYSQL_ATTR_CLEARPW = clearpwd
SYS_MYSQL_ATTR_QUOTA = quota
SYS_MYSQL_ATTR_NDQUOTA = netdiskquota
SYS_MYSQL_ATTR_HOME = homedir
SYS_MYSQL_ATTR_MAILDIR = maildir
SYS_MYSQL_ATTR_DISABLEWEBMAIL = disablewebmail
SYS_MYSQL_ATTR_DISABLENETDISK = disablenetdisk
SYS_MYSQL_ATTR_DISABLEPWDCHANGE = disablepwdchange
SYS_MYSQL_ATTR_ACTIVE = active
SYS_MYSQL_ATTR_PWD_QUESTION = question
SYS_MYSQL_ATTR_PWD_ANSWER = answer
SYS_LDAP_BASE = o=extmailAccount,dc=example.com
SYS_LDAP_RDN = cn=Manager,dc=example.com
SYS_LDAP_PASS = secret
SYS_LDAP_HOST = localhost
SYS_LDAP_ATTR_USERNAME = mail
SYS_LDAP_ATTR_DOMAIN = virtualDomain
SYS_LDAP_ATTR_PASSWD = userPassword
SYS_LDAP_ATTR_CLEARPW = clearPassword
SYS_LDAP_ATTR_QUOTA = mailQuota
SYS_LDAP_ATTR_NDQUOTA = netdiskQuota
SYS_LDAP_ATTR_HOME = homeDirectory
SYS_LDAP_ATTR_MAILDIR = mailMessageStore
SYS_LDAP_ATTR_DISABLEWEBMAIL = disablewebmail
SYS_LDAP_ATTR_DISABLENETDISK = disablenetdisk
SYS_LDAP_ATTR_DISABLEPWDCHANGE = disablePasswdChange
SYS_LDAP_ATTR_ACTIVE = active
SYS_LDAP_ATTR_PWD_QUESTION = question
SYS_LDAP_ATTR_PWD_ANSWER = answer
SYS_AUTHLIB_SOCKET = /usr/local/courier-authlib/var/spool/authdaemon/socket
SYS_G_ABOOK_TYPE = file
SYS_G_ABOOK_LDAP_HOST = localhost
SYS_G_ABOOK_LDAP_BASE = ou=AddressBook,dc=example.com
SYS_G_ABOOK_LDAP_ROOTDN = cn=Manager,dc=example.com
SYS_G_ABOOK_LDAP_ROOTPW = secret
SYS_G_ABOOK_LDAP_FILTER = objectClass=OfficePerson
SYS_G_ABOOK_FILE_PATH = /var/www/extsuite/extmail/globabook.cf
SYS_G_ABOOK_FILE_LOCK = 1
SYS_G_ABOOK_FILE_CONVERT = 0
SYS_G_ABOOK_FILE_CHARSET = utf-8

  4、配置 extman 文件

# cd /var/www/extsuite/extmail
# cp -rp webman.cf.default webman.cf

   更改 extman.cf 配置

# cat /var/www/extsuite/extman/webman.cf |grep -v ^$ |grep -v ^#

SYS_CONFIG = /var/www/extsuite/extman/
SYS_LANGDIR = /var/www/extsuite/extman/lang
SYS_TEMPLDIR = /var/www/extsuite/extman/html
SYS_MAILDIR_BASE = /home/18mail
SYS_SHOW_WARN = 0
SYS_SESS_DIR = /tmp/extman/
SYS_CAPTCHA_ON = 1
SYS_CAPTCHA_KEY = r3s9b6a7
SYS_CAPTCHA_LEN = 6
SYS_PURGE_DATA = 0
SYS_PSIZE = 20
SYS_APP_TYPE = ExtMan
SYS_TEMPLATE_NAME = default
SYS_DEFAULT_EXPIRE = 1y
SYS_GROUPMAIL_SENDER = [email protected]
SYS_DEFAULT_SERVICES = webmail,smtpd,smtp,pop3,netdisk
SYS_ISP_MODE = no
SYS_DOMAIN_HASHDIR = yes
SYS_DOMAIN_HASHDIR_DEPTH = 2x2
SYS_USER_HASHDIR = yes
SYS_USER_HASHDIR_DEPTH = 2x2

SYS_MIN_UID = 500
SYS_MIN_GID = 100
SYS_DEFAULT_UID = 1000
SYS_DEFAULT_GID = 1000
SYS_QUOTA_MULTIPLIER = 1048576
SYS_QUOTA_TYPE = courier
SYS_DEFAULT_MAXQUOTA = 500
SYS_DEFAULT_MAXALIAS = 100
SYS_DEFAULT_MAXUSERS = 100
SYS_DEFAULT_MAXNDQUOTA = 500
SYS_USER_DEFAULT_QUOTA = 5
SYS_USER_DEFAULT_NDQUOTA = 5
SYS_USER_DEFAULT_EXPIRE = 1y
SYS_BACKEND_TYPE = mysql
SYS_CRYPT_TYPE = md5crypt
SYS_MYSQL_USER = extman
SYS_MYSQL_PASS = extmail
SYS_MYSQL_DB = extmail
SYS_MYSQL_HOST = localhost
SYS_MYSQL_SOCKET = /var/lib/mysql/mysql.sock
SYS_MYSQL_TABLE = manager
SYS_MYSQL_ATTR_USERNAME = username
SYS_MYSQL_ATTR_PASSWD = password
SYS_LDAP_BASE = dc=extmail.org
SYS_LDAP_RDN = cn=Manager,dc=extmail.org
SYS_LDAP_PASS = secret
SYS_LDAP_HOST = localhost
SYS_LDAP_ATTR_USERNAME = mail
SYS_LDAP_ATTR_PASSWD = userPassword
SYS_RRD_DATADIR = /var/lib
SYS_RRD_TMPDIR = /tmp/viewlog
SYS_RRD_QUEUE_ON = yes
SYS_CMDSERVER_SOCK = /tmp/cmdserver.sock
SYS_CMDSERVER_MAXCONN = 5
SYS_CMDSERVER_PID = /var/run/cmdserver.pid
SYS_CMDSERVER_LOG = /var/log/cmdserver.log
SYS_CMDSERVER_AUTHCODE = your_auth_code_here
SYS_IGNORE_SERVER_LIST = web

  5、extmail 数据库导入;
    5.1  导入前需要更改两项配置;
    my.cnf 取消 SSL 验证 ;不然会报 ‘ssl_cipher‘ 错?

# vi /etc/my.cnf
注释这一行;待数据导入之后再取消注释;
# sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

    5.2 编辑 extmail.sql 数据库文件

    msyql 数据库不能识别 TYPE=MyISAM,需要把TYPE=MyISAM 更改为 ENGINE=MyISAM

# sed -i ‘s/TYPE/ENGINE/g‘ /var/www/extsuite/extman/docs/extmail.sql

    5.3 编辑 init.sql
    可以把默认的域更改成自己域 (我自己的是 18mail.com)

# sed -i ‘s/extmail.org/18mail.com/g‘ /var/www/extsuite/extman/docs/init.sql

    5.4 开始导入数据库;

mysql -u root -p < /var/www/extsuite/extman/docs/extmail.sql
mysql -u root -p < /var/www/extsuite/extman/docs/init.sql

  5.5 数据导入成功后 设置两个extmail 远程账户;

# mysql -uroot -p 进入数据库 设置extmail库 localhost远程账户# /etc/init.d/msyqld start
> use extmail;
> grant all on extmail.* to ‘extmail‘@‘%‘ identified by ‘extmail‘;
> flush privilege;
> use extmail;
> grant all on extmail.* to ‘extman‘@‘%‘ identified by ‘extmail‘;
> flush privileges;
# chkconfig mysqld on

六、配置 postfix 结合 extmail; 

  1、拷贝 extmail 下的数据链接文件到 postfix 下

拷贝数据连接文件:

# mkdir /etc/postfix/sql# cp -rp /var/www/extsuite/extman/docs/mysql_virtual_* /etc/postfix/sql

   2、设置 postfix SMTP认证 和 虚拟账户;

    2.1 配置 main.cf 

# vi /etc/postfix/main.cf
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
inet_interfaces = all
inet_protocols = all

myhostname = mail.18mail.com
mydomain = 18mail.com
myorigin = $mydomain
# mydestination = $myhostname, localhost.$mydomain, localhost
mydestination =
mynetworks = 0.0.0.0/0
# 可以设置允许的网段访问

local_recipient_maps =

unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES

#启用SMTP认证
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_type = dovecot
smtpd_sasl_security_options = noanonymous
smtpd_sasl_path = /var/spool/postfix/private/auth
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_sender_restrictions =
permit_mynetworks,
reject_sender_login_mismatch,
reject_authenticated_sender_login_mismatch,
reject_unauthenticated_sender_login_mismatch

smtpd_sasl_application_name = smtpd
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_security_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_client_restrictions = permit_mynetworks,permit_sasl_authenticated

smtpd_sender_login_maps =
mysql:/etc/postfix/sql/mysql_virtual_sender_maps.cf,
mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf

#启用虚拟用户
virtual_mailbox_base = /home/18mail/
# 前面创建的邮件18mail账户  配置链接前面从extman拷贝的 mysql_virtual* 文件
virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps

virtual_alias_maps = mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf
virtual_transport = maildrop:

virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

  2.2配置 master.cf

添加以下两行;flaage 前需要有空格
# vi /etc/postfix/master.cf

dovecot unix - n n - - pipe
  flags=DRhu user=18mail:18mail argv=/usr/libexec/dovecot/dovecot-lda -f ${sender} -d ${recipient}

  3、配置 dovecot

    3.1 dovecot.conf 文件

[[email protected] dovecot]# vi dovecot.conf 
protocols = imap pop3
listen = *
# 日志目录 文件需要设置为 dovecot 权限;
info_log_path = /var/log/dovecot-info.log
debug_log_path = /var/log/dovecot-debug.log
dict {
#quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
#expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
}
!include conf.d/*.conf
!include_try /etc/dovecot/local.conf

# dovecot-sql.conf.ext 下面自己创建编辑
passdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf.ext
# 这个可以在当前目录手动创建
}

# 18mail 为前面创建的邮箱专用账户
userdb {
driver = static
args = uid=5000 gid=5000 home=/home/18mail/%d/%n

}

####调试日志
auth_debug_passwords=yes
mail_debug=yes
auth_verbose=yes
auth_verbose_passwords=plain

  3.2 手动创建  dovecot-sql.conf.ext 认证文件

需要设置 extmail 账户密码
# vi dovecot-sql.conf.ext
driver = mysql
connect = host=localhost dbname=extmail user=extmail password=extmail
default_pass_scheme = MD5-CRYPT
password_query = SELECT username AS user,password FROM mailbox WHERE username = ‘%u‘ AND active=‘1‘
user_query = SELECT maildir, 5000 AS uid, 5000 AS gid, CONCAT(‘dict:storage=‘,floor(quota/1000),‘ proxy::quota‘) as quota FROM mailbox WHERE username = ‘%u‘ AND active=‘1‘

  4、配置之后 进行重启

# service postfix restart
# chkconfig postfix on
# service dovecot restart
# chkconfig dovecot on

七、配置 httpd

  1、unix-syslog 安装

  配置httpd后启动时会有unix-syslog 报错;需要安装 UNIX-syslog 模块;

# wget http://www.cpan.org/authors/id/M/MH/MHARNISCH/Unix-Syslog-1.1.tar.gz
解压缩进行编译安装
# cd Unix-Syslog
# perl Makefile.PL
# make && make install

  2、配置 extmail 虚拟主机;

    2.1 配置httpd.conf

    最后添加两行指定一个extmail虚拟主机;

# vi /etc/httpd/conf/httpd.conf# 指定extmail虚拟主机

NameVirtualHost *:80
Include conf/vhost_extmail.conf

    2.2 配置虚拟  vhost_extmail.conf 主机:

# vi /var/www/conf/vhost_extmail.conf 
<VirtualHost *:80>
ServerName mail.18mail.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 18mail 18mail

</VirtualHost>

   3、启动 web 

# /etc/init.d/httpd restart
# chkconfig httpd on

八、防火墙配置 

  1、配置 iptables 开放相关端口 25 110 143 80 3306 (由于没有SSL 验证 )

# vi /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 18 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 53 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT-A INPUT -m state --state NEW -m tcp -p tcp --dport 110 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 143 -j ACCEPT

重新启动:# /ect/init.d/iptables restart

九、收发测试 
http://mail.18mail.com

extman 默认的登录账户密码[email protected] 和 extmail*123*;
前面在 init.sql 更改为自己的18mail;;我可以用自己的进行登陆;

  1、web 管理端测试:

  2、web 客户端测试:

  3、 Foxmail 收发测试

原文地址:https://www.cnblogs.com/sharesdk/p/9215606.html

时间: 2024-09-30 00:32:49

Postfix - Extmail 邮箱系统的相关文章

Postfix+courier-authlib+dovecot+Extmail与Extman邮箱系统

Postfix+courier-authlib+dovecot+Extmail与Extman实现web服务的邮件服务器 一.环境准备 1. 系统环境 centos7.x Linux mail.apicloud.com 3.10.0-862.3.3.el7.x86_64 #1 SMP Fri Jun 15 04:15:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux 2. 软件环境 #删除自带的Postfix软件 yum remove postfix #yum 

centos7.2下搭建postfix++dovecot+courier-authlib+extmail邮件收发系统

专业的事由专业的人去做,现在DNS,mail邮箱系统基本都是专业的公司去做了,越来越少公司自己搭建DNS,mail等系统服务 这次由于服务器要迁移,公司的邮箱系统一直都是用开源的postfix的,只能自己折腾 在此记录一下,搭建全过程使用root账号,中间有一些错误调试的,都给忽略了,这里只给出最的配置 在文章最后面会有一些错误调试的记录 不管遇到什么错误,首先打印日志来看! 不管遇到什么错误,首先打印日志来看! 不管遇到什么错误,首先打印日志来看! 在网上大概了解了一下整个邮箱系统的组成: #

postfix邮箱系统

Postfix邮箱系统 Internet 网络中的电子邮件系统并不是一个孤立的体系.除了需要DNS服务器提供邮件域的解析,通过Web服务器提供邮箱操作界面以外, 邮箱收取.传递等功能也是由不同的组件来提供的** 邮件系统的角色 MTA(邮件传输代理):一般被称为邮件服务器软件.MTA软件负责接收客户端软件发送的邮件,并将邮件传输给其他的MTA程序,是电子邮件的核心部分. MUA(邮件用户代理):一般被称为邮件客户端软件.MUA软件的功能是为用户提供发送.接收和管理电子邮件的界面. MDA(邮件分

postfix+extmail+dovecot+ courier-authlib 实现公网邮件服务器

Postfix+extmail+dovecot+ courier-authlib 实现公网邮件服务器 系统环境: Centos 6.5 x64 准备工作:关 selinux .iptables 基于: lnmp 环境 先安装 epel  yum源 : Rpm -ivh  epel-release-6-8.noarch.rpm 安装所需rpm包: 为了方便,yum安装的php.mysql yum -y install vim gcc gcc-c++ openssl openssl-devel db

Linux+postfix+extmail+dovecot打造基于web页面的邮件系统

Linux+postfix+extmail+dovecot打造基于web页面的邮件系统 linuxwebmysqlapacheredhat数据库服务器 Linux+postfix+extmail+dovecot打造基于web页面的邮件系统 最终效果图: 准备阶段:需要手动下载的软件包: postfix-2.6.5.tar.gz courier-authlib-0.62.4.tar.bz2 eextmail-1.2.tar.gz xtman-1.1.tar.gz Time-HiRes-1.9707

exchange邮箱系统增加验证码机制

首先背景是exchange的邮箱系统没有后台源代码.因为这个原因,生成验证码的机制放在aspx的runat="sever"后台代码里面. 首先需要找到iis中logon.aspx文件.在这里找到输入邮箱名和密码的input元素,对应增加上输入验证码的input和显示验证码图片的img元素. 需要增加两个文件:VerifyCode.aspx是用户输入进行输入的验证码验证操作的代码:GetImg.aspx是用于显示验证码图片的,即将之前添加的img的src设置为这个GetImg.aspx即

JavaScript邮箱系统开发(六)

一.下一个选项卡 //下一个选项卡 $('#J_next').click(function(e) { e.preventDefault(); e.stopPropagation(); var ul = $('#B_history'), current = ul.find('.current'), li = current.next('li'); showTab(li); }); 二.上一个选项卡 //上一个选项卡 $('#J_prev').click(function(e) { e.preven

linux邮箱系统sendmail惊魂

事情的原委: 年初时就业方向一直很烦,后来接触51CTO后看到了吴光科老师的linux运维初级到高级系统的学下来了终于拿到一分5K的offer,唉由于经验尚浅问题平发.有一次linux下的sendmail邮箱系统,添加完白名单后,从新启动服务谁知道居然死机了.呵呵死机到是小事重启就得了,由于经验欠缺问题这下就来了本来很简单的一件事情接下来却非常的惊魂这天.事情是这样的由于死机了我就去找经理问linux邮箱服务器在那台机器上跑,从他哪里得知是建在一天虚拟机ESI下的,由于我也不懂这虚拟机就夏整了半

poxtfix+dovecot+saslauthd+courier-authlib +mysql + extmail 完整虚拟邮箱系统部署

所需软件: 平台,RHEL5.8 postfix-2.9.15 dovecot系统自带 courier-authlib-0.62.4高与0.64本平台可能无法使用 mysql 5.7 含: mysql-5.7.12-1.el5.x86_64.rpm mysql-community-client-5.7.12-1.el5.x86_64.rpm mysql-community-common-5.7.12-1.el5.x86_64.rpm mysql-community-devel-5.7.12-1.