安装 iRedmail 手记

By | 2018-11-27

平台: ubuntu 13.10 x64

1)安装ubuntu 啥都不装就装个ssh服务
2)到iRedmail 官网下载最新版本 http://www.iredmail.org/download.html
3)ssh 到ubuntu ,解压 iRedmail 压缩包

cd /root
wget http://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.x.y.tar.bz2

tar xjf iRedMail-0.x.y.tar.bz2

4)按 FQDN 格式修改ubuntu 的机器名 (ubuntu有两个位置需要修改)
a.  /etc/hostname    <– 例如: abc
b.  /etc/hosts
127.0.1.1       mail.abc.com localhost abc
abc两个文件要对应,然后重启服务器

5)进入 iRedmail 目录修改 iRedMail-x.y.z/pkgs/get_all.sh (因为中国GFW封锁了iredmail.org)
搜索 get_all.sh 中 “iredmail.org” 全部修改为 “
106.187.51.47”

6)正式开始安装

cd /iRedMail-0.x.y

bash iRedMail.sh

:本人安装时执行上面命令会出现以下错误
********* ERROR *********
Release version of the operating system on this server is unsupported by
iRedMail, please access below link to get the latest iRedMail and a list
of supported Linux/BSD distributions and release versions.

http://www.iredmail.org/download.html
*************************

这时候需要按以下方法解决才能正常安装:
a.  需要修改一下 iRedmail 目录下 conf/global  文件
先找到以下这段代码

# Unsupported releases: 12.10, 13.04, 13.10
if echo “${DISTRO_VERSION}” | grep -E ‘^(12\.10|13\.04|13\.10)’ &>/dev/null ; then
export UNSUPPORTED_RELEASE=’YES’
fi

b. 修改为以下代码

    # Unsupported releases: 7, 8.
    if echo "${DISTRO_VERSION}" | grep '^[78]' &>/dev/null ; then
    export UNSUPPORTED_RELEASE='YES'                                           
    fi

再次执行
bash iRedMail.sh
root@abc:/home/iRedMail-0.8.7# bash iRedMail.sh
< INFO > Checking new version of iRedMail …

这时候就开始了

点Yes

定义邮件存放路径

这里我用 OpenLDAP

这里 dc=example 修改为你自己的域名(例如:abc.com),即修改为:dc=abc,dc=com

这里是填LDAP的密码

这里填 MYSQL 管理员的密码

……………………后面忘记截图了,自己看看吧!

發佈留言