2026-04-03 21:58:35 +02:00
|
|
|
FROM alpine:3.20
|
feat: ajout Dovecot avec authentification PostgreSQL (base esymail)
Architecture :
- Base de données esymail sur PostgreSQL existant, table mailbox
(email, password BLF-CRYPT, domain, quota_mb, is_active, timestamps)
- Dovecot auth via dovecot-sql.conf : passdb + userdb en SQL
- Stockage mails en Maildir /var/mail/vhosts/%d/%n
- UID/GID 1000 (vmail) pour les fichiers mail
- Socket auth Postfix pour SASL (/var/spool/postfix/private/auth)
Fichiers :
- docker/dovecot/Dockerfile : dovecot/dovecot + dovecot-pgsql, user vmail
- docker/dovecot/dovecot.conf : protocols imap/pop3, auth SQL, logging
- docker/dovecot/dovecot-sql.conf : connexion PostgreSQL, queries
password_query/user_query/iterate_query sur table mailbox
- docker/dovecot/init-esymail.sql : CREATE DATABASE esymail, CREATE TABLE
mailbox avec index, compte test test@siteconseil.fr/test1234
Docker :
- Service dovecot sans port exposé (interne uniquement)
- Volumes dovecot-mail (Maildir) et dovecot-logs (partagé avec fail2ban)
- Dépend de database (healthcheck)
- init-esymail.sql monté dans /docker-entrypoint-initdb.d/ de PostgreSQL
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:44:45 +02:00
|
|
|
|
2026-04-03 21:58:35 +02:00
|
|
|
RUN apk add --no-cache dovecot dovecot-pop3d dovecot-pgsql
|
feat: ajout Dovecot avec authentification PostgreSQL (base esymail)
Architecture :
- Base de données esymail sur PostgreSQL existant, table mailbox
(email, password BLF-CRYPT, domain, quota_mb, is_active, timestamps)
- Dovecot auth via dovecot-sql.conf : passdb + userdb en SQL
- Stockage mails en Maildir /var/mail/vhosts/%d/%n
- UID/GID 1000 (vmail) pour les fichiers mail
- Socket auth Postfix pour SASL (/var/spool/postfix/private/auth)
Fichiers :
- docker/dovecot/Dockerfile : dovecot/dovecot + dovecot-pgsql, user vmail
- docker/dovecot/dovecot.conf : protocols imap/pop3, auth SQL, logging
- docker/dovecot/dovecot-sql.conf : connexion PostgreSQL, queries
password_query/user_query/iterate_query sur table mailbox
- docker/dovecot/init-esymail.sql : CREATE DATABASE esymail, CREATE TABLE
mailbox avec index, compte test test@siteconseil.fr/test1234
Docker :
- Service dovecot sans port exposé (interne uniquement)
- Volumes dovecot-mail (Maildir) et dovecot-logs (partagé avec fail2ban)
- Dépend de database (healthcheck)
- init-esymail.sql monté dans /docker-entrypoint-initdb.d/ de PostgreSQL
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:44:45 +02:00
|
|
|
|
|
|
|
|
RUN addgroup -g 1000 vmail && adduser -D -u 1000 -G vmail -h /var/mail vmail
|
|
|
|
|
|
2026-04-03 21:58:35 +02:00
|
|
|
RUN mkdir -p /var/log/dovecot /var/mail/vhosts /run/dovecot && \
|
feat: ajout Dovecot avec authentification PostgreSQL (base esymail)
Architecture :
- Base de données esymail sur PostgreSQL existant, table mailbox
(email, password BLF-CRYPT, domain, quota_mb, is_active, timestamps)
- Dovecot auth via dovecot-sql.conf : passdb + userdb en SQL
- Stockage mails en Maildir /var/mail/vhosts/%d/%n
- UID/GID 1000 (vmail) pour les fichiers mail
- Socket auth Postfix pour SASL (/var/spool/postfix/private/auth)
Fichiers :
- docker/dovecot/Dockerfile : dovecot/dovecot + dovecot-pgsql, user vmail
- docker/dovecot/dovecot.conf : protocols imap/pop3, auth SQL, logging
- docker/dovecot/dovecot-sql.conf : connexion PostgreSQL, queries
password_query/user_query/iterate_query sur table mailbox
- docker/dovecot/init-esymail.sql : CREATE DATABASE esymail, CREATE TABLE
mailbox avec index, compte test test@siteconseil.fr/test1234
Docker :
- Service dovecot sans port exposé (interne uniquement)
- Volumes dovecot-mail (Maildir) et dovecot-logs (partagé avec fail2ban)
- Dépend de database (healthcheck)
- init-esymail.sql monté dans /docker-entrypoint-initdb.d/ de PostgreSQL
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:44:45 +02:00
|
|
|
chown -R vmail:vmail /var/mail && \
|
2026-04-03 21:58:35 +02:00
|
|
|
chown -R dovecot:dovecot /var/log/dovecot /run/dovecot
|
feat: ajout Dovecot avec authentification PostgreSQL (base esymail)
Architecture :
- Base de données esymail sur PostgreSQL existant, table mailbox
(email, password BLF-CRYPT, domain, quota_mb, is_active, timestamps)
- Dovecot auth via dovecot-sql.conf : passdb + userdb en SQL
- Stockage mails en Maildir /var/mail/vhosts/%d/%n
- UID/GID 1000 (vmail) pour les fichiers mail
- Socket auth Postfix pour SASL (/var/spool/postfix/private/auth)
Fichiers :
- docker/dovecot/Dockerfile : dovecot/dovecot + dovecot-pgsql, user vmail
- docker/dovecot/dovecot.conf : protocols imap/pop3, auth SQL, logging
- docker/dovecot/dovecot-sql.conf : connexion PostgreSQL, queries
password_query/user_query/iterate_query sur table mailbox
- docker/dovecot/init-esymail.sql : CREATE DATABASE esymail, CREATE TABLE
mailbox avec index, compte test test@siteconseil.fr/test1234
Docker :
- Service dovecot sans port exposé (interne uniquement)
- Volumes dovecot-mail (Maildir) et dovecot-logs (partagé avec fail2ban)
- Dépend de database (healthcheck)
- init-esymail.sql monté dans /docker-entrypoint-initdb.d/ de PostgreSQL
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:44:45 +02:00
|
|
|
|
|
|
|
|
COPY dovecot.conf /etc/dovecot/dovecot.conf
|
|
|
|
|
COPY dovecot-sql.conf /etc/dovecot/dovecot-sql.conf
|
|
|
|
|
|
|
|
|
|
RUN chmod 600 /etc/dovecot/dovecot-sql.conf
|
|
|
|
|
|
|
|
|
|
EXPOSE 143 110
|
|
|
|
|
|
|
|
|
|
CMD ["dovecot", "-F"]
|