Monday, December 26, 2011

iRedMail tar file download & iRedMail configuration

Download the latest release of iRedMail :
http://code.google.com/p/iredmail/
http://www.iredmail.org/install_iredmail_on_rhel.html
http://code.google.com/p/iredmail/wiki/Installation
 or search it from iredmail + Sourcegoogle
Change the following information of your server :
[root@ns2 pkgs]# hostname mail.gix.com
[root@ns2 pkgs]# vim /etc/hosts
192.168.50.56           mail.gix.com        mail
[root@ns2 pkgs]# vim /etc/sysconfig/network
HOSTNAME=mail.gix.com

iRedMailConfiguration :

[root@ns2 ~]# cd Desktop/
[root@ns2 Desktop]# ls
iRedMail-0.7.4-rc3.tar.bz2
[root@ns2 Desktop]# tar -xjf iRedMail-0.7.4-rc3.tar.bz2
You have new mail in /var/spool/mail/root
[root@ns2 Desktop]# ls
iRedMail-0.7.4-rc3  iRedMail-0.7.4-rc3.tar.bz2
[root@ns2 Desktop]# cd iRedMail-0.7.4-rc3
[root@ns2 iRedMail-0.7.4-rc3]# ls
ChangeLog  dialog          functions    patches  README   tools
conf       Documentations  iRedMail.sh  pkgs     samples
[root@ns2 iRedMail-0.7.4-rc3]# cd pkgs/
[root@ns2 pkgs]# ls
get_all.sh  MD5.opensuse      misc  SHASUM.freebsd.misc
MD5.misc    MD5.ubuntu.lucid  pkgs

[root@ns2 pkgs]# bash get_all.sh
OR
[root@ns2 pkgs]# chmod 744 get_all.sh
[root@ns2 pkgs]# ./get_all.sh

< INFO > Generating yum repository ...
< INFO > Fetching Source Tarballs ...
< INFO > + 1 of 5: http://iredmail.org/yum/misc/iRedAPD-1.3.6.tar.bz2
< INFO > + 2 of 5: http://iredmail.org/yum/misc/iRedAdmin-0.1.6.tar.bz2
< INFO > + 3 of 5: http://iredmail.org/yum/misc/roundcubemail-0.6.tar.gz
< INFO > + 4 of 5: http://iredmail.org/yum/misc/phpldapadmin-1.2.1.1.tgz
< INFO > + 5 of 5: http://iredmail.org/yum/misc/phpMyAdmin-3.4.6-all-languages.tar.bz2
< INFO > Validate Packages ...  [ OK ]
< INFO > Installing package(s): dialog.i386
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
iRedMail                                                 |  951 B     00:00
iRedMail-Dovecot-12                                      |  951 B     00:00
rajan-repo                                               |  951 B     00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package dialog.i386 0:1.0.20051107-1.2.2 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package       Arch        Version                      Repository         Size
================================================================================
Installing:
 dialog        i386        1.0.20051107-1.2.2           rajan-repo        162 k

Transaction Summary
================================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 162 k
Downloading Packages:
dialog-1.0.20051107-1.2.2.i386.rpm                       | 162 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : dialog                                                   1/1

Installed:
  dialog.i386 0:1.0.20051107-1.2.2

Complete!
********************************************************
* All tasks had been finished successfully. Next step:
*
*   # cd ..
*   # bash iRedMail.sh
*
********************************************************

[root@ns2 pkgs]# cd ..
[root@ns2 iRedMail-0.7.4-rc3]# ls
ChangeLog  dialog          functions    patches  README   tools
conf       Documentations  iRedMail.sh  pkgs     samples


 [root@ns2 iRedMail-0.7.4-rc3]# bash iRedMail.sh
OR

[root@ns2 iRedMail-0.7.4-rc3]# chmod 744 iRedMail.sh
[root@ns2 iRedMail-0.7.4-rc3]# ./iRedMail.sh

1) Welcome and thanks for your use


2) Specify location to store all mailboxes. Default is /var/vmail/.


3) Choose backend used to store mail accounts. Please choose the one which you're familiar with. You can manage mail accounts with iRedAdmin, our web-based iRedMail admin panel.iRedMail supports both OpenLDAP and MySQL as backends to store virtual domains and users. OpenLDAP is recommended.


4) If you choose to store mail accounts in OpenLDAP, iRedMail installer will ask you two questions about OpenLDAP.LDAP suffix,
1) LDAP suffix.
2) Password of LDAP root dn.

1)LDAP suffix, normally it's your domain name, such as: dc=gix,dc=com


2) Password of LDAP root dn.


5) Set password of MySQL root user. MySQL is used to store data of other applications, e.g. Roundcube webmail, Policyd, Amavisd-new. If you choose to store mail accounts in MySQL, you will see this dialog too.


6) Add your first virtual domain name, e.g: gix.com


7)Set password for the virtual domain admin: postmaster@gix.com, you can log into iRedadmin and Awstats with this account.


8)Set password for the first normal user www@gix.com for the first virtual domain:


10) Choose optional components


11) Choose default language for your webmail


12) After answered these questions, iRedMail installer will ask your confirm to start installation. It will install and configure required packages automatically. Type 'y' or 'Y' (without quotes) and press 'Enter' to confirm.












< Question > Would you like to use firewall rules shipped within iRedMail now?
< Question > File: /etc/sysconfig/iptables, with SSHD port: 22. [Y|n]y
< INFO > Copy firewall sample rules: /etc/sysconfig/iptables.
< Question > Restart firewall now (with SSHD port 22)? [y|N]y
< INFO > Restarting firewall ...
Applying iptables firewall rules:                                                [  OK  ]
Loading additional iptables modules: ip_conntrack_netbios_n[  OK  ]
< Question > Would you like to use MySQL configuration file shipped within iRedMail now?
< Question > File: /etc/my.cnf. [Y|n]y
< INFO > Copy MySQL sample file: /etc/my.cnf.
< INFO > Enable SSL support for MySQL server.
< Question > Would you like to start postfix now? [y|N]y
< INFO > Temporarily set SELinux policy to 'permissive'.
/usr/sbin/setenforce: SELinux is disabled
Flushing firewall rules:                                              [  OK  ]
Setting chains to policy ACCEPT: filter                     [  OK  ]
Unloading iptables modules:                                     [  OK  ]
Applying iptables firewall rules:                                [  OK  ]
Loading additional iptables modules: ip_conntrack_netbios_n [  OK  ]
Shutting down kernel logger:                                                      [  OK  ]
Shutting down system logger:                                                     [  OK  ]
Starting system logger:                                                               [  OK  ]
Starting kernel logger:                                                                [  OK  ]
Stopping httpd:                                                                            [FAILED]
Starting httpd:                                                                             [  OK  ]
Shutting down postfix:                                                                [FAILED]
Starting postfix:                                                                           [  OK  ]
Stopping MySQL:                                                                        [  OK  ]
Starting MySQL:                                                                          [  OK  ]
Stopping slapd:                                                                            [  OK  ]
Checking configuration files for slapd:  config file testing succeeded
                                                                                                     [  OK  ]
Starting slapd:                                                                             [  OK  ]
Stopping policyd:                                                                        [FAILED]
Starting policyd:                                                                          [  OK  ]
Stopping Dovecot Imap:                                                                [FAILED]
Starting Dovecot Imap: If you have trouble with authentication failures,
enable auth_debug setting. See http://wiki.dovecot.org/WhyDoesItNotWork
This message goes away after the first successful login.
                                                                                                    [  OK  ]
Shutting down Mail Virus Scanner (amavisd):                           [FAILED]
Starting Mail Virus Scanner (amavisd):                                     [  OK  ]
Stopping Clam AntiVirus Daemon:                                            [FAILED]
Starting Clam AntiVirus Daemon: LibClamAV Warning: **************************************************
LibClamAV Warning: ***  The virus database is older than 7 days!  ***
LibClamAV Warning: ***   Please update it as soon as possible.    ***
LibClamAV Warning: **************************************************
                                                                       [  OK  ]
Stopping fail2ban:                                         [FAILED]
Starting fail2ban:                                           [  OK  ]
Stopping crond:                                             [  OK  ]
Starting crond:                                               [  OK  ]
freshclam is already stopped.                       [  OK  ]
Starting freshclam:                                        [  OK  ]
iredapd is already stopped.
Starting iredapd ...
********************************************************************
* URLs of your web applications:
*
* - Webmail: http://mail.gix.com/mail/ or httpS://mail.gix.com/mail/
*   + Account: www@gix.com, Password: 123456
*
* - Admin Panel (iRedAdmin): httpS://mail.gix.com/iredadmin/
*   + Account: postmaster@gix.com, Password: 123456
*

********************************************************************
* Congratulations, mail server setup complete. Please refer to tip
* file for more information:
*
*   - /root/Desktop/iRedMail-0.7.4-rc3/iRedMail.tips
*
* And it's sent to your mail account www@gix.com.
*
********************************************************************




How to uninstall iRedMail :
http://www.iredmail.org/forum/topic333-faq-how-to-uninstall-iredmail.html
Download shell script, and move it to iRedMail-x.y.z/tools/ directory.
# wget http://iredmail.googlecode.com/hg/extra/clear_iredmail.sh
# mv clear_iredmail.sh /path/to/iRedMail-x.y.z/tools/
Execute it
# cd /path/to/iRedMail-x.y.z/tools/
# bash clear_iredmail.sh
It need your confirm to remove binary packages and source tarballs (e.g. roundcube, phpmyadmin, phpldapadmi, etc), please read the prompt carefully and make decision.