serveur de messagerie Dovecot

Administration con centré . com !

Serveur Debian

Installer DOVECOT

www.dovecot.org/
sudo apt install dovecot-core dovecot-imapd dovecot-pop3d

sudo tail -f /var/log/dovecot.log
sudo systemctl restart dovecot
sudo systemctl status dovecot
sudo systemctl stop dovecot
sudo systemctl start dovecot


sudo cp /etc/dovecot/dovecot.conf  /etc/dovecot/dovecot.bak
sudo cp /etc/dovecot/conf.d/10-auth.conf /etc/dovecot/conf.d/10-auth.bak
sudo cp /etc/dovecot/conf.d/10-mail.conf /etc/dovecot/conf.d/10-mail.bak
sudo cp /etc/dovecot/conf.d/10-master.conf /etc/dovecot/conf.d/10-master.bak
sudo cp /etc/dovecot/conf.d/10-ssl.conf /etc/dovecot/conf.d/10-ssl.bak

sudo nano /etc/dovecot/dovecot.conf
!include_try /usr/share/dovecot/protocols.d/*.protocol


sudo nano /etc/dovecot/conf.d/10-auth.conf
disable_plaintext_auth = yes
auth_mechanisms = plain login


sudo nano /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Maildir



sudo nano /etc/dovecot/conf.d/10-master.conf
service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}

service pop3-login {
  inet_listener pop3 {
    port = 110
  }
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}



sudo nano /etc/dovecot/conf.d/10-ssl.conf
ssl = required
ssl_cert = </etc/ssl/certs/ssl-cert-snakeoil.pem
ssl_key = </etc/ssl/private/ssl-cert-snakeoil.key


sudo systemctl restart dovecot
sudo systemctl status dovecot


Intégration Postfix avec Postfix

sudo nano /etc/postfix/main.cf


smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options  



sudo nano  /etc/dovecot/conf.d/10-master.conf

service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0660
    user = postfix
    group = postfix
  }
}