Probando postfix en Centos 5.5 Parte 4 + webmail

*.Vamos a ver como hacer para utilizar un MUA.*

Antes de comenzar tendremos que elegir entre IMAP y POP3
En nuestro caso voy a elegir IMAP.

Como ya teniamos toda la parte de la encriptacion configurada no tenemos que tocar demasiado en nuestros archivos de configuracion dovecot y main.cf.

Primero vamos a editar /etc/dovecot.conf

# Protocols we want to be serving: imap imaps pop3 pop3s
# If you only want to use dovecot-auth, you can set this to "none".
#protocols = imap imaps pop3 pop3s
protocols = imaps

Habilitamos protocols con imap

Luego Habilitamos las llaves que ya habiamos creado antes o creamos unas nuevas:

[root@mail private]# openssl req -x509 -nodes -newkey rsa:1024 -days 3650 -out dovecot.cert -keyout dovecot.key
Generating a 1024 bit RSA private key
...................++++++
..++++++
writing new private key to 'dovecot.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:AR
State or Province Name (full name) [Berkshire]:BS
Locality Name (eg, city) [Newbury]:CAMPANA
Organization Name (eg, company) [My Company Ltd]:ITRESTAURACION
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:mail.villadalmine.com
Email Address []:postmaster@villadalmine.com
[root@mail private]#
# PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
# dropping root privileges, so keep the key file unreadable by anyone but
# root. Included doc/mkcert.sh can be used to easily generate self-signed
# certificate, just make sure to update the domains in dovecot-openssl.cnf
#ssl_cert_file = /etc/pki/dovecot/certs/dovecot.pem
ssl_cert_file = /etc/pki/dovecot/private/mail.villadalmine.cert
ssl_key_file = /etc/pki/dovecot/private/mail.villadalmine.key
#ssl_key_file = /etc/pki/dovecot/private/dovecot.pem

Luego esta otra

# Disable LOGIN command and all other plaintext authentications unless
# SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP
# matches the local IP (ie. you're connecting from the same computer), the
# connection is considered secure and plaintext authentication is allowed.
#disable_plaintext_auth = no
disable_plaintext_auth = yes

Ahora lo referido a nuestro mailbox

#
# See doc/wiki/Variables.txt for full list. Some examples:
#
   mail_location = maildir:~/Maildir

Luego restarteamos

[root@mail private]# service postfix restart
Shutting down postfix: [ OK ]
Starting postfix: [ OK ]
[root@mail private]#

Ahora tendriamos que probarlo con nuestro MUA thunderbird o evolution o el que quieran.

Bueno ahora una imagen vale mas que mil palabras 🙂

Bueno con esto ya tenemos nuestro correo andando ..
Ahora probemos instalar squirrelmail para que chequen su mail por la web.

http://www.linuxmail.info/squirrelmail-webmail-setup-howto-in-centos-5/

Ahora:
[root@mail opt]# cd /usr/share/squirrelmail/config/
[root@mail config]# ./conf.pl

Luego hay que completar los datos con los campos que requerimos e ir la navegador con el link que nos indica cuanod termina.

Presten atencion como se configura :
SquirrelMail Configuration : Read: config.php (1.4.0)
———————————————————
Server Settings

General
——-
1. Domain : villadalmine.com
2. Invert Time : false
3. Sendmail or SMTP : SMTP

IMAP Settings
————–
4. IMAP Server : mail.villadalmine.com
5. IMAP Port : 993
6. Authentication type : login
7. Secure IMAP (TLS) : true
8. Server software : uw
9. Delimiter : /

B. Update SMTP Settings : mail.villadalmine.com:25
H. Hide IMAP Server Settings

R Return to Main Menu
C Turn color off
S Save data
Q Quit

Command >> B

SquirrelMail Configuration : Read: config.php (1.4.0)
———————————————————
Server Settings

General
——-
1. Domain : villadalmine.com
2. Invert Time : false
3. Sendmail or SMTP : SMTP

SMTP Settings
————-
4. SMTP Server : mail.villadalmine.com
5. SMTP Port : 25
6. POP before SMTP : false
7. SMTP Authentication : none
8. Secure SMTP (TLS) : false
9. Header encryption key :

A. Update IMAP Settings : mail.villadalmine.com:993 (uw)
H. Hide SMTP Settings

R Return to Main Menu
C Turn color off
S Save data
Q Quit

Command >>

Reinicien el servicio de httpd.
Entren a la pagina pero por https –> https://mail.villadalmine.com/webmail

Acepten el certificado.

Luego tenemos que configurar nuestro apache para que no tenga que poner /webmail

[root@mail squirrelmail]# tail -n 30 /etc/httpd/conf/httpd.conf

NameVirtualHost *:443
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#

<VirtualHost *:443>
# ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /usr/share/squirrelmail
ServerName mail.villadalmine.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

Miren como quedaria:

Nos quedaria ver antispam y un antivirus en la proxima entrega.

Saludos

One thought on “Probando postfix en Centos 5.5 Parte 4 + webmail

Leave a Reply