[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previaPróxima revisiónAmbos lados, revisión siguiente | ||
es:howtos:network_services:postfix_with_cyrus [2019/02/16 15:45 (UTC)] – [Creación de un servidor de correo Slackware] pedro.herrero | es:howtos:network_services:postfix_with_cyrus [2019/02/16 16:34 (UTC)] – [Creación de un servidor de correo Slackware] pedro.herrero | ||
---|---|---|---|
Línea 11: | Línea 11: | ||
</ | </ | ||
- | Este artículo muestra cómo hacer de una máquina Slackware su servidor de correo personal. Este cómo es para Slackware 64 13.37, pero con pocos cambios puedes adaptarlo al más nuevo miembro | + | 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 |
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 los descargaremos e instalaremos manualmente desde Slackbuilds.org. Prefiero el método de autenticación Cyrus SASL y Cyrus IMAP para el inicio de sesión remoto, en lugar de otras alternativas como qpopper o dovecot. | 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 los descargaremos e instalaremos manualmente desde Slackbuilds.org. Prefiero el método de autenticación Cyrus SASL y Cyrus IMAP para el inicio de sesión remoto, en lugar de otras alternativas como qpopper o dovecot. | ||
- | Comencemos entonces, necesitaremos instalar Cyrus-SASL, Postfix, Cyurs-IMAP y luego configurarlos todos para que usen Certificados | + | Comencemos entonces, necesitaremos instalar Cyrus-SASL, Postfix, Cyurs-IMAP y luego configurarlos todos para que usen certificados |
- | ====== | + | ====== |
Línea 33: | Línea 33: | ||
# 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 42: | Línea 42: | ||
- | ====== | + | ====== |
# cd /tmp | # cd /tmp | ||
Línea 57: | Línea 57: | ||
# 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 69: | Línea 69: | ||
# installpkg / | # installpkg / | ||
- | Before we continue with installation of IMAP server we need to assure that Postfix is working and we can authenticate with sasl. Let's make some basic Postfix configuration and some basic SASL configuration. I will be explaining plain auth because later on we will use it togheter with SASL to authenticate. | + | <del>Before we continue with installation of IMAP server we need to assure that Postfix is working and we can authenticate with sasl. Let's make some basic Postfix configuration and some basic SASL configuration. I will be explaining plain auth because later on we will use it togheter with SASL to authenticate.</ |
- | First of all we need to make our aliases and tell Postfix to use aliases maps from / | + | Antes de continuar con la instalación del servidor IMAP necesitamos asegurarnos de que Postfix funciona y que podemos identificarnos con sasl. Vamos a hacer una configuración básica de Postfix y una configuración básica de SASL. Estaré explicando la identificación simple porque más tarde la usaremos junto con SASL para identificarnos. |
+ | |||
+ | <del>First of all we need to make our aliases and tell Postfix to use aliases maps from / | ||
+ | |||
+ | En primer lugar tenemos que hacer nuestros alias y decirle a Postfix que utilice los mapas de alias de / | ||
# joe / | # joe / | ||
| | ||
- | Edit these lines and make them look like this : | + | Edita estas líneas y haz 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 117: | Línea 121: | ||
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 149: | Línea 153: | ||
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 180: | Línea 184: | ||
# / | # / | ||
# 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 207: | Línea 211: | ||
# 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 230: | Línea 234: | ||
# 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 239: | Línea 243: | ||
fi | fi | ||
- | # Starting | + | # Iniciando el demonio |
if [ -x / | if [ -x / | ||
echo " | echo " | ||
Línea 245: | Línea 249: | ||
fi | fi | ||
- | # Starting | + | # Iniciando el demonio |
/ | / | ||
Línea 252: | Línea 256: | ||
- | ====== | + | ====== |
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 --- // |