iRedmail配置手册

一、系统规划

    操作系统:CentOS 6.5 X64

    软件版本:iRedMail-0.9.5-1.tar.bz2

    网络地址:172.16.20.31

   磁盘大小:500G  /var目录存放邮件,此目录占用450G

 

二、安装iRedmail系统

   软件下载地址:http://www.iredmail.com/

   官方文档地址:http://www.iredmail.com/docs/index.html

   安装文档:http://www.iredmail.com/docs/install.iredmail.on.rhel.html

 

三、配置iRedmail工作属性

   1、前端使用WEB代理,后端邮件服务器不使用https,关闭roundcubemail强制使用https

[root@mail config]# vim /var/www/roundcubemail/config/config.inc.php

$config['force_https'] = true;
修改为:
$config['force_https'] = false;

[root@mail conf.d]# vim /etc/httpd/conf.d/iredadmin.conf
编辑此文件,添加以下字段
Alias /iredadmin/static "/var/www/iredadmin/static/"
WSGIScriptAlias /iredadmin "/var/www/iredadmin/iredadmin.py/"
Alias /awstats/icon "/usr/share/awstats/wwwroot/icon/"
Alias /awstatsicon "/usr/share/awstats/wwwroot/icon/"
ScriptAlias /awstats "/usr/share/awstats/wwwroot/cgi-bin/"

   2、配置退信转发到指定邮件以及垃圾邮件自动放入垃圾箱通(注意,使用POP3协议,第三方客户端,例如Foxmail,产生的垃圾邮件无法进入收件箱,垃圾箱。imap不存在这种问题)

[root@mail dovecot]# vim /var/vmail/sieve/dovecot.sieve

require ["copy","fileinto"];

# rule:[Move Spam to Junk Folder]
if header :is "X-Spam-Flag" "YES"
{
    fileinto "Junk";
}

# rule:[Undelivered Copy to maintain]
if allof (header :contains "From" "MAILER-DAEMON", not header :contains "To" "root@")
{
    redirect :copy "xxx@domain";
} 

 3、配置postfix允许使用不安全的 smtp25号端口 

       官方文档:http://www.iredmail.com/docs/enable.smtp.auth.on.port.25.html

 4、配置邮件系统使用465端口

      官方文档:http://www.iredmail.com/docs/enable.smtps.html

      补充:官方文档只开放了端口,未配置fail2ban防止密码暴力密码

[root@mail postfix]# vim /etc/fail2ban/jail.local
...
action      = iptables-multiport[name=roundcube, port="http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve", protocol=tcp]
....

新增nrd服务(/etc/services  默认定义为465端口)
action      = iptables-multiport[name=roundcube, port="http,https,smtp,submission,pop3,pop3s,imap,imaps,nrd,sieve", protocol=tcp]

[root@mail fail2ban]# service fail2ban restart

ignoreip(为白名单)
[DEFAULT]
# time is in seconds. 3600 = 1 hour, 86400 = 24 hours (1 day)
findtime    = 3600
bantime     = 86400
maxretry    = 5
ignoreip    = 127.0.0.1 127.0.0.0/8 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 

  5、关闭使用灰名单

   官方文档:http://www.iredmail.com/docs/manage.iredapd.html

  6、管理邮件系统白名单以及黑名单

    官方文档:http://www.iredmail.com/docs/amavisd.wblist.html  

  7、mysql版本的后台无法登陆awstats,需要修改SSHA512为md5

[root@mail ~]# openssl passwd -1 xxxxxxxx

更新密文
mysql> use vmail ;
mysql> UPDATE  mailbox SET password="$1$D3aKAuJ7$INnoSA3cRDh0WBXk42uhl."  WHERE username="xxx@domin";

  8、配置mysql使用全局通讯录插件(可自动补全收件人,同步后面建立帐号,支持别名等)

       官方下载地址:https://github.com/t3chguy/Roundcube-SQL-Global-Address-Books

       安装步骤:

             1、复制sql_global_addressbooks 到 /var/www/roundcube/plugins

      2、mysql> USE roundcubemail 、把安装目录下的iredmail+alias.my.sql 在数据库执行

             3、进行步骤1目录、重命名config.inc.php.dist为config.inc.php

             4、vim  /var/www/roundcubemail/config/config.inc.php

              5、启用插件功能 $config['plugins'] = array('managesieve', 'password','sql_global_addressbooks');

  9、同步活动目录的组织单位(使用中文名的组织名称无法识别)

       官方文档:http://www.iredmail.com/docs/active.directory.html

  10、万网域名配置

    官方文档:http://www.iredmail.com/docs/setup.dns.html

 

    11、测试邮件等分情况

      测试网站:http://www.mail-tester.com/

转载于:https://my.oschina.net/huangweibin/blog/692456

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值