From aa35e8568a64aa54e4371252e39d7a18a58d39e6 Mon Sep 17 00:00:00 2001 From: Mauro Torrez Date: Thu, 22 Jan 2026 13:36:43 -0300 Subject: [PATCH] Imagen intermedia para migracion de v4 a v5 (trixie) --- .gitea/workflows/build.yml | 2 +- 10-mail.conf | 6 +++--- Dockerfile | 2 +- README.md | 15 +++++++++++++++ 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index b3711a3..3629bbc 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -15,7 +15,7 @@ jobs: repo: - "eumau/dovecot" tag: - - "4" + - "4-to-5" steps: - name: Set up QEMU diff --git a/10-mail.conf b/10-mail.conf index 4fe8a52..dc38747 100644 --- a/10-mail.conf +++ b/10-mail.conf @@ -1,7 +1,7 @@ ## ## Mailbox locations and namespaces ## -mail_location = mdbox:~/dbox +mail_location = Maildir:~/maildir mail_attribute_dict = file:~/dovecot-attributes namespace inbox { @@ -287,7 +287,7 @@ mailbox_list_index = yes # this for now. # Directory root where to store mail attachments. Disabled, if empty. -mail_attachment_dir = /vmail/attachments +mail_attachment_dir = # Attachments smaller than this aren't saved externally. It's also possible to # write a plugin to disable saving specific attachments externally. @@ -297,7 +297,7 @@ mail_attachment_min_size = 64k # posix : No SiS done by Dovecot (but this might help FS's own deduplication) # sis posix : SiS with immediate byte-by-byte comparison during saving # sis-queue posix : SiS with delayed comparison and deduplication -mail_attachment_fs = sis-queue /vmail/attachments-queue:posix +mail_attachment_fs = # Hash format to use in attachment filenames. You can add any text and # variables: %{md4}, %{md5}, %{sha1}, %{sha256}, %{sha512}, %{size}. diff --git a/Dockerfile b/Dockerfile index aaad852..139aab4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,7 +54,7 @@ ENV \ LDAP_USER_FILTER="(&(objectClass=inetOrgPerson)(uid=%n))" \ LDAP_PASS_ATTRS="userPassword=password, =userdb_home=/vmail/mail/%d/%n, =userdb_uid=5000, =userdb_gid=5000" \ LDAP_PASS_FILTER="(&(objectClass=inetOrgPerson)(uid=%n))" \ - LDAP_ITERATE_ATTRS="=user=%{ldap:uid}@%d" \ + LDAP_ITERATE_ATTRS="=user=%{ldap:mail}" \ LDAP_ITERATE_FILTER="(objectClass=inetOrgPerson)" \ LDAP_DEFAULT_PASS_SCHEME=CRYPT \ SINGLE_USER= \ diff --git a/README.md b/README.md index de275ea..75a25f4 100644 --- a/README.md +++ b/README.md @@ -161,3 +161,18 @@ dovecot_antispam_pipe_program_notspam_arg: learn_ham alternativa de correo. * `dovecot_altstorage_directory` (`{{ vmail_home }}/alt-storage`): carpeta alternativa de correo. + +## Migracion de mdbox a maildir + +Decidí migrar porque el sis storage está deprecado. Adicionalmente al intentar sincronizar / hacer backup de la mdbox aparecen errores de integridad, seguramente por este storage + +``` +docker compose stop dovecot +docker run --rm -ti -v mail_mail:/vmail eumau/dovecot:4 bash +doveadm backup -f -u mauro@mau.ro Maildir:~/maildir +### repetir para todos los usuarios +exit +### Actualizar imagen a 4-to-5 +docker compose up -d +### Ahora ya deberíamos tener maildir sin attachments externos +```