Hi,

   I've just migrated our mail server from Debian 12 to 13. With this,
   dovecot was upgraded to v2.4. I was previously aware of the new config
   schema, but it seems the documentation wasn't enough to make the
   transition that smooth. I'm encountering several issues where I'd need
   some assistance:

   I have issues with message sizes not fitting:

   Jan 22 19:16:04 imap(user)<82612><thWtCP5I7OuGPXzg>: Error: Mailbox INBOX:
   UID 31518: Deleting corrupted cache record: Broken virtual size in mailbox
   INBOX:
   
read(/maildirs/user/Maildir/cur/1769006028.M895618P2636851.mail,S=21001,W=21465:2,S):
   FETCH BODY[] got too little data: 11619 vs 21465
   Jan 22 19:16:05 imap(user)<82614><Oy+wCP5I/OuGPXzg>: Error: Mailbox INBOX:
   UID 31517: Deleting corrupted cache record: Broken physical size in
   mailbox INBOX:
   
read(/maildirs/user/Maildir/cur/1769002524.M378861P2632916.mail,S=229241,W=232394:2,S)
   failed: Cached message size larger than expected (229241 > 149967,
   box=INBOX, UID=31517)

   I have set maildir_broken_filename_sizes = yes in 10-mail.conf, which I
   expected to prevent this, but is seemingly doesn't really. Do I have to
   purge some cache? Also something similar happens when sending mail:

   Jan 22 19:26:53
   indexer-worker(user)<88639><pobvLv5IOtqGPXzg:tyFvLuZrcmk/WgEApdA/4w>:
   Error: fts-flatcurve: fts-flatcurve(Sent): Could not write message data:
   uid=1075; InvalidArgumentError: Term too long (> 245):
   
B)l**5y**h**^H1gg^W^**^O**o**]s**qE**^Elkhv/**g^Cok3**)**{^Ft^Cm**b**lw,**1l^B**^[u^Mb*\**u**b**n[f**j**w;**r**y7+**e*qu**^L^\**x^L**f**(`**xfkw**<**a3**x5rv^G^L)**#zhh^B_7w/ztl}^Q.**1**5a**/**q**^M**^C^_^**"^Dd**j_**o**"x^Dya*_^_n
   Jan 22 19:26:53
   indexer-worker(user)<88639><pobvLv5IOtqGPXzg:tyFvLuZrcmk/WgEApdA/4w>:
   Error: Mailbox Sent: UID 1077: Deleting corrupted cache record: Broken
   physical size in mailbox Sent:
   
read(/maildirs/user/Maildir/.Sent/cur/1589821415.M621487P6382.mail,S=8285,W=8432:2,Sa)
   failed: Cached message size larger than expected (8285 > 3115, box=Sent,
   UID=1077)
   Jan 22 19:26:53
   indexer-worker(user)<88639><pobvLv5IOtqGPXzg:tyFvLuZrcmk/WgEApdA/4w>:
   Error: Mailbox Sent: UID 1077:
   
read(/maildirs/user/Maildir/.Sent/cur/1589821415.M621487P6382.mail,S=8285,W=8432:2,Sa)
   failed: Cached message size larger than expected (8285 > 3115, box=Sent,
   UID=1077)
   Jan 22 19:26:53
   indexer-worker(user)<88639><pobvLv5IOtqGPXzg:tyFvLuZrcmk/WgEApdA/4w>:
   Error: Mailbox Sent: Precache for UID=1077 failed:
   
read(/maildirs/user/Maildir/.Sent/cur/1589821415.M621487P6382.mail,S=8285,W=8432:2,Sa)
   failed: Cached message size larger than expected (8285 > 3115, box=Sent,
   UID=1077) (attempted to index 871 messages between UIDs 179..1077)

   And while the logs don't seem to mention it, I guess that's also
   interfering with receiving mails, as postfix confirms getting the mail
   (though it complains about not being able to write to
   /var/log/dovecot/error.log, but I also don't know why it would need that
   so I'm currently not looking into it), but it dovecot never says it
   received it and also no new file is created in
   /maildirs/user/Maildir/cur/.

   I have issues with some plugins. I have in 20-imap.conf and 15-lda.conf
   inside  mail_plugins "zlib = yes", but no zlib-related module can be
   found. Is there a different way to enable mail compression and
   decompression or did Debian just miss to enable that at compilation?

   I also have issues with the sieve plugin. I had it enabled in 15-lda.conf,
   20-managesieve.conf, 20-imap.conf and 20-lmtp.conf. As I understand I
   don't need all of them. At least if I do I get a weird issue (Error:
   Couldn't load required plugin
   /usr/lib/dovecot/modules/lib90_sieve_plugin.so: dlopen() failed:
   /usr/lib/dovecot/modules/lib90_sieve_plugin.so: undefined symbol:
   mail_deliver_ctx_get_log_var_expand_table). So where exactly do I enable
   it? Also, I'd need help modifying something I put into 90-plugins.conf:

   plugin {


          # From elsewhere to Junk folder


          imapsieve_mailbox1_name = Junk


          imapsieve_mailbox1_causes = COPY


          imapsieve_mailbox1_before =
   [1]file:/etc/dovecot/sieve/global/learn-spam.sieve


          # From Junk folder to elsewhere


          imapsieve_mailbox2_name = *


          imapsieve_mailbox2_from = Junk


          imapsieve_mailbox2_causes = COPY


          imapsieve_mailbox2_before =
   [2]file:/etc/dovecot/sieve/global/learn-ham.sieve


          sieve_pipe_bin_dir = /etc/dovecot/sieve/global


          sieve_global_extensions = +vnd.dovecot.pipe
   +vnd.dovecot.environment

          sieve_plugins = sieve_imapsieve sieve_extprograms



          # Compression


          zlib_save_level = 4 # 1..9


          zlib_save = zstd or bz2, If this config entry missing, compression
   is disabled.

   }

   but when I do it that way I get the error "doveconf: Fatal: Error in
   configuration file /etc/dovecot/conf.d/90-plugin.conf line 9: Unknown
   section name: plugin".

   I do have this in 90-sieve.conf:

   mailbox Spam {


   # From elsewhere to Spam folder


     sieve_script report-spam {


       type = before


       cause = copy


       path = /etc/dovecot/sieve/global/learn-spam.sieve


     }


   }



   # From Spam folder to elsewhere


   imapsieve_from Spam {


     sieve_script report-ham {


       type = before


       cause = copy


       path = /etc/dovecot/sieve/global/learn-ham.sieve


     }


   }

   (currently commented out), but I have no idea how exactly I fold the old
   config into the new one. Most of the config is already migrated, but how
   do I make sure that learn-spam-sieve is only running when something is
   moved to Junk, while learn-ham.sieve is executed when something is being
   moved from Junk, except when it's moved into Trash? And what exactly do I
   do with the last 5 configs?

   Sorry for the long message, but the new config scheme is a bit too
   different for me to understand it right away.

   Best regards

   Richard

References

   Visible links
   1. file://etc/dovecot/sieve/global/learn-spam.sieve
   2. file://etc/dovecot/sieve/global/learn-ham.sieve
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to