Top Banner
Yerman Avila 1. Installing SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation We’ll begin by updating the system and installing SquirrelMail from the Ubuntu repositories. 1. First, make sure your system is up to date by running the following commands: 1 2 sudo apt-get update sudo apt-get upgrade 2. SquirrelMail is available in the Ubuntu repositories, so we can install it with: 1 sudo apt-get install squirrelmail Configuring the Virtual Host Since SquirrelMail is accessed through a web server (Apache in this example), we need a virtual host configuration file to let the web server know where to display files from. In this section we will take the default configuration file from SquirrelMail, move it to the Apache directory, and configure it for use on our system. 1. SquirrelMail provides a default configuration file for Apache in /etc/squirrelmail/apache.conf . Copy this configuration file into your sites- available folder with the command: 1 sudo cp /etc/squirrelmail/apache.conf /etc/apache2/sites- available/squirrelmail.conf 2. Edit the configuration file to uncomment the <VirtualHost 1.2.3.4:80> block by removing the pound symbol ( # ), as shown below. Edit the IP and ServerName to match your Linode and/or domain settings: 1 sudo nano /etc/apache2/sites-available/squirrelmail 3. /etc/apache2/sites-available/squirrelmail German Rodriguez Avila ITM
18

Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Feb 01, 2018

Download

Documents

vothu
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

1. Installing SquirrelMail on Debian 7

Installing SquirrelMail on Debian 8

Installation

We’ll begin by updating the system and installing SquirrelMail from the Ubuntu repositories.

1. First, make sure your system is up to date by running the following commands:

1

2

sudo apt-get update

sudo apt-get upgrade

2. SquirrelMail is available in the Ubuntu repositories, so we can install it with:

1 sudo apt-get install squirrelmail

Configuring the Virtual Host

Since SquirrelMail is accessed through a web server (Apache in this example), we need a virtual

host configuration file to let the web server know where to display files from. In this section we

will take the default configuration file from SquirrelMail, move it to the Apache directory, and

configure it for use on our system.

1. SquirrelMail provides a default configuration file for Apache

in /etc/squirrelmail/apache.conf. Copy this configuration file into your sites-

available folder with the command:

1

sudo cp /etc/squirrelmail/apache.conf /etc/apache2/sites-

available/squirrelmail.conf

2. Edit the configuration file to uncomment the <VirtualHost 1.2.3.4:80> block by

removing the pound symbol (#), as shown below. Edit the IP and ServerName to match your

Linode and/or domain settings:

1 sudo nano /etc/apache2/sites-available/squirrelmail

3. /etc/apache2/sites-available/squirrelmail

German Rodriguez Avila ITM

Page 2: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

Alias /squirrelmail /usr/share/squirrelmail

<Directory /usr/share/squirrelmail>

Options FollowSymLinks

<IfModule mod_php5.c>

php_flag register_globals off

</IfModule>

<IfModule mod_dir.c>

DirectoryIndex index.php

</IfModule>

# access to configtest is limited by default to prevent

information leak

<Files configtest.php>

order deny,allow

deny from all

allow from 127.0.0.1

</Files>

</Directory>

# users will prefer a simple URL like http://webmail.example.com

<VirtualHost 1.2.3.4:80>

DocumentRoot /usr/share/squirrelmail

ServerName squirrelmail.example.com

</VirtualHost>

# redirect to https when available (thanks

[email protected])

#

# Note: There are multiple ways to do this, and which one is

suitable for

# your site's configuration depends. Consult the apache

documentation if

# you're unsure, as this example might not work everywhere.

#

#<IfModule mod_rewrite.c>

# <IfModule mod_ssl.c>

# <Location /squirrelmail>

# RewriteEngine on

# RewriteCond %{HTTPS} !^on$ [NC]

# RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L]

# </Location>

# </IfModule>

#</IfModule>

4. If Apache is serving other virtual hosts you may need to adjust them and/or this file to prevent

any conflicts. If you’re running Apache solely for SquirrelMail, you may still want to remove

the default virtual host fromsites-enabled.

5. Add a symbolic link to this file in the sites-enabled folder:

Page 3: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

1

sudo ln -s /etc/apache2/sites-available/squirrelmail

/etc/apache2/sites-enabled/

6. Reload Apache with the following command:

1 sudo service apache2 reload

You should now be able to see SquirrelMail’s default login page in your browser after navigating

to your Linode’s IP address:

Configuring SquirrelMail

Before using SquirrelMail for the first time, it needs to be configured to access your mail server.

SquirrelMail provides a tool called squirrelmail-configure, which provides an interactive

interface which edits the /etc/squirrelmail/config.php file for you with the input you

provide.

1. Launch the squirrelmail-configure application with the command:

1 sudo squirrelmail-configure

2. This will bring up the menu shown below:

Page 4: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

3. 4. There are many options to adjust here; too many for the scope of this guide. The only settings

required to make SquirrelMail work are the Server Settings. Press 2 to bring up the

Server Settings submenu:

Page 5: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

5. If your mail server is on the same Linode as your SquirrelMail installation, you may not need

to make any adjustments to the default settings. Otherwise, adjust the Domain, IMAP,

andSMTP settings to match the mail server you want to connect to. You can find additional

configuration tips for this section from SquirrelMail’s official documentation here.

6. When done, press S to save your changes before exiting the menu by pressing Q to quit.

Signing In to the Web Interface

1. At this point you should be able to log in to the SquirrelMail Login page using your email

credentials. Navigate in your web browser to the Linode’s IP address, or domain name

depending on how you’ve configured the virtual host:

2. The interface layout follows standard email convention; all common functions should be

easily accessible:

Page 6: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

Page 7: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

Servidor de correo local OPENCHANGE CON ZENTYAL SERVER:

https://systal.wordpress.com/2015/01/13/servidor-de-correo-local-openchange-con-zentyal-server/

Instalar en servicio CORREO en el server zentyal:

Configuración de red: Interfaces y segmentos de red.

Cortafuegos: Zentyal bloquea por defecto las conexiones externas, por lo que tendremos que

establecer unos servicios y crear reglas a medida.

DNS: Se creará de forma automática el dominio DNS asociado a nuestro dominio Samba4.

Servicio de Correo electrónico: Configuraremos el dominio virtual de correo electrónico y las

pasarelas de IMAP/POP.

NTP: instalaremos un servidor de sincronización de tiempo.

Usuarios, Equipos y Ficheros: El directorio Samba4, que nuestro módulo OpenChange utilizará

para autenticar usuarios y como listado de cuentas de correo registradas en nuestro dominio.

OpenChange Server: módulo que proporciona la compatibilidad con clientes Microsoft

Outlook®.

OpenChange WebMail: para poder acceder al correo electrónico y groupware a través de

nuestro navegador web.

Page 8: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

Nuestras interfaces de red están configuradas. En el siguiente paso, tendremos que seleccionar el

tipo de servidor de directorio, bien servidor “stand-alone” (primer servidor del dominio) o bien

“Conectar con servidor Directorio Activo externo”, también conocido como “controlador adicional”.

Como vamos a crear el directorio y su primer servidor, seleccionaremos el modo “stand-alone”.

En el último paso de los wizards de instalación, tendremos que configurar el dominio virtual de

correo. Para el correcto funcionamiento de OpenChange, esto dominio debe coincidir con el

dominio de Samba4 que configuramos en el paso anterior, más adelante podremos dar de alta más

dominios de correo y alias.

Page 9: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

Es importante que nuestro servidor Zentyal sea el servidor DNS primario configurado en los

clientes, ya sea mediante configuración automática con el módulo DHCP, o simplemente

configuración estática/manual.

Cortafuegos

Por defecto nuestros clientes internos deberían ser capaces de acceder tanto al correo IMAP/POP

como a los puertos de MAPI/RCP con Clientes Microsoft Outlook®.

Tendremos que abrir puertos a las redes externas:

25/TCP: Para que otros servidores de correo puedan contactar con el nuestro.

80/TCP y/o 443/TCP: Para clientes externos que quieran acceder mediante Microsoft Outlook®

Anywhere.

Accedemos pues a la sección "Desde redes externas a Zentyal":

Page 10: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

Y damos acceso a los puertos mencionados:

Autoridad de certificación

El despliegue de OpenChange requiere de varios certificados, por lo que tenemos que dar de alta

una autoridad de certificación antes de configurar el módulo de OpenChange.

Tan sólo el primer campo es obligatorio

Crear un autoridad es muy sencillo, rellenando el siguiente formulario y guardando cambios:

Page 11: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

Servicio de correo electrónico

En principio, no necesitamos hacer ninguna modificación en este módulo.

Comprobaremos que el dominio virtual de correo existe y que es el mismo que tenemos en la raíz

de nuestro directorio.

Podemos desear configurar un dominio de correo externo enlazado a nuestro dominio interno, pero

no detallaremos este caso por simplicidad.

Activación módulo OpenChange

Una vez completados los pasos anteriores, tan solo debemos hacer clic en "Puesta en Marcha" y

guardar cambios, si tenemos usuarios creados previamente, nos puede interesar marcar la opción

de "Cuenta de OpenChange para todos los usuarios existentes" :

Page 12: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

Page 13: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

Plantilla de usuario

Hay un par de opciones que podemos configurar/verificar desde la plantilla de usuario

El dominio de correo por defecto asignado a los usuarios, tiene que ser el mismo que hemos

asignado para Samba4/OpenChange.

Podemos activar por defecto la cuenta de OpenChange para nuevos usuarios en el sistema.

Page 14: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

Creación de usuarios

Ya podemos crear usuarios en nuestro árbol de directorio, por defecto estos usuarios tendrán

cuenta de OpenChange.

Page 15: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

Configuración y accesso desde el cliente Microsoft Outlook®

Es posible que tengamos nuestro cliente de windows unido al dominio de Zentyal.

Lanzaremos el wizard de configuración automática, si no estamos unidos al dominio, tendremos que

introducir los siguientes credenciales. Si estamos accediendo con un usuario unido al dominio, se

autocompletará.

Page 16: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

Dado que nuestros certificados son autofirmados (no provienen de una CA globalmente

reconocida), tendremos que aceptarlos manualmente:

Page 17: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila

Tras aceptar el certificado, el servidor de correo se configurará automáticamente.

Ya tenemos nuestro cliente Microsoft Outlook® configurado:

Webmail y Microsoft Outlook® Anywhere

Una vez hayamos comprobado que nuestro despliegue de OpenChange funciona para redes

internas, tenemos principalmente dos opciones para permitir el acceso desde fuera de la oficina:

Totalmente basado en web, mediante el módulo OpenChange webmail.

MAPI/HTTP para conectar con clientes Microsoft Outlook® y Microsoft Outlook® Anywhere.

Activar el servicio de OpenChange Webmail es muy sencillo, basta con instalar y activar el módulo y

ya podremos acceder a http://<ip o hostname del servidor>/SOGo

Page 18: Installing SquirrelMail on Debian 7 Installing ... · PDF fileInstalling SquirrelMail on Debian 7 Installing SquirrelMail on Debian 8 Installation ... tipo de servidor de directorio,

Yerman Avila