Wednesday, September 9, 2009

iRED Mail Installation on Ubuntu Server 8.04

Installation of useful tools.

root@redmail:~# apt-get install acl wget dialog

Copy following to /etc/apt/sources.list
root@redmail:~# nano /etc/apt/sources.list

deb http://ppa.launchpad.net/lidaobing/iredmail-804/ubuntu hardy main
deb-src http://ppa.launchpad.net/lidaobing/iredmail-804/ubuntu hardy main
Add key, you can replace your key, I used this "61270A939E324B12" and update.

root@redmail:~#apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 61270A939E324B12
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 61270A939E324B12
gpg: requesting key 9E324B12 from hkp server keyserver.ubuntu.com
gpg: key 9E324B12: public key "Launchpad PPA for LI Daobing" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
root@redmail:~# apt-get update

Add mount option 'acl' in /etc/fstab
which contains '/etc/' directory if it doesn't there yet. Copy it as a new line, and comment the old one, add 'acl' like below.
    # /dev/sda1
    UUID=63b655fe-5959-46bc-b9db-09ad2d746b78 / ext3 relatime,errors=remount-ro 0 1

    Note: It seems you don't need to add this 'acl' option in /etc/fstab if you use VPS which hosted by OpenVZ, because you can't edit /etc/fstab file, and it already supports acl.

Remount the mount point which contains '/etc/' directory. e.g. '/':
    root@iredmail:/var/tmp/iRedMail-0.5.0# mount -o remount,rw,acl /


Download the package " iRedMail-0.5.0.tar.bz2 " from
http://code.google.com/p/iredmail/downloads/list
and move it to /var/tmp directory.
#cd /var/tmp
#tar -xvf iRedMail-0.5.0.tar.bz2
#cd iRedMail-0.5.0/pkgs

Run the script get_all.sh


This will fetch the required packages from source, please make sure that your Internet is working ok.

root@redmail:/var/tmp/iRedMail-0.5.0/pkgs# bash get_all.sh
<> Creating necessary directories ...
<> ==================== Fetching Source Tarballs ====================
<> * 1/16: http://www.iredmail.org/apt/misc/postfixadmin-2.2.1.1.tar.gz
<> * 2/16: http://www.iredmail.org/apt/misc/phpMyAdmin-2.11.9.5-all-languages.tar.bz2
<> * 3/16: http://www.iredmail.org/apt/misc/roundcubemail-0.2.1.tar.gz
<> * 4/16: http://www.iredmail.org/apt/misc/phpldapadmin-1.1.0.7.tar.gz
<> * 5/16: http://www.iredmail.org/apt/misc/squirrelmail-1.4.19.tar.bz2
<> * 6/16: http://www.iredmail.org/apt/misc/change_ldappass-2.2-1.4.0.tar.gz
<> * 7/16: http://www.iredmail.org/apt/misc/change_sqlpass-3.3-1.2.tar.gz
<> * 8/16: http://www.iredmail.org/apt/misc/compatibility-2.0.14-1.0.tar.gz
<> * 9/16: http://www.iredmail.org/apt/misc/check_quota-2.2-1.4.0.tar.gz
<> * 10/16: http://www.iredmail.org/apt/misc/select_language-1.1-1.4.0.tar.gz
<> * 11/16: http://www.iredmail.org/apt/misc/autosubscribe-1.1-1.4.2.tar.gz
<> * 12/16: http://www.iredmail.org/apt/misc/email_footer-0.5-1.4.2.tar.gz
<> * 13/16: http://www.iredmail.org/apt/misc/login_auto-1.1-1.2.tar.gz
<> * 14/16: http://www.iredmail.org/apt/misc/avelsieve-1.0.1.tar.gz
<> * 15/16: http://www.iredmail.org/apt/misc/all_locales-1.4.13-20071220.tar.gz
<> * 16/16: http://www.iredmail.org/apt/misc/add_address-1.0.1-1.4.0.tar.gz
<> Validate Packages via md5sum ... [ OK ]
<> Checking necessary command/package: dialog/dialog ...
<> Checking necessary command/package: setfacl/acl ...
********************************************************
* All tasks had been finished Successfully. Next step:
*
* # cd ..
* # bash iRedMail.sh
*
********************************************************

Make Sure devcot is installted
root@redmail:/var/tmp/iRedMail-0.5.0/pkgs# apt-cache policy dovecot-common dovecot-pop3d dovecot-imapd | grep 'Candidate'
Candidate: 1:1.1.11-0ubuntu4~hardy2
Candidate: 1:1.1.11-0ubuntu4~hardy2
Candidate: 1:1.1.11-0ubuntu4~hardy2

Start Installation
root@redmail:/var/tmp/iRedMail-0.5.0# bash iRedMail.sh

It will ask question about path of directory, options, etc.... press next next and Y at the end.

It will installed every thing you need with options you select.


Component URL Access via HTTP Access via HTTPS
Roundcube webmail http://your_server/mail/ (or /webmail, /roundcube) YES YES
SquirrelMail webmail http://your_server/squirrelmail/ (or /squirrel) YES YES
PostfixAdmin https://your_server/postfixadmin/ NO YES
phpMyAdmin https://your_server/phpmyadmin/ (or /mysql) NO YES
phpLDAPAdmin https://your_server/ldap/ (or /phpldapadmin) NO YES
Awstats https://your_server/awstats/awstats.pl NO YES

Now you can login and send your first mail to any other account for testing.

References
http://code.google.com/p/iredmail/wiki/Installation_on_Debian
http://code.google.com/p/iredmail/downloads/list
http://code.google.com/p/iredmail/wiki/Admin_Guide
http://code.google.com/p/iredmail/wiki/DNS_SPF
http://code.google.com/p/iredmail/wiki/DNS_DKIM

No comments: