安装以前的装备工作:
修改hostname 使hostname 满足 FQDN的规则
hostname mail.test.com
sh hostname #使修改立即生效(当前shell) hostname -F /etc/hostname (立即生效)
vim /etc/hosts
127.0.0.1 mail.test.com
iRedmail 插件:
Postfix 用来发邮件
Dovecot 用来接收邮件
Apache web版的客户端
Policyd 拒绝(黑名单)
Awstat 需要分析日志
Fail2ban 防止暴力破解
iRedadmin 管理账户
下载iredmail
wget https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.9.5-1.tar.bz2
解压 tar jxvf iRedMail-0.9.5-1.tar.bz2
说明没有安装bzip2
yum install -y bzip2
再解压
在iredmail目录里
安装命令是:IREDMAIL_MIRROR='http://42.159.241.31' bash iRedMail.sh
安装过程中选择:apache mariadb 其他按照默认选择(直接回车)
出现如此提示,说明安装完成:
Database updated (4912445 signatures) fromdatabase.clamav.net (IP: 203.178.155.233)
********************************************************************
* URLs of installed web applications:
*
* - Roundcube webmail:httpS://mail.test.com/mail/
*
* - Web admin panel (iRedAdmin):httpS://mail.test.com/iredadmin/
*
* You can login to above links with belowcredential:
*
* - Username: postmaster@test.com
* - Password: qwer
*
*
********************************************************************
* Congratulations,mail server setupcompleted successfully. Please
* read below file for more information:
*
* -/usr/local/src/iRedMail-0.9.5-1/iRedMail.tips
*
* And it's sent to your mail accountpostmaster@vim10s.com.
*
********************* WARNING**************************************
*
* Please reboot your system to enable allmail services.
*
发送测试邮件,自己邮箱接受