Mail Servers Configuration


ZIMBRA MAIL SERVER CONFIGURATION-:

       DNS server -:   Ipaddress – 192.168.44.136
                                     Hostname – mail.mydomain.com

Before configuring zimbra mail server. We need to setup dns server for mailserver. Before going to setup the dns we need to set the hostname. Check the hostname in /etc/hosts, /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth0. Check the  /etc/reslov.conf file and mention the dns server ipaddress.

[root@mail ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
192.168.44.136   mail.mydomain.com mail
[root@mail ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=mail.mydomain.com
[root@mail ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:0C:29:48:42:45
ONBOOT=yes
HOSTNAME=mail.mydomain.com
[root@mail ~]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
search localdomain
nameserver 192.168.44.136
                  Now setup the dns server.
DNS Configuration -:
Check whether bind package is installed or not. If so it should be like below.
[root@mail ~]# rpm -qa | grep bind
bind-9.3.6-4.P1.el5
bind-libbind-devel-9.3.6-4.P1.el5
ypbind-1.19-12.el5
bind-chroot-9.3.6-4.P1.el5
bind-sdb-9.3.6-4.P1.el5
bind-devel-9.3.6-4.P1.el5
bind-libs-9.3.6-4.P1.el5
bind-utils-9.3.6-4.P1.el5
  Otherwise install the bind package through yum . After the installation, setup the named.conf file.
[root@mail ~]# cat /var/named/chroot/etc/named.conf
options {
       directory "/var/named/";
      dump-file "/var/named/data/cache_dump.db";
       statistics-file "/var/named/data/named_stats.txt";
forwarders { 8.8.8.8; };
};
include "/etc/rndc.key";
zone "mydomain.com" {
    type master;
    file "mydomain.com";
};
After configuring the named.conf file setup the forward and reverse lookup zone in mydomain.com file
[root@mail ~]# cat /var/named/chroot/var/named/mydomain.com
$TTL 86400
@    IN        SOA     mydomain.com. hostmaster.mydomain.com. (
                               10118      ; Serial
                               43200      ; Refresh
                               3600       ; Retry
                               3600000    ; Expire
                               2592000)   ; Minimum
      IN   NS   ns.mydomain.com.
      A    192.168.44.136
      IN   MX    10 mail.mydomain.com.
mail  IN    A       192.168.44.136
ns    IN    A       192.168.44.136
             check whether the dns is resolving or not by nslookup or dig command
[root@mail ~]# nslookup mail.mydomain.com
Server:         192.168.44.136
Address:        192.168.44.136#53

Name:   mail.mydomain.com
Address: 192.168.44.136


[root@mail ~]# dig mail.mydomain.com
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5 <<>> mail.mydomain.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27796
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; QUESTION SECTION:
;mail.mydomain.com.             IN      A
;; ANSWER SECTION:
mail.mydomain.com.      86400   IN      A       192.168.44.136
;; AUTHORITY SECTION:
mydomain.com.           86400   IN      NS      ns.mydomain.com.
;; ADDITIONAL SECTION:
ns.mydomain.com.        86400   IN      A       192.168.44.136
;; Query time: 2 msec
;; SERVER: 192.168.44.136#53(192.168.44.136)
;; WHEN: Wed Aug 31 02:26:41 2011
;; MSG SIZE  rcvd: 84
[root@mail ~]# host -t mx mydomain.com
mydomain.com mail is handled by 10 mail.mydomain.com.
Up to now DNS setup has been successfully done.
Note-: Check whether the systat, libstdc++ and gmp are installed or not, if not install it before continuing. Make sure that sendmail is stopped, iptables are stopped and selinux is disabled.
  Now download the zimbra software directly from the zimbra website.
       once it is downloaded completely,  extract the file and start installing.
[root@mail ~]# tar -zxvf zcs-7.1.2_GA_3268.RHEL5.20110804130919.tgz
[root@mail ~]# cd zcs-7.1.2_GA_3268.RHEL5.20110804130919
[root@mail ~]#./install.sh
Operations logged to /tmp/install.log.28057
Checking for existing installation...
    zimbra-ldap...NOT FOUND
    zimbra-logger...NOT FOUND
    zimbra-mta...NOT FOUND
    zimbra-snmp...NOT FOUND
    zimbra-store...NOT FOUND
    zimbra-apache...NOT FOUND
    zimbra-spell...NOT FOUND
    zimbra-convertd...NOT FOUND
    zimbra-memcached...NOT FOUND
    zimbra-proxy...NOT FOUND
    zimbra-archiving...NOT FOUND
    zimbra-cluster...NOT FOUND
    zimbra-core...NOT FOUND


PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.
ZIMBRA, INC. ("ZIMBRA") WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU
FIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING
THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY
THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS
AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT.

License Terms for the Zimbra Collaboration Suite:
  http://www.zimbra.com/license/zimbra_public_eula_2.1.html

Do you agree with the terms of the software license agreement? [N] y

Just accept the software license agreement to continue the installation process.
Checking for prerequisites...
     FOUND: NPTL
     FOUND: sudo-1.7.2p1-9
     FOUND: libidn-0.6.5-1.1
     FOUND: gmp-4.1.4-10
     FOUND: /usr/lib/libstdc++.so.6
Checking for suggested prerequisites...
     FOUND: perl-5.8.8
     FOUND: sysstat
     FOUND: sqlite
Prerequisite check complete.
 
Checking for installable packages
 
Found zimbra-core
Found zimbra-ldap
Found zimbra-logger
Found zimbra-mta
Found zimbra-snmp
Found zimbra-store
Found zimbra-apache
Found zimbra-spell
Found zimbra-memcached
Found zimbra-proxy
 
 
Select the packages to install
 
Install zimbra-ldap [Y]
 
Install zimbra-logger [Y]
 
Install zimbra-mta [Y]
 
Install zimbra-snmp [Y]
 
Install zimbra-store [Y]
 
Install zimbra-apache [Y]
 
Install zimbra-spell [Y]
 
Install zimbra-memcached [Y]
 
Install zimbra-proxy [N]
 
Checking required space for zimbra-core
checking space for zimbra-store
 
Installing:
    zimbra-core
    zimbra-ldap
    zimbra-logger
    zimbra-mta
    zimbra-snmp
    zimbra-store
    zimbra-apache
    zimbra-spell
 
You appear to be installing packages on a platform different
than the platform for which they were built.
 
This platform is RHEL5
Packages found: RHEL5
This may or may not work.
 
Using packages for a platform in which they were not designed for
may result in an installation that is NOT usable. Your support
options may be limited if you choose to continue.
 
Install anyway? [N] y
The system will be modified.  Continue? [N] y
Removing /opt/zimbra
Removing zimbra crontab entry...done.
done.
Cleaning up zimbra init scripts...done.
Cleaning up /etc/ld.so.conf...done.
Cleaning up /etc/prelink.conf...done.
Cleaning up /etc/security/limits.conf...done.
 
Finished removing Zimbra Collaboration Suite.
 
Installing packages
 
    zimbra-core......zimbra-core-7.0.0_GA_3077.RHEL5-20110804130919.i386.rpm...done
    zimbra-ldap......zimbra-ldap-7.0.0_GA_3077.RHEL5-20110804130919.i386.rpm...done
    zimbra-logger......zimbra-logger-7.0.0_GA_3077.RHEL5-20110804130919.i386.rpm...done
    zimbra-mta......zimbra-mta-7.0.0_GA_3077.RHEL5-20110804130919.i386.rpm...done
    zimbra-snmp......zimbra-snmp-7.0.0_GA_3077.RHEL5-20110804130919.i386.rpm...done
    zimbra-store......zimbra-store-7.0.0_GA_3077.RHEL5-20110804130919.i386.rpm...done
    zimbra-apache......zimbra-apache-7.0.0_GA_3077.RHEL5-20110804130919.i386.rpm...done
    zimbra-spell......zimbra-spell-7.0.0_GA_3077.RHEL5-20110804130919.i386.rpm...done
Operations logged to /tmp/zmsetup.03082011-121509.log
Installing LDAP configuration database...done.
Setting defaults...
 
DNS ERROR resolving MX for mail.mydomain.com
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes]
Create domain: [mail.mydomain.com] mydomain.com
        MX: mail.mydomain.com (192.168.44.136)
 
        Interface: 192.168.144.136
        Interface: 127.0.0.1
done.
Checking for port conflicts
 
Zimbra Main Menu will be shown as follow.
Main menu
 
   1) Common Configuration:
   2) zimbra-ldap:                             Enabled
   3) zimbra-store:                            Enabled
        +Create Admin User:                    yes
        +Admin user to create:                 admin@mydomain.com
******* +Admin Password                        UNSET
        +Anti-virus quarantine user:           virus-quarantine.knuolbvduy@mydomain.com
        +Enable automated spam training:       yes
        +Spam training user:                   spam.rwbsv81z8o@mydomain.com
        +Non-spam(Ham) training user:          ham.tnyvjvcvlt@mydomain.com
        +SMTP host:                            mail.mydomain.com
        +Web server HTTP port:                 80
        +Web server HTTPS port:                443
        +Web server mode:                      http
        +IMAP server port:                     143
        +IMAP server SSL port:                 993
        +POP server port:                      110
        +POP server SSL port:                  995
        +Use spell check server:               yes
        +Spell server URL:                     http://mail.mydomain.com:7780/aspell.php
        +Configure for use with mail proxy:    FALSE
        +Configure for use with web proxy:     FALSE
        +Enable version update checks:         TRUE
        +Enable version update notifications:  TRUE
        +Version update notification email:    admin@mydomain.com
        +Version update source email:          admin@mydomain.com
 
   4) zimbra-mta:                              Enabled
   5) zimbra-snmp:                             Enabled
   6) zimbra-logger:                           Enabled
   7) zimbra-spell:                            Enabled
   8) Default Class of Service Configuration:
   r) Start servers after configuration        yes
   s) Save config to file
   x) Expand menu
   q) Quit
 
Address unconfigured (**) items  (? - help) 3

As warned above signed by (**) items, the Admin Password is unset. We have to set a password for it.
Store configuration
 
   1) Status:                                  Enabled
   2) Create Admin User:                       yes
   3) Admin user to create:                    admin@mydomain.com
** 4) Admin Password                           UNSET
   5) Anti-virus quarantine user:              virus-quarantine.knuolbvduy@mydomain.com
   6) Enable automated spam training:          yes
   7) Spam training user:                      spam.rwbsv81z8o@mydomain.com
   8) Non-spam(Ham) training user:             ham.tnyvjvcvlt@mydomain.com
   9) SMTP host:                               mail.mydomain.com
  10) Web server HTTP port:                    80
  11) Web server HTTPS port:                   443
  12) Web server mode:                         http
  13) IMAP server port:                        143
  14) IMAP server SSL port:                    993
  15) POP server port:                         110
  16) POP server SSL port:                     995
  17) Use spell check server:                  yes
  18) Spell server URL:                        http://mail.mydomain.com:7780/aspell.php
  19) Configure for use with mail proxy:       FALSE
  20) Configure for use with web proxy:        FALSE
  21) Enable version update checks:            TRUE
  22) Enable version update notifications:     TRUE
  23) Version update notification email:       admin@mydomain.com
  24) Version update source email:             admin@mydomain.com
 
Select, or 'r' for previous menu [r] 4
 
Password for admin@mydomain.com (min 6 characters): [d2_mRsiclJ] redhatlocal
 
Store configuration
 
   1) Status:                                  Enabled
   2) Create Admin User:                       yes
   3) Admin user to create:                    admin@mydomain.com
   4) Admin Password                           set
   5) Anti-virus quarantine user:              virus-quarantine.knuolbvduy@mydomain.com
   6) Enable automated spam training:          yes
   7) Spam training user:                      spam.rwbsv81z8o@mydomain.com
   8) Non-spam(Ham) training user:             ham.tnyvjvcvlt@mydomain.com
   9) SMTP host:                               mail.mydomain.com
  10) Web server HTTP port:                    80
  11) Web server HTTPS port:                   443
  12) Web server mode:                         http
  13) IMAP server port:                        143
  14) IMAP server SSL port:                    993
  15) POP server port:                         110
  16) POP server SSL port:                     995
  17) Use spell check server:                  yes
  18) Spell server URL:                        http://mail.mydomain.com:7780/aspell.php
  19) Configure for use with mail proxy:       FALSE
  20) Configure for use with web proxy:        FALSE
  21) Enable version update checks:            TRUE
  22) Enable version update notifications:     TRUE
  23) Version update notification email:       admin@mydomain.com
  24) Version update source email:             admin@mydomain.com
 
Select, or 'r' for previous menu [r]
 
Main menu
 
   1) Common Configuration:
   2) zimbra-ldap:                             Enabled
   3) zimbra-store:                            Enabled
   4) zimbra-mta:                              Enabled
   5) zimbra-snmp:                             Enabled
   6) zimbra-logger:                           Enabled
   7) zimbra-spell:                            Enabled
   8) Default Class of Service Configuration:
   r) Start servers after configuration        yes
   s) Save config to file
   x) Expand menu
   q) Quit
 
*** CONFIGURATION COMPLETE - press 'a' to apply
Select from menu, or press 'a' to apply config (? - help) a
Save configuration data to a file? [Yes]
 
Select ‘r’ to go to the previous menu, then ‘a’ to apply configuration and then Yes to save the configuration.
 
Save config in file: [/opt/zimbra/config.2450]
Saving config in /opt/zimbra/config.2450...done.
The system will be modified - continue? [No] y
Operations logged to /tmp/zmsetup.03082011-121509.log
Setting local config values...done.
Setting up CA...done.
Deploying CA to /opt/zimbra/conf/ca ...done.
Creating SSL certificate...done.
Installing mailboxd SSL certificates...done.
Initializing ldap...done.
Setting replication password...done.
Setting Postfix password...done.
Setting amavis password...done.
Setting nginx password...done.
Creating server entry for mail.mydomain.com...done.
Saving CA in ldap ...done.
Saving SSL Certificate in ldap ...done.
Setting spell check URL...done.
Setting service ports on mail.mydomain.com...done.
Adding mail.mydomain.com to zimbraMailHostPool in default COS...done.
Installing webclient skins...
        lavender...done.
        waves...done.
        bones...done.
        sky...done.
        steel...done.
        beach...done.
        bare...done.
        smoke...done.
        pebble...done.
        carbon...done.
        oasis...done.
        tree...done.
        lake...done.
        twilight...done.
        hotrod...done.
        sand...done.
        lemongrass...done.
Finished installing webclient skins.
Setting zimbraFeatureTasksEnabled=TRUE...done.
Setting zimbraFeatureBriefcasesEnabled=TRUE...done.
Setting MTA auth host...done.
Setting TimeZone Preference...done.
Initializing mta config...done.
Setting services on mail.mydomain.com...done.
Creating domain mydomain.com...done.
Setting default domain name...done.
Creating domain mydomain.com...already exists.
Creating admin account admin@mydomain.com...done.
Creating root alias...done.
Creating postmaster alias...done.
Creating user spam.rwbsv81z8o@mydomain.com...done.
Creating user ham.tnyvjvcvlt@mydomain.com...done.
Creating user virus-quarantine.knuolbvduy@mydomain.com...done.
Setting spam training and Anti-virus quarantine accounts...done.
Initializing store sql database...done.
Setting zimbraSmtpHostname for mail.mydomain.com...done.
Configuring SNMP...done.
Checking for default IM conference room...not present.
Initializing default IM conference room...done.
Setting up syslog.conf...done.
 
You have the option of notifying Zimbra of your installation.
This helps us to track the uptake of the Zimbra Collaboration Suite.
The only information that will be transmitted is:
        The VERSION of zcs installed (7.0.0_GA_3077_CentOS5)
        The ADMIN EMAIL ADDRESS created (admin@mydomain.com)
 
Notify Zimbra of your installation? [Yes] No
Notification skipped
Starting servers...done.
Installing common zimlets...
        com_zimbra_social...done.
        com_zimbra_dnd...done.
        com_zimbra_srchhighlighter...done.
        com_zimbra_attachcontacts...done.
        com_zimbra_adminversioncheck...done.
        com_zimbra_date...done.
        com_zimbra_email...done.
        com_zimbra_attachmail...done.
        com_zimbra_phone...done.
        com_zimbra_cert_manager...done.
        com_zimbra_linkedin...done.
        com_zimbra_bulkprovision...done.
        com_zimbra_webex...done.
        com_zimbra_url...done.
Finished installing common zimlets.
Restarting mailboxd...done.
Setting up zimbra crontab...done.
 
Moving /tmp/zmsetup.03082011-121509.log to /opt/zimbra/log
 
Configuration complete - press return to exit
 
The installation has completed. Try to browse to the server either via its hostname of IP address on port 7071 and use HTTPS, e.g https://mail.mydomain.com:7071/


2 comments:

  1. good tutorials but it's from script how can i configure it manually

    ReplyDelete
    Replies
    1. any idea how to add secondary the another users mailbox in zimbra and how to get permission with knowing the users

      Delete