-
Instalar y configurar Stalwart Mail Server
Ejecutamos el script oficial de instalación como root:
cd /tmp curl --proto '=https' --tlsv1.2 -sSf https://get.stalw.art/install.sh -o install.sh sh install.sh
Miramos cual es el password auto-generado para el usuario admin:
journalctl -u stalwart -n 200 | grep -A8 'bootstrap mode' | grep 'assword:'
Nos saldrá algo como:
may 18 01:27:58 lxcpruebas stalwart[551]: password: czKs3nNZgy9XMJED
Nos conectamos a la URL del servidor, que es:
http://IPDelDebian:8080/admin
- Usuario: admin
- Contraseña (en este caso): czKs3nNZgy9XMJED
Página 1:
- Server Hostname: mail.dominio.com
- Default Email Domain: dominio.com
- Automatically Obtain TLS Certificate: Activado
- Generate Email Signing Keys: Activado
Motivo: mail.dominio.com es el nombre público del servidor SMTP/IMAP/HTTPS, pero las cuentas serán del dominio dominio.com. El MX de dominio.com apuntará a mail.dominio.com. Stalwart usa el hostname para saludos SMTP, certificados TLS y URLs públicas y usa el dominio por defecto para crear cuentas tipo usuario@dominio.com.
Página 2:
- Main Data Storage: RocksDB
- Path: /opt/stalwart/data
- Min blob size: 16,44 KB
- Write buffer size: 128 MB
- Thread Pool Size: vacío
- Attachment & File Storage: Use data store
- Full-Text Search Index: Use data store
- Cache & Temporary Data: Use data store
Página 3:
- Directory Type: Use the internal directory
Página 4:
- Log Destination: Log file
- Path: /opt/stalwart/logs/
- Prefix: stalwart
- Rotate frequency: Daily
- Use ANSI colors: OFF
- Multiline entries: OFF
- Enable this tracer: ON
- Logging level: Info
- Lossy mode: OFF
- Filtering mode: Exclude the specified events
- Events: vacío
Página 5:
- DNS Server Type: Manual DNS server management
Le damos al botón «Finish setup» y nos aparecerá un mensaje que dice:
- The email address of administrator, generated by the server: admin@dominio.com
- The password for the administrator account, generated by the server: Mo2XWz3pWYIUIAcY
Entonces, ya nos podremos loguear correctamente en
http://IPDelDebian:8080/admin
…con las credenciales
- Usuario: admin@dominio.com
- Contraseña: Mo2XWz3pWYIUIAcY
…y ya podremos configurar cosas. Entre las primeras:
Settings > Network > HTTP > General
- Obtain remote IP from Forwarded header: Activado
Settings > Network > General > Proxy
- Trusted Networks: La dirección IP con /32 desde la que el router llega a Stalwart o del host de haproxy
Settings > Network > Listeners
- http
– The addresses the listener will bind to: Agregar [::]:11080 y borrar [::]:8080 - https
– The addresses the listener will bind to: Agregar [::]:11443 y borrar [::]:443
Sections > Account:
Locale: Spanish locale for Spain with Euro
Time Zone: Europe/madrid
Los hacks de hacks4geeks son minitutoriales rápidos pensados para geeks con conocimiento informático avanzado. Si no entiendes o no consigues ejecutar un hack de esta web considera suscribirte a Premium para solicitar asistencia sobre el mismo.