Herramientas de usuario

Herramientas del sitio


servidores:mail:mail_system_debian_stretch

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anterior Revisión previa
Próxima revisión
Revisión previa
servidores:mail:mail_system_debian_stretch [2017/01/23 02:09]
fmolinuevo [Horde Groupware Webmail]
servidores:mail:mail_system_debian_stretch [2019/05/12 00:10] (actual)
fmolinuevo [SSL/TLS]
Línea 1: Línea 1:
-====== Installing a Mail System on Debian Stretch with Postfix, Cyrus and Amavisd-new plus Horde ======+====== Installing a Mail System on Debian Stretch with Postfix, Cyrus and Amavisd-new plus Horde ======
  
 //Adaptado por Félix Molinuevo, [[fmsi>​|FMSI Sistemas de Informática]]//​ **:::** //​Actualizado:​ **20170118**//​ //Adaptado por Félix Molinuevo, [[fmsi>​|FMSI Sistemas de Informática]]//​ **:::** //​Actualizado:​ **20170118**//​
Línea 96: Línea 96:
 </​code>​ </​code>​
  
-**Because now in Wheezy /var/run is a soft link to /run, and this directory is a tmpfs, you must add these two lines to /​etc/​rc.local for mounting those directories at boot time** (more info in https://​wiki.debian.org/​ReleaseGoals/​RunDirectory).+**Because now since Wheezy /var/run is a soft link to /run, and this directory is a tmpfs, you must add these two lines to /​etc/​rc.local for mounting those directories at boot time** (more info in https://​wiki.debian.org/​ReleaseGoals/​RunDirectory).
  
 The same location is now accessable outside the chroot at /​var/​run/​saslauthd and inside the chroot at /​var/​spool/​postfix/​var/​run/​saslauthd (which postfix sees as /​var/​run/​saslauthd). This avoids editing the saslauthd init script, messing with dpkg, and creating symbolic links. The only visible side effect is an extra listing from the ''​df''​ command which doesn'​t know that the bind mount isn't an actual separate disk. The same location is now accessable outside the chroot at /​var/​run/​saslauthd and inside the chroot at /​var/​spool/​postfix/​var/​run/​saslauthd (which postfix sees as /​var/​run/​saslauthd). This avoids editing the saslauthd init script, messing with dpkg, and creating symbolic links. The only visible side effect is an extra listing from the ''​df''​ command which doesn'​t know that the bind mount isn't an actual separate disk.
Línea 131: Línea 131:
 smtp_sasl_security_options = smtp_sasl_security_options =
 smtp_sasl_password_maps = hash:/​etc/​postfix/​client_passwords smtp_sasl_password_maps = hash:/​etc/​postfix/​client_passwords
-smtp_sasl_loglevel = 2 
 </​code>​ </​code>​
  
Línea 222: Línea 221:
  
 <​code>​tlsmgr ​    ​fifo ​  ​- ​ -  n  300   ​1 ​ tlsmgr <​code>​tlsmgr ​    ​fifo ​  ​- ​ -  n  300   ​1 ​ tlsmgr
-smtps   ​inet ​  ​n ​ -  n  -  -  smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes +smtps   ​inet ​  ​n ​ -  n  -  -  smtpd 
-587     inet   ​  ​n  ​-  -  ​smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes</​code>​+  -o syslog_name=postfix/​smtps 
 +  ​-o smtpd_tls_wrappermode=yes 
 +  ​-o smtpd_sasl_auth_enable=yes 
 +submission ​inet n       ​      y             -       ​smtpd ​                                                                                                                                   
 +  -o syslog_name=postfix/​submission 
 +  ​-o ​smtpd_tls_security_level=encrypt 
 +  ​-o smtpd_sasl_auth_enable=yes 
 +</​code>​
  
 This will enable TLS, the smtps port, and the dedicated port 587 for mail submission. This will enable TLS, the smtps port, and the dedicated port 587 for mail submission.
Línea 241: Línea 247:
  
   # reindex all mailboxes (fulltext) daily   # reindex all mailboxes (fulltext) daily
-  ​squattera ​     ​cmd="/​usr/​sbin/​squatter"​ at=0517+  ​squatter_a ​     ​cmd="/​usr/​sbin/​squatter"​ at=0517
  
 This setup uses LMTP. The default socket set in the file should be fine. The line for sieve should already be uncommented,​ but check it just to be sure. Everything else in the file can stay the way it was. This setup uses LMTP. The default socket set in the file should be fine. The line for sieve should already be uncommented,​ but check it just to be sure. Everything else in the file can stay the way it was.
Línea 282: Línea 288:
  
 <​code>​service cyrus-imapd restart</​code>​ <​code>​service cyrus-imapd restart</​code>​
 +
 +At this point, you should check if Cyrus starts. If not, please check syslog file.
 +
 +If you see some error like this:
 +
 +  DBERROR: opening /​var/​lib/​cyrus/​tls_sessions.db:​ cyrusdb error
 +
 +It's because such file does not exist. Create it with the following commands:
 +
 +  touch /​var/​lib/​cyrus/​tls_sessions.db
 +  chown cyrus: /​var/​lib/​cyrus/​tls_sessions.db
 +
 +And restart Cyrus:
 +
 +  service cyrus-imapd stop ; service cyrus-imapd start
 +
 +Check again that Cyrus is started.
  
 Then, start saslauthd again. Then, start saslauthd again.
Línea 308: Línea 331:
  
   cyradm -u cyrus localhost   cyradm -u cyrus localhost
 +
 +==== Postfix and aliases file ====
  
 Additionally it's needed to add a mail alias for every mail account, because we're using users created in SASL, but not in system. So Postfix needs to know how to deliver mail. Additionally it's needed to add a mail alias for every mail account, because we're using users created in SASL, but not in system. So Postfix needs to know how to deliver mail.
Línea 575: Línea 600:
 ==== Horde Groupware Webmail ==== ==== Horde Groupware Webmail ====
  
-Horde Groupware Webmail ​is a really powerful groupware application,​ including webmail. To install it, you should follow the install guide (see bibliography)+//Warning: at the moment of writing this, 20170122, Debian Stretch is shipping just with PHP 7.0 which is not officially supported by Horde Team on Horde 5.2. So, you will need to add **-f** modifier to **pear install** commands below. As far as I can see Horde works fine anyway as noted by their developers//​ 
 + 
 +Horde Groupware Webmail ​is a really powerful groupware application,​ including webmail. To install it, you should follow the install guide (see bibliography)
  
 This is a quick and simple recipe perhaps not enough for every server: This is a quick and simple recipe perhaps not enough for every server:
  
-First, in php.ini for Apache, change the following:+First, in php.ini for Apache, change the following; modify for your needings:
  
 <​code>​date.timezone = America/​Argentina/​Buenos_Aires</​code>​ <​code>​date.timezone = America/​Argentina/​Buenos_Aires</​code>​
  
-  ​- Install PEAR+Second, add locales for the language/s you need, for example, es_ES, en_US, and so: 
 + 
 +<​code>​dpkg-reconfigure locales</​code>​ 
 + 
 +And, finally follow these steps: 
 + 
 +  ​- Install PEAR and many packages from Debian repositories:​ <​code>​ 
 +apt-get install php-pear ckeditor3 fonts-droid-fallback fonts-noto-mono ghostscript gsfonts imagemagick-6-common javascript-common libapache2-mod-php7.0 php7.0-intl php7.0-ldap php7.0-mbstring php7.0-mcrypt php7.0-soap php7.0-tidy php7.0-xmlrpc ttf-dejavu-core php7.0-gd php7.0-mysql php7.0-bz2 php7.0-cli php7.0-curl php7.0-imap ​ php7.0-intl php7.0-mcrypt</​code>​
   - Install MySQL, and configure a database and user for Horde: <​code>​   - Install MySQL, and configure a database and user for Horde: <​code>​
 +apt-get install mysql-server
 +
 # mysql -u root -p # mysql -u root -p
 CREATE DATABASE horde; CREATE DATABASE horde;
Línea 596: Línea 632:
   - Install Horde Webmail Edition: <​code>​   - Install Horde Webmail Edition: <​code>​
 pear install -a -B horde/​webmail</​code>​ pear install -a -B horde/​webmail</​code>​
-  - Run installation script: <​code>​+  - Run installation script. When asked, type "​mysqli"​ support: <​code>​
 webmail-install</​code>​ webmail-install</​code>​
   - To install Horde Groupware Edition: <​code>​   - To install Horde Groupware Edition: <​code>​
servidores/mail/mail_system_debian_stretch.1485144577.txt.gz · Última modificación: 2017/01/23 02:09 por fmolinuevo