From iRedMail
Revision as of 06:28, 7 May 2013 by ZhangHuangbin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This tutorial describes how to upgrade iRedAPD to the latest stable release, iRedAPD-1.4.0. It's applicable on all Linux/BSD distributions supported by iRedMail.

Important notes:

  • Since iRedAPD-1.4.0, we use Python source file as config file, not '.ini' format anymore.
  • We don't need second instance, iredapd-rr, anymore.

  • Download the latest stable release here: For example, iRedAPD-1.4.0.tar.bz2.
  • Upload it to your iRedMail server. Assume it's /root/iRedAPD-1.4.0.tar.bz2 on the server.
  • Extract downloaded package and move to /opt/.
# tar xjf /root/iRedAPD-1.4.0.tar.bz2 -C /opt/

You get a new directory: /opt/iRedAPD-1.4.0/.

  • Set correct owner and permission:
# chown -R iredapd:iredapd /opt/iRedAPD-1.4.0
# chmod -R 0700 /opt/iRedAPD-1.4.0
  • Generate new config file from sample file, and set correct file owner and permission.
# cd /opt/iRedAPD-1.4.0/
# cp
# chown -R iredapd:iredapd
# chmod -R 0600

WARNING: Config file /opt/iredapd/ contains sensitive infomation (username, password), please don't make it world-readable. Permission 0600 is the best.

  • Please open /opt/iredapd/, and sync settings with old iRedAPD config file /opt/iRedAPD-[OLD-VERSION]/etc/iredapd.ini.
    • In old version of iRedAPD, all parameters under "[ldap]" section are now new parameters start with ldap_.
    • In old version of iRedAPD, all parameters under "[sql]" (or "[mysql]") section are now new parameters start with sql_.
  • Remove symbol link of old release:
# rm -i /opt/iredapd               # <- Don't not end with '/'.
  • Create symbol link to the latest release:
# cd /opt/
# ln -s iRedAPD-1.4.0 iredapd
  • Copy new RC script for your server. We have scripts for different Linux/BSD distributions. Please copy the proper one for your server. For example:
    • /opt/iredapd/rc_scripts/iredapd.debian: For Debian and Ubuntu.
    • /opt/iredapd/rc_scripts/iredapd.freebsd: For FreeBSD. Please copy to /usr/local/etc/rc.d/.
    • /opt/iredapd/rc_scripts/iredapd.gentoo: For Gentoo Linux.
    • /opt/iredapd/rc_scripts/iredapd.openbsd: For OpenBSD. Please copy to /etc/rc.d/.
    • /opt/iredapd/rc_scripts/iredapd.opensuse: For openSUSE.
    • /opt/iredapd/rc_scripts/iredapd.rhel: For Red Hat, CentOS, Scientific Linux.
# cp /opt/iredapd/rc_scripts/iredapd.rhel /etc/init.d/iredapd
# chmod +x /etc/init.d/iredapd
  • Restart iRedAPD service:
# ---- On Linux ----
# /etc/init.d/iredapd restart

# ---- On FreeBSD ----
# /usr/local/etc/rc.d/iredapd restart

# ---- On OpenBSD ----
# /etc/rc.d/iredapd restart
  • If you don't have file /etc/init.d/iredapd-rr on Linux, or /etc/rc.d/iredapd-rr on OpenBSD, or /usr/local/etc/rc.d/iredapd-rr on FreeBSD, it's safe to ignore below steps. But if you have it, please stop service iredapd-rr, then move all enabled plugin names listed in /opt/iRedAPD-[OLD_VERSION]/etc/iredapd-rr.ini to our new config file /opt/iredapd/, in parameter plugins = .
# /etc/init.d/iredapd-rr stop
# rm /etc/init.d/iredapd-rr

Check whether you have check_policy_service inet: in Postfix config file /etc/postfix/ (Linux/OpenBSD) or /usr/local/etc/postfix/, if you have it, please remove check_policy_service inet:, then restart Postfix service.

That's all.

Personal tools