CentOS 6 – serveur de messagerie Zimbra

!! Article en cours de rédaction !!

Prérequis :
Une installation de CentOS6

Dans l’exemple :
le domaine a pour nom : mondomaine.fr
la machine qui fait tourner zimbra se nomme : zimbra

Disk Partitioning Setup
The disk partition should be set up as follows:
•The Mount Point/RAID Volume size for the Boot partition (/)should be 100MB.
•The Swap partition should be set to twice the size of the RAM on yourmachine.
•The Root partition (/) should be set with the remaining disk space size.


Network Configuration>Network Devices>Hostname should be configured manually with the fully qualified hostname [ mailhost.example.com] of the Zimbra server.
Enter the Gateway and Primary DNS addresses.

Installer les prérequis à Zimbra :

yum install nc libidn gmp openssh-client ntp perl sysstat

Configurer les DNS (MX et A) pour le domaine et sur le réseau local

Important:
Configurer le fichier /etc/hosts : IP FQDN hostname
Make sure that FQDN entry in /etc/hosts appears before the hostnames. If this is missing, the creation of the Zimbra certificate fails. The FQDN entry should look like the following example. For more information, see zmcreatecert in the Zimbra Collaboration Server, Administrator’s Guide, Appendix A: Command-Line Utilities.
127.0.0.1 localhost.localdomain localhost
your.ip.address FQDN yourhostname

Firewall Configuration should be set to No firewall , and the Security Enhanced Linux (SELinux) should be disabled.
Désactiver le firewall
sudo chkconfig iptable off

Important:
You will need to disable Sendmail in order to run the Zimbra Collaboration Server. You can disable the Sendmail service with these commands:
chkconfig sendmail off
service sendmail stop.

Supprimer postfix ou au moins l’arrêter
sudo chkconfig postfix off
ou sudo yum remove postfix ( à essayer)

Configurer ntp pour se synchroniser avec le serveur :
Ajout d’une ligne « server address_de_mon_serveur_ntp_local » au fichier
Démarrage et configuration du démarrage automatique du service.
sudo service ntpd start
sudo chkconfig ntpd on

Installer le split DNS

sudo yum install dnsmasq
Modifier le fichier « /etc/dnsmasq.conf »

Si les serveurs DNS « maitre » sont 8.8.8.8 et 208.67.222.222. Ajouter seulement ces lignes au fichier de configuration:
server=8.8.8.8
server=208.67.222.222
domain=yourdomain.com
mx-host=yourdomain.com,zimbra.yourdomain.com,5
listen-address=127.0.0.1

Modifier le fichier « /etc/hosts »
La ligne de loopback devrait ressembler à ceci :
127.0.0.1 localhost.localdomain localhost

Il faut une ligne pour la résolution de l’adresse IP de zimbra.yourdomain.com avec l’adresse IP privé du serveur Zimbra :
192.168.1.30 zimbra.yourdomain.com zimbra

Modifier le fichier « /etc/resolv.conf »
Pour avoir une résolution à travers dnsmasq, il faut définir le localhost (127.0.0.1) dans nameserver
search yourdomain.com
nameserver 127.0.0.1

Redémarrer dnsmasq
/etc/init.d/dnsmasq restart

Vérifier si tous fonctionne :
Sur le serveur Zimbra :

dig yourdomain.com mx
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> yourdomain.com mx
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20907 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 2 ;; QUESTION SECTION: ;yourdomain.com. IN MX ;; ANSWER SECTION: yourdomain.com. 7200 IN MX 30 zimbra.yourdomain.com. ;; ADDITIONAL SECTION: zimbra.yourdomain.com. 7200 IN A 192.168.1.30 ;; Query time: 4 msec ;; SERVER: 192.168.1.10#53(192.168.1.10) ;; WHEN: Thu Jul 15 14:38:48 2010 ;; MSG SIZE rcvd: 140 dig yourdomain.com any ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> yourdomain.com any
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36845 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 4 ;; QUESTION SECTION: ;yourdomain.com. IN ANY ;; ANSWER SECTION: yourdomain.com. 7200 IN NS ns1.yourdomain.com. yourdomain.com. 7200 IN A 192.168.1.30 yourdomain.com. 7200 IN SOA yourdomain.com. admin. 2010051304 10800 3600 1814400 7200 yourdomain.com. 7200 IN MX 10 zimbra.yourdomain.com. yourdomain.com. 7200 IN NS ns2.yourdomain.com. ;; ADDITIONAL SECTION: zimbra.yourdomain.com. 7200 IN A 192.168.1.30 ns2.yourdomain.com. 7200 IN A 192.168.1.11 ns1.yourdomain.com. 7200 IN A 192.168.1.10 ;; Query time: 11 msec ;; SERVER: 192.168.1.10#53(192.168.1.10) ;; WHEN: Thu Jul 15 14:38:52 2010 ;; MSG SIZE rcvd: 367 host $(hostname) zimbra.yourdomain.com has address 192.168.1.30 NOTE: la commande host $(hostname) doit être taper exactement comme vous la voyez, ne pas changer le mot "hostname" par autre chose. Télécharger Zimbra. Pour la version NE : Acheter un licence ou demander une licence d'essai. Copier le fichier de licence et le fichier d'installation sur le serveur Sur la machine client qui a télécharger les fichiers : scp mon_fichier_source mon_utilisateur@mon_serveur:/mon_repertoire/de_destination sur le serveur, en tant que root, décompresser le fichier : tar xzvf zcs-...tgz Aller dans le répertoire zcs-... et lancer l'installation de Zimbra : ./install.sh --> voir la doc pdf d’installation

At this point, the
Main menu
displays showing the default entries for the
Zimbra component you are installing. To expand the menu to see the
configuration values, type
X
and press
Enter
. The Main menu expands to
display configuration details for the package being installed. Values that
require further configuration are marked with asterisks (
****
) to their left.
To navigate the Main menu, select the menu item to change. You can
modify any of the defaults. See Main Menu Options on page 12, for a
description of the Main menu.
For a quick installation, accepting all the defaults, you only need to do the
following:
8.
If your time zone is not Pacific time, enter
1
to select
Main menu 1,
Common Configuration and then enter 6 for TimeZone
. Set the correct time zone
Type
r
to return to the Main menu.
10.
Enter
3
to select
zimbra-store
from the Main menu. The Store
configuration menu displays.
11.
Select the following from the store configuration menu:

Type
4
and type the admin password. The password must be six or
more characters. Press
Enter
.

Type < #> for License filename
and type the directory and file name for
the Zimbra license. For example, if you saved to the tmp directory, you
would type
/tmp/ZCSLicense.xml
. If you do not have the license, you
cannot proceed. See Zimbra License Requirements for ZCS Network
Edition on page 9.

Enable version update checks
and
Enable version update notifications
are set to TRUE. ZCS automatically checks for the latest ZCS software
updates and notifies the account that is configured in
Version update
notification email
. You can modify this later from the administration console

Type
r
to return to the Main menu.
13.
If you want to change the default Class of Service settings for new
features that are listed here, type
10 for Default Class of Service
Configuration
. Then type the number for the feature to be enabled or
disabled. Changes you make here are reflected in the default COS
configuration.
14.
If no other defaults need to be changed, type
a
to apply the configuration
changes. Press
Enter.

Verify Zimbra Server Operation
When Configuration complete appears, the installation is finished and the server has been started.
To verify that the server is running:
1.Type su – zimbra.
2.Type zmcontrol status .
The services status information is displayed. All services should be running.
Note:
If services are not running, type
zmcontrol start

See the Zimbra Collaboration Server Administrator’s Guide, Appendix A:
Command-Line Utilities for more
zmcontrol
commands.
The installation is complete and the servers are started. You can start adding
account

Set up the ssh keys.
To populate the ssh keys, as Zimbra user (
su-zimbra
).
Type
zmupdateauthkeys
and press
Enter
. The key is updated on
/opt/zimbra/.ssh/authorized_keys
.
Enabling Server Statistics Display.
In order for the server statistics to display on the administration console, the syslog configuration files must be modified.
1. As root, type /opt/zimbra/libexec/zmsyslogsetup. This enables the server to display statistics.
2. You must enable syslog to log statistics from remote machines.
a. Edit the /etc/sysconfig/syslog file, add -r to the SYSLOGD_OPTIONS setting,
SYSLOGD_options=”-r -m 0”
b. Stop the syslog daemon. Type /etc/init.d/syslog stop
c. Start the syslog daemon. Type /etc/init.d/syslog start

Note:
On DEBIAN AND UBUNTU, step 2 is as follows
a. Edit the /etc/default/syslogd file, add -r to the SYSLOGD_OPTIONS setting,
SYSLOGD_options=”-r -m 0”
b. Stop the syslog daemon. Type /etc/init.d/sysklogd stop
c. Start the syslog daemon. Type /etc/init.d/sysklogd start

syslogd
-r This option will enable the facility to receive message from the
network using an internet domain socket with the syslog service
(see services(5)). The default is to not receive any messages
from the network.

This option is introduced in version 1.3 of the sysklogd pack-
age. Please note that the default behavior is the opposite of
how older versions behave, so you might have to turn this on.

rsyslogd

Provisioning Accounts
Once the mailbox server is running, open your browser, enter the
administration console URL and log on to the console to provision email
accounts. The administration console URL is entered as:
https://[mailhost.example.com]:7071
Note:
To go to the administration console, you must type
https
, even if you
configured the Web server mode as
HTTP
.
The first time you log on, a warning may be displayed stating the connection is
untrusted. This only applies the first time you log in. Click
I understand the
Risks
to be able to connect to the Zimbra administration console. Then click
OK
.
Enter the admin user name and password configured during the installation
process. Enter the name as admin@mailhost.example.com
.
Activate the ZCS license
After you log on, a dialog displays stating your license is not activated. Go to
Global Settings>License
and click
Activate License
on the toolbar. Click
OK
to
continue.
Provision accounts
You can configure one account at a time with the New Account Wizard or you
can create many accounts at once using the Account Migration Wizard.
Configuring One Account
The administration console New Account wizard steps you through the
account information to be completed.
From the administration console Home page’s Content pane, go to
Add
Accounts
.
Note:
Four accounts are listed: admin account, two spam training
accounts, and a global Documents account. These accounts do not
need any additional configuration.
2.
Click
Add Account
. The first page of the
New Account wizard
opens.
3.
Enter the account name to be used as the email address and the last
name. This the only required information to create an account.
4.
You can click
Finish
at this point, and the account is configured with the
default COS and global features.
To configure aliases, forwarding addresses, and specific features for this
account, proceed through the dialog before you click
Finish
.
When the accounts are provisioned, you can send and receive emails.
Administrators Account
Initial administrative tasks when you log on for the first time may include
setting up the admin mailbox to include features, aliases, and forwarding
addresses needed for the administrator’s working environment.
Two aliases for the admin account are created during install:

Postmaster
. The postmaster address is displayed in emails that are
automatically generated from Postfix when messages cannot be sent
.
If
users reply to this address, the message is forwarded to the admin
mailbox.

Root
. This address is where notification messages from the operating
system are sent.
If you entered a notification address for AV alerts when you configured the
MTA, that is different from the default, you need to create that account in the
administration console. If you didn’t change the default during installation, the
anti-virus notification is sent directly to the admin account.

Uninstalling Zimbra Collaboration Server
To uninstall servers, run the install script -u.
1. cd to the original install directory for the zcs files.
2. Type ./install.sh -u
3. When Completely remove existing installation? is displayed, type Yes
The Zimbra servers are stopped, the existing packages, the webapp directories, and the /opt/zimbra directory are removed

Installer le dépot epel
sudo yum install wget
wget http://dl.fedoraproject.org/pub/epel/6Server/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6-8.noarch.rpm

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

*

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.