Greetings,
On 2.3 I was able to run the following command, but now on 2.4 I'm getting the following error:
doveadm backup -u user@domain.tld maildir:/mnt/backups/daily/domain.tld/user
dsync(user@domain.tld): Error: brain M: Exporting mailbox INBOX failed: Mailbox attribute iteration failed: Mailbox attributes not enabled
So, I tried to set the configs to include:
protocol imap { imap_metadata = yes ... }
mail_attribute { dict file { path = %{home}/dovecot-attributes } }
But then I get:
Error: brain M: Exporting mailbox INBOX failed: Mailbox attribute iteration failed: BUG: Unknown internal error
Can anyone clarify the proper configs for this?
Thank you,
Asai
Here's some more debugging info in case this helps:
Feb 15 18:33:44 dsync(user@domain.tld): Debug: Mailbox INBOX: Mailbox opened Feb 15 18:33:44 dsync(user@domain.tld): Debug: brain S: Syncing mailbox 77727820079bdd584f280000773ea8bd: UIDNEXT changed: 1 -> 12170 Feb 15 18:33:44 dsync(user@domain.tld): Debug: brain M: Syncing mailbox 77727820079bdd584f280000773ea8bd: UIDNEXT changed: 12170 -> 1 Feb 15 18:33:44 dsync(user@domain.tld): Debug: doveadm-sieve: Iterating Sieve mailbox attributes Feb 15 18:33:44 dsync(user@domain.tld): Debug: sieve: Pigeonhole version 2.4.0 (1b2d5bb9) initializing Feb 15 18:33:44 dsync(user@domain.tld): Debug: Loading modules from directory: /usr/lib64/dovecot/sieve Feb 15 18:33:44 dsync(user@domain.tld): Debug: Module loaded: /usr/lib64/dovecot/sieve/lib90_sieve_imapsieve_plugin.so Feb 15 18:33:44 dsync(user@domain.tld): Debug: sieve: Sieve imapsieve plugin for Pigeonhole version 2.4.0 (1b2d5bb9) loaded Feb 15 18:33:44 dsync(user@domain.tld): Error: brain M: Exporting mailbox INBOX failed: Mailbox attribute iteration failed: Mailbox attributes not enabled Feb 15 18:33:44 dsync(user@domain.tld): Debug: brain S: Import mailbox INBOX: Saved UIDs: Feb 15 18:33:44 dsync(user@domain.tld): Debug: User session is finished Feb 15 18:33:44 dsync(user@domain.tld): Debug: auth-master: conn unix:/run/dovecot/auth-userdb (pid=56369,uid=0): Disconnected: Connection closed (fd=9)
On 2/14/2025 7:06 PM, Asai via dovecot wrote:
Greetings,
On 2.3 I was able to run the following command, but now on 2.4 I'm getting the following error:
doveadm backup -u user@domain.tld maildir:/mnt/backups/daily/domain.tld/user
dsync(user@domain.tld): Error: brain M: Exporting mailbox INBOX failed: Mailbox attribute iteration failed: Mailbox attributes not enabled
So, I tried to set the configs to include:
protocol imap { imap_metadata = yes ... }
mail_attribute { dict file { path = %{home}/dovecot-attributes } }
But then I get:
Error: brain M: Exporting mailbox INBOX failed: Mailbox attribute iteration failed: BUG: Unknown internal error
Can anyone clarify the proper configs for this?
Thank you,
Asai
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
After spending several hours troubleshooting this, it seems like doveadm backup is broken somehow. At least on my system.
I can't even run doveadm backup -u user maildir:/dest on an empty target director without it throwing an error.
Is anyone else having this problem?
Thanks, Asai
On 2/15/2025 6:36 PM, Asai via dovecot wrote:
Here's some more debugging info in case this helps:
Feb 15 18:33:44 dsync(user@domain.tld): Debug: Mailbox INBOX: Mailbox opened Feb 15 18:33:44 dsync(user@domain.tld): Debug: brain S: Syncing mailbox 77727820079bdd584f280000773ea8bd: UIDNEXT changed: 1 -> 12170 Feb 15 18:33:44 dsync(user@domain.tld): Debug: brain M: Syncing mailbox 77727820079bdd584f280000773ea8bd: UIDNEXT changed: 12170 -> 1 Feb 15 18:33:44 dsync(user@domain.tld): Debug: doveadm-sieve: Iterating Sieve mailbox attributes Feb 15 18:33:44 dsync(user@domain.tld): Debug: sieve: Pigeonhole version 2.4.0 (1b2d5bb9) initializing Feb 15 18:33:44 dsync(user@domain.tld): Debug: Loading modules from directory: /usr/lib64/dovecot/sieve Feb 15 18:33:44 dsync(user@domain.tld): Debug: Module loaded: /usr/lib64/dovecot/sieve/lib90_sieve_imapsieve_plugin.so Feb 15 18:33:44 dsync(user@domain.tld): Debug: sieve: Sieve imapsieve plugin for Pigeonhole version 2.4.0 (1b2d5bb9) loaded Feb 15 18:33:44 dsync(user@domain.tld): Error: brain M: Exporting mailbox INBOX failed: Mailbox attribute iteration failed: Mailbox attributes not enabled Feb 15 18:33:44 dsync(user@domain.tld): Debug: brain S: Import mailbox INBOX: Saved UIDs: Feb 15 18:33:44 dsync(user@domain.tld): Debug: User session is finished Feb 15 18:33:44 dsync(user@domain.tld): Debug: auth-master: conn unix:/run/dovecot/auth-userdb (pid=56369,uid=0): Disconnected: Connection closed (fd=9)
On 2/14/2025 7:06 PM, Asai via dovecot wrote:
Greetings,
On 2.3 I was able to run the following command, but now on 2.4 I'm getting the following error:
doveadm backup -u user@domain.tld maildir:/mnt/backups/daily/domain.tld/user
dsync(user@domain.tld): Error: brain M: Exporting mailbox INBOX failed: Mailbox attribute iteration failed: Mailbox attributes not enabled
So, I tried to set the configs to include:
protocol imap { imap_metadata = yes ... }
mail_attribute { dict file { path = %{home}/dovecot-attributes } }
But then I get:
Error: brain M: Exporting mailbox INBOX failed: Mailbox attribute iteration failed: BUG: Unknown internal error
Can anyone clarify the proper configs for this?
Thank you,
Asai
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
You don't necessarely enable imap_metadata for this, just having attribute dict is enough.
can you rm -rf the backup and try again with doveadm -D?
Aki
On 16/02/2025 23:47 EET Asai via dovecot <dovecot@dovecot.org> wrote:
After spending several hours troubleshooting this, it seems like doveadm backup is broken somehow. At least on my system.
I can't even run doveadm backup -u user maildir:/dest on an empty target director without it throwing an error.
Is anyone else having this problem?
Thanks, Asai
On 2/15/2025 6:36 PM, Asai via dovecot wrote:
Here's some more debugging info in case this helps:
Feb 15 18:33:44 dsync(user@domain.tld): Debug: Mailbox INBOX: Mailbox opened Feb 15 18:33:44 dsync(user@domain.tld): Debug: brain S: Syncing mailbox 77727820079bdd584f280000773ea8bd: UIDNEXT changed: 1 -> 12170 Feb 15 18:33:44 dsync(user@domain.tld): Debug: brain M: Syncing mailbox 77727820079bdd584f280000773ea8bd: UIDNEXT changed: 12170 -> 1 Feb 15 18:33:44 dsync(user@domain.tld): Debug: doveadm-sieve: Iterating Sieve mailbox attributes Feb 15 18:33:44 dsync(user@domain.tld): Debug: sieve: Pigeonhole version 2.4.0 (1b2d5bb9) initializing Feb 15 18:33:44 dsync(user@domain.tld): Debug: Loading modules from directory: /usr/lib64/dovecot/sieve Feb 15 18:33:44 dsync(user@domain.tld): Debug: Module loaded: /usr/lib64/dovecot/sieve/lib90_sieve_imapsieve_plugin.so Feb 15 18:33:44 dsync(user@domain.tld): Debug: sieve: Sieve imapsieve plugin for Pigeonhole version 2.4.0 (1b2d5bb9) loaded Feb 15 18:33:44 dsync(user@domain.tld): Error: brain M: Exporting mailbox INBOX failed: Mailbox attribute iteration failed: Mailbox attributes not enabled Feb 15 18:33:44 dsync(user@domain.tld): Debug: brain S: Import mailbox INBOX: Saved UIDs: Feb 15 18:33:44 dsync(user@domain.tld): Debug: User session is finished Feb 15 18:33:44 dsync(user@domain.tld): Debug: auth-master: conn unix:/run/dovecot/auth-userdb (pid=56369,uid=0): Disconnected: Connection closed (fd=9)
On 2/14/2025 7:06 PM, Asai via dovecot wrote:
Greetings,
On 2.3 I was able to run the following command, but now on 2.4 I'm getting the following error:
doveadm backup -u user@domain.tld maildir:/mnt/backups/daily/domain.tld/user
dsync(user@domain.tld): Error: brain M: Exporting mailbox INBOX failed: Mailbox attribute iteration failed: Mailbox attributes not enabled
So, I tried to set the configs to include:
protocol imap { imap_metadata = yes ... }
mail_attribute { dict file { path = %{home}/dovecot-attributes } }
But then I get:
Error: brain M: Exporting mailbox INBOX failed: Mailbox attribute iteration failed: BUG: Unknown internal error
Can anyone clarify the proper configs for this?
Thank you,
Asai
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
On 15. Feb 2025, at 4.06, Asai via dovecot <dovecot@dovecot.org> wrote:
Greetings,
On 2.3 I was able to run the following command, but now on 2.4 I'm getting the following error:
doveadm backup -u user@domain.tld maildir:/mnt/backups/daily/domain.tld/user
dsync(user@domain.tld): Error: brain M: Exporting mailbox INBOX failed: Mailbox attribute iteration failed: Mailbox attributes not enabled
This is actually wrong error message, which shouldn't have been logged. It's been confusing earlier too. I'll fix the code so it no longer writes it. Instead, this is more correct..:
Error: brain M: Exporting mailbox INBOX failed: Mailbox attribute iteration failed: BUG: Unknown internal error
The problem most likely here is that your Sieve settings aren't working for some reason. Unfortunately the error handling code paths are buggy in v2.4.0, so you're not getting the proper error logged. If you post your doveconf -n output I could try to figure it out.
Hi Timo, here's the config, the sieve section is at the bottom. Also, note that due to upgrading Dovecot over the years, we have an odd "home" folder situtation, where it's actually IN the main maildir folder, rather than being its parent.
[root@server5 ~]# doveconf -n # 2.4.0 (daeb6bc59c): /etc/dovecot/dovecot.conf # Pigeonhole version 2.4.0 (1b2d5bb9) # OS: Linux 5.14.0-503.23.1.el9_5.x86_64 x86_64 AlmaLinux release 9.5 (Teal Serval) nfs # Hostname: server5 dovecot_config_version = 2.4.0 auth_allow_weak_schemes = yes auth_mechanisms { plain = yes login = yes } auth_verbose_passwords = plain debug_log_path = /var/log/dovecot-debug.log default_vsz_limit = 512M deliver_log_format = msgid=%{msgid}: from=%{from}: %{message} dovecot_storage_version = 2.4.0 hostname = domain.tld log_path = /var/log/dovecot.log mail_driver = maildir mail_fsync = always mail_home = /vmail/%{user | domain }/%{user | username }/home mail_log_events { delete = yes undelete = yes expunge = yes save = yes copy = yes mailbox_delete = yes mailbox_rename = yes flag_change = yes append = yes } mail_log_fields { uid = yes msgid = yes size = yes box = yes from = yes flags = yes } mail_path = /vmail/%{user | domain }/%{user | username } mail_volatile_path = /dev/shm/dovecot/%{user | sha1 % 256 | hex(2)}/%{user} mmap_disable = yes protocols { imap = yes lmtp = yes sieve = yes } sql_driver = mysql submission_relay_host = domain.tld submission_relay_port = 587 submission_relay_ssl = starttls submission_relay_trusted = yes syslog_facility = local5 mysql localhost { dbname = postfix password = # hidden, use -P to show it user = postfix } passdb sql { default_password_scheme = PLAIN-MD5 query = SELECT password FROM mailbox WHERE username = '%{user}' } userdb sql { iterate_query = select username from mailbox; query = SELECT concat('/vmail/',maildir) as mail_path, concat('/vmail/',maildir,'home') as home, 1001 AS uid, 1001 AS gid FROM mailbox WHERE username = '%{user}' and active = 1 } namespace inbox { inbox = yes prefix = separator = / type = private } maildir { broken_filename_sizes = yes } service imap-login { restart_request_count = unlimited inet_listener imap { port = 143 } inet_listener imaps { port = 993 ssl = yes } } service lmtp { vsz_limit = 512M unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } } service imap { process_limit = 4096 vsz_limit = 1024 MB } service auth { user = root unix_listener auth-master { group = vmail mode = 0660 user = vmail } unix_listener auth-userdb { group = vmail mode = 0666 user = vmail } unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } } service stats { unix_listener stats-reader { group = vmail mode = 0660 user = vmail } unix_listener stats-writer { group = vmail mode = 0660 user = vmail } } ssl_server { cert_file = /etc/postfix/ssl/cert.pem dh_file = /etc/dovecot/dh.pem key_file = /etc/postfix/ssl/key.key } protocol imap { imap_metadata = yes mail_max_userip_connections = 20 mail_plugins { mail_log = yes notify = yes imap_sieve = yes } } protocol lmtp { mail_plugins { sieve = yes } } service managesieve-login { process_min_avail = 0 restart_request_count = 1 vsz_limit = 64M inet_listener sieve { port = 4190 } } service managesieve { process_limit = 1024 } sieve_script personal { active_path = /vmail/%{user | domain }/%{user | username }/home/.dovecot.sieve driver = file path = /vmail/%{user | domain }/%{user | username }/home/sieve } sieve_script before { path = /vmail/sieve/junk-spam.sieve type = before } sieve_script after { path = /vmail/sieve/junk-spam.sieve type = after }
On 2/17/2025 3:19 AM, Timo Sirainen wrote:
On 15. Feb 2025, at 4.06, Asai via dovecot <dovecot@dovecot.org> wrote:
Greetings,
On 2.3 I was able to run the following command, but now on 2.4 I'm getting the following error:
doveadm backup -u user@domain.tld maildir:/mnt/backups/daily/domain.tld/user
dsync(user@domain.tld): Error: brain M: Exporting mailbox INBOX failed: Mailbox attribute iteration failed: Mailbox attributes not enabled This is actually wrong error message, which shouldn't have been logged. It's been confusing earlier too. I'll fix the code so it no longer writes it. Instead, this is more correct..:
Error: brain M: Exporting mailbox INBOX failed: Mailbox attribute iteration failed: BUG: Unknown internal error The problem most likely here is that your Sieve settings aren't working for some reason. Unfortunately the error handling code paths are buggy in v2.4.0, so you're not getting the proper error logged. If you post your doveconf -n output I could try to figure it out.
participants (3)
-
Aki Tuomi
-
Asai
-
Timo Sirainen