Enjoy Slackware 15.0!
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anterior Revisión previa Próxima revisión | Revisión previa | ||
es:howtos:network_services:postfix_with_cyrus [2019/02/16 15:39 (UTC)] pedro.herrero [Making Slackware Mail Server] |
es:howtos:network_services:postfix_with_cyrus [2019/02/16 16:38 (UTC)] pedro.herrero Finished. Comments and corrections welcome |
||
---|---|---|---|
Línea 1: | Línea 1: | ||
- | <note important> | + | ====== Creación de un servidor de correo Slackware ====== |
+ | Este artículo muestra cómo hacer de una máquina Slackware su servidor de correo personal. Este HOWTO es para Slackware 64 13.37, pero con pocos cambios puedes adaptarlo al miembro más nuevo de la familia Slackware 14. | ||
- | ====== Creación | + | Antes de empezar debo decir que se necesita una instalación normal de Slackware, sin ningún paquete especial. Los paquetes que necesitaremos para crear el servidor de correo |
- | This article shows how to make an Slackware machine your personal Mail Server. This howto is for Slackware 64 13.37, but with few changes you can adapt it to the newest member of Slackware familly Slackware 14. | + | Comencemos entonces, necesitaremos instalar Cyrus-SASL, Postfix, Cyurs-IMAP y luego configurarlos todos para que usen certificados para encriptar los paquetes de correo que atraviesan Internet. |
- | Before we begin I must say that you need a normal installation of Slackware, without any special packages. The packages we will need to make the Mail Server we will manually download and install from Slackbuilds.org. I preffer the Cyrus SASL authentication method and Cyrus IMAP for remote login, insted of other alternatives like qpopper or dovecot. | ||
- | Let's get started then , we will need to install Cyrus-SASL, Postfix, Cyurs-IMAP and then configure them all to use Certificates for encrypting the mail packages that traverse the Internet. | ||
- | ====== | + | ====== |
Línea 24: | Línea 23: | ||
# joe cyrus-sasl.SlackBuild | # joe cyrus-sasl.SlackBuild | ||
| | ||
- | and add the following lines after " | + | y añada las siguientes líneas después de " |
| | ||
--enable-plain \ | --enable-plain \ | ||
Línea 33: | Línea 32: | ||
- | ====== | + | ====== |
# cd /tmp | # cd /tmp | ||
Línea 48: | Línea 47: | ||
# joe postfix.Slackbuild | # joe postfix.Slackbuild | ||
| | ||
- | Edit the following line and replace | + | Edite la siguiente línea y sustituya |
SASL=${SASL: | SASL=${SASL: | ||
| | ||
- | In order to begin Postfix | + | Para comenzar la instalación de Postfix |
# groupadd -g 200 postfix | # groupadd -g 200 postfix | ||
Línea 60: | Línea 59: | ||
# installpkg / | # installpkg / | ||
- | Before we continue with installation of IMAP server we need to assure that Postfix | + | Antes de continuar con la instalación del servidor |
- | First of all we need to make our aliases and tell Postfix | + | En primer lugar tenemos que hacer nuestros alias y decirle a Postfix |
# joe / | # joe / | ||
| | ||
- | Edit these lines and make them look like this : | + | Edite estas líneas y haga que tengan el siguiente aspecto: |
alias_maps = hash:/ | alias_maps = hash:/ | ||
alias_database = hash:/ | alias_database = hash:/ | ||
| | ||
- | Now let's add a user to the Slackware | + | Ahora vamos a añadir un usuario a la máquina |
# adduser | # adduser | ||
| | ||
Login name for new user []: slackware_user | Login name for new user []: slackware_user | ||
- | User ID (' | + | User ID (' |
Initial group [ users ]: 200 | Initial group [ users ]: 200 | ||
- | Home directory [ / | + | Home directory [ / |
Shell [ /bin/bash ]: /bin/false | Shell [ /bin/bash ]: /bin/false | ||
Do you wish to change the sheel? (Y/n): n | Do you wish to change the sheel? (Y/n): n | ||
- | Expiry date (YYYY-MM-DD) []: press ENTER | + | Expiry date (YYYY-MM-DD) []: pulse ENTER |
- | | + | |
| | ||
- | Now edit / | + | Ahora edite / |
root : | root : | ||
office: | office: | ||
| | ||
- | Now update your aliases database issuing the command | + | Ahora actualice su base de datos de alias con el comando..: |
# postalias hash:/ | # postalias hash:/ | ||
- | It is now time to make our important configurations for Postfix | + | Ahora es el momento de hacer nuestras configuraciones importantes para Postfix |
# joe / | # joe / | ||
- | myhostname = mx.yourdomain.tld | + | myhostname = mx.tudominio.tld |
- | mydomain = yourdomain.tld | + | mydomain = tudominio.tld |
myorigin = $mydomain | myorigin = $mydomain | ||
inet_interfaces = all | inet_interfaces = all | ||
mydestination = $myhostname, | mydestination = $myhostname, | ||
mynetworks = 127.0.0.0/8 | mynetworks = 127.0.0.0/8 | ||
- | Let's now configure | + | Ahora configuremos |
# mkdir /etc/sasl2 | # mkdir /etc/sasl2 | ||
# cd /etc/sasl2 | # cd /etc/sasl2 | ||
Línea 108: | Línea 107: | ||
pwcheck_method: | pwcheck_method: | ||
mech_list: PLAIN LOGIN | mech_list: PLAIN LOGIN | ||
- | Now let's configure | + | Ahora vamos a configurar |
smtpd_sasl_auth_enable = yes | smtpd_sasl_auth_enable = yes | ||
broken_sasl_auth_clients = yes | broken_sasl_auth_clients = yes | ||
smtpd_recipient_restrictions = permit_mynetworks, | smtpd_recipient_restrictions = permit_mynetworks, | ||
- | Let's start the daemons and test our configurations until now: | + | Iniciemos los demonios y probemos nuestras configuraciones hasta ahora: |
# saslauthd -a shadow | # saslauthd -a shadow | ||
# postfix start | # postfix start | ||
- | Then from another machine | + | Luego, desde otra máquina haga telnet |
# telnet mx.mailserver.com 25 | # telnet mx.mailserver.com 25 | ||
ehlo user.mailserver.tld | ehlo user.mailserver.tld | ||
Línea 140: | Línea 139: | ||
250 2.0.0 Ok: queued as 4C0EE221E93 | 250 2.0.0 Ok: queued as 4C0EE221E93 | ||
QUIT | QUIT | ||
- | < | + | < |
- | <note important> | + | <note important> |
- | ====== | + | ====== |
# cd /tmp | # cd /tmp | ||
Línea 171: | Línea 170: | ||
# / | # / | ||
# su - root | # su - root | ||
- | Edit / | + | Edite / |
sasl_mech_list: | sasl_mech_list: | ||
allowplaintext: | allowplaintext: | ||
- | Edit / | + | Edite el archivo |
mailbox_transport = lmtp: | mailbox_transport = lmtp: | ||
- | The last step to do is to add users to your imap server. For that you need to issue these commands | + | El último paso es añadir usuarios a su servidor |
# passwd cyrus | # passwd cyrus | ||
- | and add a password for cyrus user | + | y añada una contraseña para el usuario |
# cyradm --user cyrus --server localhost --auth plain | # cyradm --user cyrus --server localhost --auth plain | ||
localhost> | localhost> | ||
localhost> | localhost> | ||
localhost> | localhost> | ||
- | < | + | < |
- | At this point we have an functional Mail Server but with users authenticating in plain text . So the next step is innevitabile. | + | En este punto tenemos un servidor de correo funcional pero con usuarios identificándose en texto plano. Así que el siguiente paso es inevitable. |
- | ====== SSL / TLS Postfix | + | ====== SSL / TLS en Postfix |
- | Let's start by creating our certificates and configuring | + | Comencemos por crear nuestros certificados y configurar |
# cd /etc/ssl | # cd /etc/ssl | ||
- | # misc/CA.pl -newca ( complete | + | # misc/CA.pl -newca ( complete |
# openssl req -new -nodes -keyout mailkey.pem -out mailreq.pem -days 36500 | # openssl req -new -nodes -keyout mailkey.pem -out mailreq.pem -days 36500 | ||
# openssl ca -out mail_signed_cert.pem -infiles mailreq.pem | # openssl ca -out mail_signed_cert.pem -infiles mailreq.pem | ||
Línea 198: | Línea 197: | ||
# chmod 400 / | # chmod 400 / | ||
# cp / | # cp / | ||
- | Now add the followings to / | + | Ahora agregue lo siguiente a / |
smtpd_use_tls = yes | smtpd_use_tls = yes | ||
smtpd_tls_key_file = / | smtpd_tls_key_file = / | ||
smtpd_tls_cert_file = / | smtpd_tls_cert_file = / | ||
smtpd_tls_CAfile = / | smtpd_tls_CAfile = / | ||
- | <note important> | + | <note important> |
| | ||
-o smtpd_tls_wrappermode=yes | -o smtpd_tls_wrappermode=yes | ||
-o smtpd_sasl_auth_enable=yes | -o smtpd_sasl_auth_enable=yes | ||
</ | </ | ||
- | Now let's configure | + | Ahora vamos a configurar |
# openssl req -new -nodes -out req.pem -keyout key.pem | # openssl req -new -nodes -out req.pem -keyout key.pem | ||
# openssl rsa -in key.pem -out new.key.pem | # openssl rsa -in key.pem -out new.key.pem | ||
Línea 221: | Línea 220: | ||
# echo tls_key_file: | # echo tls_key_file: | ||
| | ||
- | ====== | + | ====== |
| | ||
- | Now the last step is to add all daemons to rc.local | + | Ahora el último paso es añadir todos los demonios a rc.local |
- | # Starting | + | # Iniciando el demonio |
if [ ! -r / | if [ ! -r / | ||
echo " | echo " | ||
Línea 230: | Línea 229: | ||
fi | fi | ||
- | # Starting | + | # Iniciando el demonio |
if [ -x / | if [ -x / | ||
echo " | echo " | ||
Línea 236: | Línea 235: | ||
fi | fi | ||
- | # Starting | + | # Iniciando el demonio |
/ | / | ||
Línea 243: | Línea 242: | ||
- | ====== | + | ====== |
Postfix The Definitive Guide, Kyle D. Dent, O' | Postfix The Definitive Guide, Kyle D. Dent, O' | ||
Managing IMAP, Dianna Mullet & Kevin Mullet, O' | Managing IMAP, Dianna Mullet & Kevin Mullet, O' | ||
- | | + | |
{{tag> | {{tag> | ||
+ | |||
+ | Traducido por --- // |