Re: doveadm backup empties the remote host? SERIOUSLY???

2024-04-27 Thread Aki Tuomi via dovecot
 
 On 27/04/2024 12:57 EEST Nils via dovecot 
 wrote:
  
  
 On 4/26/24 14:04, Aki Tuomi wrote:
  We have migration guide, see
  https://doc.dovecot.org/admin_manual/migrating_mailboxes/
  Aki
 regarding this guide:
 I am supposed to set up doveadm service on the old server and then
 call
 "doveadm backup -Ru username tcp:host:port"
 on the new server? So the reason that doveadm deleted everything
 yesterday was that I forgot the -R option?
  
 "The doveadm backup command forces the destination to look exactly
 like
 the source, deleting mails and mailboxes if necessary."
 Why did doveadm backup create (empty) mailboxes on the new server,
 when
 I mistakably used it in the wrong direction?
  
 -
  
 Had to switch of the email server for over 10 hours yesterday. any
 messages might not have reached me. is there a mailman archive?
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
Yeah. Backup command, without -R backs to location, not from location.
 
Mailman archive is at https://www.dovecot.org/mailman3/mailman3/lists/
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: doveadm backup empties the remote host? SERIOUSLY???

2024-04-26 Thread Aki Tuomi via dovecot
 
 On 26/04/2024 14:46 EEST Nils via dovecot 
 wrote:
  
  
 Sure it's my own fault - no discussion about that, but seriously? How
 dangerously unintuitive it that?
  
 I found it when I was searching for a good practice to migrate a mail
 server with rsync and I mistakably assumed it works in the same
 direction as rsync.
  
 Luckily i have a backup from all mails except today's.
  
 Please, someone tell me what's the best procedure to migrate dovecot.
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
 
We have migration guide, see https://doc.dovecot.org/admin_manual/
migrating_mailboxes/
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Is it possible to setup ntlm authentication then proxy it to the mail server ?

2024-04-26 Thread Aki Tuomi via dovecot
 
 On 26/04/2024 13:00 EEST karl.l--- via dovecot 
 wrote:
  
  
 Hi Aki
  
 We would like NTLM support so customers that have enabled it in
 outlook and other email clients can continue to authenticate when we
 update our dovecot server. We are not running kerberos/samba/active
 directory or any other directory system. I am not sure how GSSAPI
 would assist us with this requirement.
  
 Given that we are using an sql passdb, will this work and if so any
 pointers would be appreciated.
  
 Thanks
  
 
For the behaviour youre seeing, it does sound like a bug, but NTLM support is
not been in since 2.3.14 anymore because Microsoft recommends not implementing
it anymore and the implementation was unsafe.
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Is it possible to setup ntlm authentication then proxy it to the mail server ?

2024-04-21 Thread Aki Tuomi via dovecot
If you can do NTLM, you can do GSSAPI too. Which even Microsoft recommends. So
I would very strongly suggest using that. 
 
Aki
 On 21/04/2024 12:30 EEST Bob Gustafson via dovecot
  wrote:
  
  
 Maybe use Wireshark to get an independent check on what the logs are
 saying?
  
 On 4/18/24 20:27, karl.l--- via dovecot wrote:
  Hi,
  This is my dovecot version:
  ```
  root@freebsdsvr:~ # dovecot --version
  2.3.21 (47349e2482)
  ```
  I'm having trouble in making dovecot as proxy to the mail
  server when using ntlm authentication.
  My setup looks like this: email client --> dovecot
  (will act as proxy) ---> mail server
  so basically the email client will connect to dovecot but
  dovecot will forward it to the mail server.
  Proxying using auth_mechanism as PLAIN is working but if I
  use ntlm authentication it just connects into the dovecot
  server and dovecot server does not proxy to to the mail
  server.
  I tried using passdb driver = sql, passdb driver = static,
  passdb driver = lua
  and all of them are working when the email client connects
  using plain auth, once dovecot authenticates the user it
  will proxy it to the mail server but when I use ntlm
  authentication it just connects to dovecot and does not do
  a proxy to the mail server.
  I switched on all the debugs and I found out in the log
  that when I connect using PLAIN auth it calls the passdb
  and gets my default_fields or my proxy fields ```proxy=y```
  and ```host=mailserver_domain``` which causes dovecot to
  proxy into the host(my mail server). but when I connect
  using NTLM auth it calls the passdb but it does not return
  my default fields for proxying (when it uses the sql passdb
  driver it just connects to the database and does not run
  the password_query) and I think it uses the output from the
  ```ntlm_auth``` of samba that dovecot uses because it
  retunrs the field user=username and
  original_user=username@domain
  This is the example logs that I recieved once I connect
  using ntlm and it does not proxy it to my mail server
  ```
  Apr 18 03:37:29 freebsdsvr dovecot[12084]: auth: Debug:
  mysql(192.168.254.131): Connecting
  Apr 18 03:37:29 freebsdsvr dovecot[12084]: auth: Debug:
  auth client connected (pid=12268)
  Apr 18 03:37:29 freebsdsvr dovecot[12084]: auth: Debug:
  auth client connected (pid=12270)
  Apr 18 03:37:30 freebsdsvr dovecot[12084]: auth: Debug:
  client in: AUTH 1 NTLM service=imap
  session=Js8TT04WcMnAqP5/ lip=192.168.254.131
  rip=192.168.254.127 lport=143 rport=51568
  Apr 18 03:37:30 freebsdsvr dovecot[12084]: auth: Debug:
  client passdb out: CONT 1
  Apr 18 03:37:30 freebsdsvr dovecot[12084]: auth: Debug:
  client in: CONT 1
  TlRMTVNTUAABB4IIAAA= (previous
  base64 data may contain sensitive data)
  Apr 18 03:37:30 freebsdsvr dovecot[12084]: auth: Debug:
  client passdb out: CONT 1
  
TlRMTVNTUAACFAAUADgFgooC57WwKq2q4U8sdAAFwAXABMBgEAAAasdasdasd9FAFMAQwAuAE4ARQBUAC4AQQBVAAIAFABFAFMAQwAuAE4ARQBUACad4AQdsQBVAAEasAFABFAFMAQwAuAE4AdaRQBUAC4AQQBVAAQDABQAZQBzAGMALgBuAGUAdAAuAGEAdQAHAAgA/
  h8T7O2Q2gEA
  Apr 18 03:37:30 freebsdsvr dovecot[12084]: auth: Debug:
  client in: CONT 1
  
TlRMTVNTUAADGAAYAFwAAACIAIgAdeABABgAGAEAWABYARgAABYIIAHMAcwAzAFcATwBSAEsAUwBUAEEAVABJAE8ATgBXKrBA2vF7fMicRiasLK/
  IyI3fbM46rQ7JHcti/
  
0TU02AqasdasdasdhceI+BaeqMjrAQEAAACAL88ampDaARzhirKymxxcAAIAFABFAFMAQwAuAE4ARQBUAC4AQQBVAAEAFABFAFMAQwAuAE4ARQBUAC4AQQBVAAQDABQAZQBzAGMALgBuAGUAdAAuAGEAdQAHAAgA/
  h8T7O2Q2gEA (previous base64 data may contain sensitive
  data)
  Apr 18 03:37:30 freebsdsvr dovecot[12084]: auth: Debug:
  auth(userName,192.168.254.127,): Auth
  request finished
  Apr 18 03:37:30 freebsdsvr dovecot[12084]: auth: Debug:
  client passdb out: OK 1 user=userName
  original_user=userName@FREEBSD-TEST
  ```
  Here's the logs that I get when I connect via Plain Auth
  and it does the proxy to my mail server
  ```
  Apr 18 03:27:39 freebsdsvr dovecot[12084]: auth-worker
  (12138): Debug: mysql(192.168.254.131): Connecting
  Apr 18 03:27:39 freebsdsvr dovecot[12084]: auth-worker
  (12138): Debug: conn unix:auth-worker (uid=0): Server
  accepted connection (fd=15)
  Apr 18 03:27:39 freebsdsvr dovecot[12084]: auth-worker
  

Re: Variable expansion on %w

2024-04-21 Thread Aki Tuomi via dovecot
Yeah. We are changing it for 2.4 though, but until that you need to use this
workaround.
 
Aki
 On 21/04/2024 09:18 EEST Gandalf Corvotempesta via dovecot
  wrote:
  
  
 so it's not possible without using lua?
 i think this is a bug honestly
  
 Il mer 17 apr 2024, 16:16 Gandalf Corvotempesta <
 gandalf.corvotempe...@gmail.com> ha scritto:
  
  Il giorno mer 17 apr 2024 alle ore 15:31 Aki Tuomi
   ha scritto:
   If you have version with Lua support, you can
   make a passdb with lua
  that base64 encodes the plain password. Then it should
  work.
  I'm not using lua currently, and i'm planning to move the
  server to a
  new one with users on DB, that's why i'm looking for a
  quick
  workaround,
  just to migrate all password to the new schema before the
  server migration.
  Is not possible to use a plain passdb file ? If not, even
  with a dirty
  workaround, i'll do the schema change on the new server
  with accounts
  on DB
  but i really prefere to do this before, not after the
  migration.
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: exfat not supported ?

2024-04-20 Thread Aki Tuomi via dovecot
Try setting lock_method = dotlock
 
Aki
 On 20/04/2024 15:32 EEST Joan Moreau via dovecot
  wrote:
  
  
 I tried and get the following:
  
 Error: Couldn't create mailbox list lock /xxx/mailboxes.lock:
 file_create_locked(/xxx/mailboxes.lock) failed:
 link(/xxx/mailboxes.locka94f3757318b0b90, /xxx/mailboxes.lock)
 failed:
 Operation not permitted
  
 On 2024-04-20 17:39, Aki Tuomi via dovecot wrote:
  
  On 20/04/2024 12:27 EEST Joan Moreau via dovecot
   wrote:
   
  Hi
   
  Would placing my storage on a exfat partition work ? If no,
  why ?
   
  Thank you
  ___
  dovecot mailing list -- dovecot@dovecot.org
  To unsubscribe send an email to dovecot-le...@dovecot.org
   
  I can't see any reason why not. As long as it behaves like
  POSIX
  filesystem.
   
  Aki
  ___
  dovecot mailing list -- dovecot@dovecot.org
  To unsubscribe send an email to dovecot-le...@dovecot.org
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: exfat not supported ?

2024-04-20 Thread Aki Tuomi via dovecot
 
 On 20/04/2024 12:27 EEST Joan Moreau via dovecot
  wrote:
  
  
 Hi
  
 Would placing my storage on a exfat partition work ? If no, why ?
  
 Thank you
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
 
I can't see any reason why not. As long as it behaves like POSIX filesystem.
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Bug report: invalid \HasNoChildren in response when asterisk is used in the name

2024-04-18 Thread Aki Tuomi via dovecot
It appears to be fixed. From NEWS
 
- acl: When plugin was loaded \HasChildren and \HasNoChildren flags
   were calculated incorrectly for mailboxes containing '*' and '%'
   in their names.
 
Aki
 On 18/04/2024 16:15 EEST Merijn Schering via dovecot
  wrote:
  
  
 Sorry, I only have access to a 2.3.19 dovecot because it's the
 debian bookworm included package.
 Has this bug recently been fixed?
  
 Best regards,
  
  
 Merijn Schering
  
 Intermesh
 https://www.group-office.com
 https://twitter.com/GroupOffice
  
 Op Maandag, 15-04-2024 om 20:39 schreef Aki Tuomi:
  
  
  
 Did you try with 2.3.21 which is the latest? Packages are available
 at
 https://repo.dovecot.org/
  
 Aki
  
  
 On 15/04/2024 14:36 EEST Merijn Schering via dovecot wrote:
  
  
 Hi,
  
  
 This problem still exists in v2.3.19.1 (9b53102964). I hope it can be
  
 fixed some day.
  
 Best regards,
  
  
 Merijn Schering
  
 Op Dinsdag, 10-11-2020 om 12:28 schreef Merijn Schering (Intermesh):
  
  
  
 Hi,
  
 I'm using dovecot 2.3.4.1 (f79e8e7e4).
  
  
 I have created a folder called "Test with *". 
  
  
 Now when I do a command:
  
  
 A3 LIST "" "%" RETURN (CHILDREN STATUS (MESSAGES UNSEEN))
 It responds:  * STATUS Test with * ( MESSAGES 0 UNSEEN 0 ) * LIST (
 \HasNoChildren \UnMarked ) / Spam
 But it actually has children! This only happens when I use a *
 character in the name.
  
 I hope you can fix this some day. Thanks!
  
 Best regards,
  
  
 Merijn Schering
  
 Intermesh
 https://www.group-office.com
 https://twitter.com/GroupOffice
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Variable expansion on %w

2024-04-17 Thread Aki Tuomi via dovecot
If you have version with Lua support, you can make a passdb with lua that
base64 encodes the plain password. Then it should work.
 
Aki
 On 17/04/2024 15:56 EEST Gandalf Corvotempesta via dovecot
  wrote:
  
  
 Il giorno mer 17 apr 2024 alle ore 14:22 Benny Pedersen via dovecot
  ha scritto:
  i am not an expert in postlogin scripts, but please show it
 The issue is not the postlogin script, but dovecot. It's dovecot that
 tries to expand a variable BEFORE sending it to the script
  
 userdb {
 args = username_format=%u /etc/dovecot/passwd
 driver = passwd-file
 #default_fields = plain_pass=%w
 }
  
  if it not working simple remove % in passwords would not
  solve it ?
 Seriously ? oviously asking all customers to change their password to
 remove a char is not a solution..
  
 Il giorno mer 17 apr 2024 alle ore 14:22 Benny Pedersen via dovecot
  ha scritto:
 >
  Gandalf Corvotempesta via dovecot skrev den 2024-04-17 08:
  31:
   im following the docs to change the password
   schema
   docs says that i have to pass the clear password
   to the post login
   script
   but using %w doesn't work if the clear password
   has a "%" inside as
   it's
   being expanded as variabile
   in example with a password "test%Ypass" dovecot
   is trying to expand %Y
   before passing it to the post login script
  i am not an expert in postlogin scripts, but please show it
  if it not working simple remove % in passwords would not
  solve it ?
  ___
  dovecot mailing list -- dovecot@dovecot.org
  To unsubscribe send an email to dovecot-le...@dovecot.org
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


RE: Uppercase username emails are rejected

2024-04-17 Thread Aki Tuomi via dovecot
 
 On 17/04/2024 12:42 EEST Marc via dovecot 
 wrote:
  
  
  No they aren't. The *host part* is case insensitive because
  the DNS is,
 Indeed. Letsencrypt is utilizing this characteristic, they query the
 same hostname every time with different randomized(?)
 capitalizations. I have no idea what the logics behind this is.
 Preventing this from showing in logs? Preventing rate limiters to be
 triggered? No idea why they do this.
  
 >, but erroneously slip onto  or  all
  the time, I suppose ...),
 :D
  
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
 
This is a DNS hardening thing to make it harder to spoof replies. DNS name
comparison is still case insensitive.
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: doveadm import error: quota: Unknown namespace: INBOX/

2024-04-17 Thread Aki Tuomi via dovecot
doveadm -o plugin/quota= ...
 
Aki
 On 17/04/2024 10:25 EEST Ralf Becker via dovecot
  wrote:
  
  
 Noone an idea?
  
 No longer been able to restore mailboxes seems a little scary ...
  
 Ralf
  
 Am 12.04.24 um 14:07 schrieb Ralf Becker via dovecot:
  Dovecot version is 2.3.20 and I try to restore a folder
  hierarchy from an older
  snapshot of the mailbox (folders in question have been
  deleted):
  sudo -u dovecot doveadm -Dv import -u p...@xyz.de -s mdbox:$
  (pwd)/pbs-2024-03-
  19/mdbox INBOX mailbox 'projekte/8-BZ/*'
  I'm getting the following error:
  Apr 12 10:52:18 doveadm(p...@xyz.de): Error: quota: Unknown
  namespace: INBOX/
  I also tried restoring in a (not existing) restore folder:
  Restore-2024-03-19
  and using search query "mailbox 'projekte/8-BZ'", all give
  the same result :(
  Any ideas what might be wrong, I did this many times
  before, and it worked, so
  I'm puzzeled ...
  Here is the full output of doveadm import command above and
  doveconf -n:
  ...
  
 --
 Ralf Becker
 EGroupware GmbH [www.egroupware.org]
 Handelsregister HRB Kaiserslautern 3587
 Geschäftsführer Birgit und Ralf Becker
 Leibnizstr. 17, 67663 Kaiserslautern, Germany
 Telefon +49 631 31657-0
  
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Wildcard !include statements fail if nothing matches

2024-04-17 Thread Aki Tuomi via dovecot
You should use !include_try instead. See https://doc.dovecot.org/
configuration_manual/config_file/#including-config-files
 
Aki
 On 17/04/2024 00:00 EEST Noah Meyerhans via dovecot
  wrote:
  
  
 Forwarding this report from Debian bug #1068478. Please see the full
 report for more context. [1]
  
 Per the documentation on "Including config files", "It’s not an error
 if
 wildcards don’t result in any matching files." [2]
  
 However, that statement does not seem to reflect the actual behavior
 of
 the code.
  
 Some relevant snippets of code from
 src/config/config-parser.c:
  
 from config_parse_line():
 if (strcmp(key, "!include") == 0)
 return CONFIG_LINE_TYPE_INCLUDE;
 if (strcmp(key, "!include_try") == 0)
 return CONFIG_LINE_TYPE_INCLUDE_TRY;
  
 This return value is later handled with a case statement in
 config_parser_apply_line():
 case CONFIG_LINE_TYPE_INCLUDE:
 case CONFIG_LINE_TYPE_INCLUDE_TRY:
 (void)settings_include(ctx, fix_relative_path(value, ctx->cur_input),
 type == CONFIG_LINE_TYPE_INCLUDE_TRY);
 break;
  
 The result of the "type == CONFIG_LINE_TYPE_INCLUDE_TRY" statement is
 passed as the bool ignore_errors parameter to bool ignore_errors(),
 so
 if it evaluates to false as it does when type ==
 CONFIG_LINE_TYPE_INCLUDE, then we return an error:
  
 case GLOB_NOMATCH:
 if (ignore_errors)
 return 0;
 ctx->error = "No matches";
 return -1;
  
 The code is pretty straightforward in how it handles this scenario,
 so
 maybe the documentation should be clarified?
  
 Thanks
 noah
  
 1. https://bugs.debian.org/1068478
 2. https://doc.dovecot.org/configuration_manual/config_file/
 #including-config-files
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Uppercase username emails are rejected

2024-04-17 Thread Aki Tuomi via dovecot
 
 On 17/04/2024 08:27 EEST Peter via dovecot 
 wrote:
  
  
 On 17/04/24 00:51, John Stoffel via dovecot wrote:
 >> "Peter" == Peter via dovecot  writes:
   On 14/04/24 12:09, John Stoffel via dovecot
   wrote:
I think you need to update both places,
so that your username and
password checks are done with lowercase
usernames.
   Generally speaking you want auth to be case-
   sensitive, but go ahead and
   try it to see if it fixes the issue.
  Umm... not for emails you don't. Since the j...@stoffel.org
  and
  j...@stoffel.org and j...@stoffel.org are all the same
  email
  address... should they be different logins? Not for
  email...
 There is a difference between expecting $random_stranger to get the
 case
 correct on an email address and expecting a user to get his own email
 address correct for the purpose of logging in, also keeping in mind
 that
 the user will generally get it entered *once* in their MUA and the
 MUA
 will store it for future logins expecting the case to be correct is
 not
 a huge ask in this scenario.
  
 Also keep in mind that the username is not always going to be the
 same
 as the email address, in fact Dovecot is perfectly capable of having
 usernames that are entirely different to the email address that is
 associated with them.
  
  In general, usernames should NOT be case sensitive, that
  way leads
  madness. Passwords on the other hand...
 Both usernames and passwords are part of the authentication
 credentials.
 When you allow any authentication credential to be case-insensitive
 then you decrease the difficulty of any brute-force attack by quite a
 bit. There is no good reason to make usernames case-insensitive and
 very good reasons not to.
  
  
 Peter
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
 
Unfortunately some systems uppercase (or downcase) your email when sending mail
to you. In general I would advocate using auth_username_format=%Ln or %Lu to
normalize to lowercase. I dont believe you would really get that much benefit
from mixed case address.
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Variable expansion on %w

2024-04-17 Thread Aki Tuomi via dovecot
Can you explain what you are trying to do? 
 
Aki
 On 16/04/2024 21:36 EEST Gandalf Corvotempesta via dovecot
  wrote:
  
  
 guys any help ?
 Is not possible to change the password schema when using passwd file
 ?
  
 Il giorno sab 13 apr 2024 alle ore 14:48 Gandalf Corvotempesta
  ha scritto:
 >
  any clue?
  Il gio 11 apr 2024, 21:57 Gandalf Corvotempesta
   ha scritto:
  >
 >> I'm following the guide for changing the password schema.
 >> Everything works as expected (i'm using a static passwd file), but
 >> when the plain password has a % inside, dovecot is trying to
 expand
 >> that, triggering an error:
 >>
 >> Apr 11 21:33:55 mail02 dovecot: pop3
 (x)<3962994><4soGPNcVXsoln9W6>:
 >> Error: Failed to expand plugin setting plain_pass =
 'x%Yxx!%':
 >> Unknown variable '%Y'
 >>
 >> How can I block the variable expansion inside %w ?
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Bug report: invalid \HasNoChildren in response when asterisk is used in the name

2024-04-15 Thread Aki Tuomi via dovecot
Did you try with 2.3.21 which is the latest? Packages are available at https://
repo.dovecot.org/
 
Aki
 On 15/04/2024 14:36 EEST Merijn Schering via dovecot
  wrote:
  
  
 Hi,
  
  
 This problem still exists in v2.3.19.1 (9b53102964). I hope it can be
 fixed some day.
  
 Best regards,
  
  
 Merijn Schering
  
 Op Dinsdag, 10-11-2020 om 12:28 schreef Merijn Schering (Intermesh):
  
  
  
 Hi,
  
 I'm using dovecot 2.3.4.1 (f79e8e7e4).
  
  
 I have created a folder called "Test with *". 
  
  
 Now when I do a command:
  
  
 A3 LIST "" "%" RETURN (CHILDREN STATUS (MESSAGES UNSEEN))
 It responds:  * STATUS Test with * ( MESSAGES 0 UNSEEN 0 ) * LIST (
 \HasNoChildren \UnMarked ) / Spam
 But it actually has children! This only happens when I use a *
 character in the name.
  
 I hope you can fix this some day. Thanks!
  
 Best regards,
  
  
 Merijn Schering
  
 Intermesh
 https://www.group-office.com
 https://twitter.com/GroupOffice
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: maybe list rocky and centos9 stream?

2024-04-11 Thread Aki Tuomi via dovecot


> On 11/04/2024 11:43 EEST Peter via dovecot  wrote:
> 
>  
> On 11/04/24 00:07, Aki Tuomi via dovecot wrote:
> >   - We do not build or test 2.3 with RHEL9, as it's not supported with 2.3 
> > (yes, I am aware of the broken patch out there)
> 
> I assume you're referring to the OpenSSL 3 patch, can you elaborate on 
> why it's "broken"?
> 
> 
> Peter

Because it breaks for example mail crypt plugin. It's mostly just done by doing 
the minimal API changes to make dovecot compile, without much testing at all.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: maybe list rocky and centos9 stream?

2024-04-10 Thread Aki Tuomi via dovecot


> On 10/04/2024 14:30 EEST Marc via dovecot  wrote:
> 
>  
> maybe list rocky and centos9 stream on the repo page? 
> https://repo.dovecot.org/
> 


Hi!

We can't really list them there:

 - We do not build or test 2.3 with RHEL9, as it's not supported with 2.3 (yes, 
I am aware of the broken patch out there)
 - We will add RHEL9 with 2.4, if you use Rocky or CentOS9, you're free to use 
RHEL9 packages, but again, we test with RHEL9.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Uppercase username emails are rejected

2024-04-06 Thread Aki Tuomi via dovecot
 
 On 06/04/2024 17:34 EEST lua8ds--- via dovecot 
 wrote:
  
  
 When a sender writes my email address with my username uppercase,
 e.g. usern...@name.com, in the to: field of their MUA, my mail server
 rejects that email. /var/log/mail.log prints:
  
 : host mail.redacted.com[private/dovecot-lmtp]
 said: 550 5.1.1
 >  User doesn't exist: usern...@redacted.com
 (in reply to RCPT TO
 > command)
  
 In the manual, I found that:
  
 auth_username_format
 Default: %Lu
 Formatting applied to username before querying the auth database.
 You can use the standard variables here.
 Examples:
 %Lu
 Lowercases the username
 [...]
  
 My current setting was not the default; I had:
 auth_username_format = %n
  
 So I updated that setting to:
 auth_username_format = %Lu
 expecting that %Lu would lowercase the username - and that my problem
 would be fixed.
  
 It does not though. Updating this setting not only prompts my email
 server to still reject usern...@redacted.com, but now also rejects
 (lowercase username) usern...@redacted.com (which my server had no
 issue receiving beforehand).
  
 So I reverted auth_username_format to:
 auth_username_format = %n
  
 Emails sent to usern...@redacted.com land in my mailbox again - but
 emails sent to usern...@redacted.com still don't.
  
 What can I try to troubleshoot?
 Which config file shall I share with you?
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
Did you try %Ln?
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Uppercase username emails are rejected

2024-04-06 Thread Aki Tuomi via dovecot
 
 On 06/04/2024 17:34 EEST lua8ds--- via dovecot 
 wrote:
  
  
 When a sender writes my email address with my username uppercase,
 e.g. usern...@name.com, in the to: field of their MUA, my mail server
 rejects that email. /var/log/mail.log prints:
  
 : host mail.redacted.com[private/dovecot-lmtp]
 said: 550 5.1.1
 >  User doesn't exist: usern...@redacted.com
 (in reply to RCPT TO
 > command)
  
 In the manual, I found that:
  
 auth_username_format
 Default: %Lu
 Formatting applied to username before querying the auth database.
 You can use the standard variables here.
 Examples:
 %Lu
 Lowercases the username
 [...]
  
 My current setting was not the default; I had:
 auth_username_format = %n
  
 So I updated that setting to:
 auth_username_format = %Lu
 expecting that %Lu would lowercase the username - and that my problem
 would be fixed.
  
 It does not though. Updating this setting not only prompts my email
 server to still reject usern...@redacted.com, but now also rejects
 (lowercase username) usern...@redacted.com (which my server had no
 issue receiving beforehand).
  
 So I reverted auth_username_format to:
 auth_username_format = %n
  
 Emails sent to usern...@redacted.com land in my mailbox again - but
 emails sent to usern...@redacted.com still don't.
  
 What can I try to troubleshoot?
 Which config file shall I share with you?
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
Did you try %Ln?
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


RE: storage format migration for folders

2024-04-05 Thread Aki Tuomi via dovecot
 
 On 05/04/2024 17:49 EEST Marc via dovecot 
 wrote:
  
  
   doveadm sync -u testacc
  'mdbox:/home/testing/testacc/mdbox:INDEX=/home/testing/
  testacc/index:CONT
  ROL=/home/testing/testacc/mail/control:LAYOUT=index'
  >
   Which gives me the expectec result. But I have
   also an archive
  namespace and an alt namespace that is going to be quite a
  lot of moving
  around on this production server. Not to mention having all
  these
  messages copied. Is this really the most efficient way to
  migrate to such
  id folders?
   
  You said you are in process of migrating to new server. And
  yes, this is
  the safest way to do this change.
   
  You probably likely want to have a migration.conf file with
  **new**
  locations, and use doveadm -c /path/to/migration.conf sync
  -1R
  tcp:localhost:1234 to make it bit less horrible to migrate.
   
 I guess this migration.conf can be a dump of doveconf -a not?
  
 Should I copy these sieve dirs manually or is there also sync for
 that?
  
 
Sieve is synced. See https://doc.dovecot.org/admin_manual/migrating_mailboxes/
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


RE: storage format migration for folders

2024-04-05 Thread Aki Tuomi via dovecot

> On 05/04/2024 15:53 EEST Marc via dovecot  wrote:
> 
>  
> > > > >
> > > > > > > > breaking the mail index
> > > > > > >
> > > > > > > Tangentially query: is Dveocot smart enough to  optimize
> > mailbox
> > > > > > renaming
> > > > > > >  to do index renaming (i.e. does not try to copy or recreate
> > > > indices)?
> > > > > > >
> > > > > >
> > > > > > Dovecot is, if you use LAYOUT=index. This will use only mailbox
> > GUID
> > > > on
> > > > > > disk, and the folder name is only in indexes (both list index and
> > > > mailbox
> > > > > > index for recovery purposes).
> > > > > >
> > > > > > I would recommend using 2.3.21 with LAYOUT=index to avoid
> > problems.
> > > > > >
> > > > >
> > > > > So you can just add this to an existing configuration, without the
> > need
> > > > to do anything? Like eg reindex or so? I always had the impression
> > this
> > > > affects how messages are stored.
> > > > >
> > > > > mail_location = mdbox:xx:INDEX=xx:CONTROL=/xxx
> > > > > becomes:
> > > > > mail_location =
> > mdbox:xx:INDEX=xx:CONTROL=/xxx:LAYOUT:index
> > > > >
> > > > > Does this really speed things up?
> > > > >
> > > >
> > > > You can't put it on existing setup just like that, you need to do
> > storage
> > > > format migration, or copy all the folders into their GUID folders
> > when
> > > > you do this.
> > > >
> > > > It will speed things up and will also allow you to use almost
> > anything as
> > > > mailbox name.
> > > >
> > >
> > > I was in the process of setting up new server, it already had a few
> > test mailboxes on it.
> > >
> > > why do you mention this specific version 2.3.21? el9 still is at
> > 2.3.16.
> > >
> > 
> > Because we have fixed issues with index layout since 2.3.16. It will work
> > with 2.3.16 too but there are issues you'd probably not want to deal
> > with, most importantly:
> > 
> > - LAYOUT=index List index rebuild was missing.
> > - LAYOUT=index: Duplicate GUIDs were not detected.
> > 
> > which were added in 2.3.17 and futher fixed in later versions. It's a
> > chore to dig up specific versions, so I recommend using the latest.
> > 
> > > So if I add the LAYOUT:index to mail_location for my mdbox setup, it
> > only renames Drafts,INBOX,Junk etc to some uuid (I guess)?
> > >
> > > ├── mdbox
> > > │   ├── dbox-alt-root
> > > │   ├── mailboxes
> > > │   │   ├── Drafts
> > > │   │   │   └── dbox-Mails
> > > │   │   ├── INBOX
> > > │   │   │   ├── dbox-Mails
> > > │   │   │   └── test
> > > │   │   │   └── dbox-Mails
> > > │   │   ├── Junk
> > > │   │   │   └── dbox-Mails
> > > │   │   ├── NotSpam
> > > │   │   │   └── dbox-Mails
> > > │   │   ├── Sent
> > > │   │   │   └── dbox-Mails
> > > │   │   └── Trash
> > > │   │   └── dbox-Mails
> > > │   └── storage
> > > │   ├── m.1
> > > │   ├── m.2
> > > │   ├── m.3
> > > │   ├── m.4
> > > │   ├── m.5
> > > │   └── m.6
> > >
> > > This server is offline any way. What would be the easiest way to do
> > this migration? Something I can do directly on this server?
> > 
> > If there are only few accounts, you can configure new mail location with
> > LAYOUT=index and use doveadm sync / backup to migrate mails there, then
> > move things over the old stuff - or copy old stuff elsewhere and do the
> > same to current location as new.
> > 
> 
> I tested with this
> 
> doveadm sync -u testacc 
> 'mdbox:/home/testing/testacc/mdbox:INDEX=/home/testing/testacc/index:CONTROL=/home/testing/testacc/mail/control:LAYOUT=index'
> 
> Which gives me the expectec result. But I have also an archive namespace and 
> an alt namespace that is going to be quite a lot of moving around on this 
> production server. Not to mention having all these messages copied. Is this 
> really the most efficient way to migrate to such id folders?

You said you are in process of migrating to new server. And yes, this is the 
safest way to do this change.

You probably likely want to have a migration.conf file with **new** locations, 
and use doveadm -c /path/to/migration.conf sync -1R tcp:localhost:1234 to make 
it bit less horrible to migrate.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: storage format migration for folders

2024-04-05 Thread Aki Tuomi via dovecot

> On 05/04/2024 13:26 EEST Marc  wrote:
> 
>  
> > >
> > >
> > > > > > breaking the mail index
> > > > >
> > > > > Tangentially query: is Dveocot smart enough to  optimize mailbox
> > > > renaming
> > > > >  to do index renaming (i.e. does not try to copy or recreate
> > indices)?
> > > > >
> > > >
> > > > Dovecot is, if you use LAYOUT=index. This will use only mailbox GUID
> > on
> > > > disk, and the folder name is only in indexes (both list index and
> > mailbox
> > > > index for recovery purposes).
> > > >
> > > > I would recommend using 2.3.21 with LAYOUT=index to avoid problems.
> > > >
> > >
> > > So you can just add this to an existing configuration, without the need
> > to do anything? Like eg reindex or so? I always had the impression this
> > affects how messages are stored.
> > >
> > > mail_location = mdbox:xx:INDEX=xx:CONTROL=/xxx
> > > becomes:
> > > mail_location = mdbox:xx:INDEX=xx:CONTROL=/xxx:LAYOUT:index
> > >
> > > Does this really speed things up?
> > >
> > 
> > You can't put it on existing setup just like that, you need to do storage
> > format migration, or copy all the folders into their GUID folders when
> > you do this.
> > 
> > It will speed things up and will also allow you to use almost anything as
> > mailbox name.
> > 
> 
> I was in the process of setting up new server, it already had a few test 
> mailboxes on it. 
> 
> why do you mention this specific version 2.3.21? el9 still is at 2.3.16.
> 

Because we have fixed issues with index layout since 2.3.16. It will work with 
2.3.16 too but there are issues you'd probably not want to deal with, most 
importantly: 

- LAYOUT=index List index rebuild was missing.
- LAYOUT=index: Duplicate GUIDs were not detected.

which were added in 2.3.17 and futher fixed in later versions. It's a chore to 
dig up specific versions, so I recommend using the latest.

> So if I add the LAYOUT:index to mail_location for my mdbox setup, it only 
> renames Drafts,INBOX,Junk etc to some uuid (I guess)?
> 
> ├── mdbox
> │   ├── dbox-alt-root 
> │   ├── mailboxes
> │   │   ├── Drafts
> │   │   │   └── dbox-Mails
> │   │   ├── INBOX
> │   │   │   ├── dbox-Mails
> │   │   │   └── test
> │   │   │   └── dbox-Mails
> │   │   ├── Junk
> │   │   │   └── dbox-Mails
> │   │   ├── NotSpam
> │   │   │   └── dbox-Mails
> │   │   ├── Sent
> │   │   │   └── dbox-Mails
> │   │   └── Trash
> │   │   └── dbox-Mails
> │   └── storage
> │   ├── m.1
> │   ├── m.2
> │   ├── m.3
> │   ├── m.4
> │   ├── m.5
> │   └── m.6
> 
> This server is offline any way. What would be the easiest way to do this 
> migration? Something I can do directly on this server?

If there are only few accounts, you can configure new mail location with 
LAYOUT=index and use doveadm sync / backup to migrate mails there, then move 
things over the old stuff - or copy old stuff elsewhere and do the same to 
current location as new.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: [EXT] RE: Users with enough rope to hang themselves

2024-04-05 Thread Aki Tuomi via dovecot


> On 05/04/2024 12:36 EEST Marc  wrote:
> 
>  
> > > > breaking the mail index
> > >
> > > Tangentially query: is Dveocot smart enough to  optimize mailbox
> > renaming
> > >  to do index renaming (i.e. does not try to copy or recreate indices)?
> > >
> > 
> > Dovecot is, if you use LAYOUT=index. This will use only mailbox GUID on
> > disk, and the folder name is only in indexes (both list index and mailbox
> > index for recovery purposes).
> > 
> > I would recommend using 2.3.21 with LAYOUT=index to avoid problems.
> > 
> 
> So you can just add this to an existing configuration, without the need to do 
> anything? Like eg reindex or so? I always had the impression this affects how 
> messages are stored.
> 
> mail_location = mdbox:xx:INDEX=xx:CONTROL=/xxx
> becomes:
> mail_location = mdbox:xx:INDEX=xx:CONTROL=/xxx:LAYOUT:index
> 
> Does this really speed things up?
> 

You can't put it on existing setup just like that, you need to do storage 
format migration, or copy all the folders into their GUID folders when you do 
this.

It will speed things up and will also allow you to use almost anything as 
mailbox name.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: 2.4 ballpark release date?

2024-04-05 Thread Aki Tuomi via dovecot


> On 03/04/2024 21:09 EEST Shawn Heisey via dovecot  wrote:
> 
>  
> On 4/30/23 22:53, Aki Tuomi via dovecot wrote:
> > 2.4 is planned for sometime after summer this year.
> > Aki
> 
> Considering that it's now almost a year later, this seems to have slipped.
> 
> Thanks,
> Shawn

Hi!

We are working on a large configuration change for Dovecot, so this has been 
main factor on delaying 2.4 (quite a lot, as you've noticed). It's getting 
closer, but there are still some large changes to be made, and once those 
complete, we are in better position to give a release date estimate. I am 
hoping it would be after this summer, but lets see if I'm writing this same 
mail again next year this time. Hopefully not.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


DMARC setting change

2024-04-05 Thread Aki Tuomi via dovecot
We've changed the list dmarc mitigation to happen unconditionally now. This 
will likely have an impact on people's mails, so this is a headsup for everyone 
so they know.

Please let me know if this causes too much bother, but keep in mind that right 
now lot of emails are being bounced and rejected.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Users with enough rope to hang themselves

2024-04-04 Thread Aki Tuomi via dovecot


> On 04/04/2024 03:15 EEST Joseph Tam  wrote:
> 
>  
> Rupert Gallagher writes:
> 
> > I keep finding myself in a corner with a user. He uses mail extensively, 
> > which
> > is fine, he has a huge archive of own professional correspondence, which is
> > fine, but he uses mail folders as if they were regular system folders, with
> > very long paths, and keeps renaming them and moving them around, daily,
> > breaking the mail index
> 
> Tangentially query: is Dveocot smart enough to  optimize mailbox renaming
>  to do index renaming (i.e. does not try to copy or recreate indices)?
> 

Dovecot is, if you use LAYOUT=index. This will use only mailbox GUID on disk, 
and the folder name is only in indexes (both list index and mailbox index for 
recovery purposes).

I would recommend using 2.3.21 with LAYOUT=index to avoid problems.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Any way to make a shared mailbox(not a shared folder)

2024-04-02 Thread Aki Tuomi via dovecot
You could use master user feature for that.

Aki

> On 02/04/2024 14:43 EEST Paul Kudla (SCOM.CA Internet Services Inc.) 
>  wrote:
> 
>  
> In general how i do it is just make an info@ account and login as an 
> imap user
> 
> this allows multiple info@ users especially in thunderbird to be 
> connected as a seconday account accross any device.
> 
> aka just treat any shared mailboxes as actual mail accounts, way 
> simplier and easier to manage?
> 
> any user can then move/delete etc an email that they will be looking 
> after thus updating the info@ at the same time.
> 
> its very common today to have info@ and accounting@ with multiple users 
> attached to these as different people will be responsible for different 
> emails
> 
> thunderbird allows drag and drop accross email accounts (only one email 
> at a time), this allows easy management.
> 
> 
> 
> 
> 
> Thanks - Paul Kudla (Manager SCOM.CA Internet Services Inc.)
> 
> Have A Happy Tuesday !!!
> 
> Scom.ca Internet Services 
> 004-1009 Byron Street South
> Whitby, Ontario - Canada
> L1N 4S3
> 
> Toronto 416.642.7266
> Main 1.866.411.7266
> Fax 1.888.892.7266
> Email p...@scom.ca
> 
> On 2024-04-02 7:25 a.m., Maksim Rodin wrote:
> > 
> > Hello
> > I wonder if there is a right way to make a shared mailbox?
> > I do not mean "shared folder" but a whole mailbox.
> > E.g. I have a mailbox i...@company.com and I have a user mailbox 
> > us...@company.com.
> > I would like that a user which can already authenticate as us...@company.com
> > can setup another account in his Thunderbird as, say, 
> > us...@company.com\i...@company.com
> > or something like user1*info, enters his own password and can use the 
> > mailbox
> > i...@company.com as his second mailbox.
> > It might be something similar to master user feature but I do not want
> > the us...@company.com to have access to all the mailboxes on the dovecot 
> > imap server.
> > 
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Implications of LMTP socket being world readable and writable (0666) by default

2024-03-31 Thread Aki Tuomi via dovecot
 
 On 31/03/2024 14:47 EEST da-dovecotlist-15--- via dovecot
  wrote:
  
  
 Ah yes. Thank you both. I did not think of just overwriting the
 `lmtp`
 socket but was looking for a way to define a new socket with a
 different
 name and disable the default one.
  
 The main question remains open, though: Is the default setting
 insecure
 or am I missing something?
  
 
You can disable it with mode=0. 
 
It depends a bit on what the default protocols list is. If it does not include
lmtp, lmtp is not enabled. Some distros also require installing dovecot-lmtpd
before it is even usable.
 
So. It depends. :)
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


RE: [Dovecot] [dovecot-2.1.15] mdbox corruption, doveadm force-resync can't repair it (throws segfault)

2024-03-31 Thread Aki Tuomi via dovecot
 
 On 31/03/2024 13:33 EEST Marc  wrote:
  
  
  Subject: Re: [Dovecot] [dovecot-2.1.15] mdbox corruption,
  doveadm force-
  resync can't repair it (throws segfault)
   
 Are you sure it is not something else, your message is even empty.
  
 
2.1.15 is already out of any kind of support, we won't provide any fixes to
that.
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Implications of LMTP socket being world readable and writable (0666) by default

2024-03-31 Thread Aki Tuomi via dovecot
 
 On 31/03/2024 13:55 EEST da-dovecotlist-15--- via dovecot
  wrote:
  
  
 I was surprised to find that the LMTP socket has permission mode 0666
 by
 default and since configs are merged with defaults, there is no way
 to
 disable this AFAICS.
  
 # doveconf -d
 ...
 service lmtp {
 unix_listener lmtp {
 group =
 mode = 0666
 user =
 }
 ...
 }
  
 Is this also how it is supposed to be used in production? I
 understand
 that LMTP is just for delivering new mails but is there really no
 need
 to restrict this further? To me it seems reasonable, to force all
 services on this machine to go through Postfix and not be able to
 just
 put e-mails in the users mailboxes via LMTP. Am I missing something?
  
 My use case is a "small" NixOS mail server with Postfix, Nextcloud
 a.o.
 installed on the same machine. No chroot jails because of NixOS.
  
 
Of course there is a way to change that.
 
service lmtp {
  unix_listener lmtp {
     mode=0600
  }
}
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Separate index get dovecot lost

2024-03-30 Thread Aki Tuomi via dovecot
 
 On 30/03/2024 12:30 EET Aki Tuomi via dovecot 
 wrote:
  
  
 On 30/03/2024 11:33 EET Joan Moreau  wrote:
  
  
 To do that kind of a change, mailbox migration is required.
 Meaning ?> To do that kind of a change, mailbox migration is
 required. 
  
 Meaning ?
  
  
 A mail migration with doveadm sync. See https://doc.dovecot.org/
 admin_manual/
 migrating_mailboxes/ on migration. You can also do same host
 migration if you
 have sufficient disk space, by providing new location in migration
 config, or
 in doveadm sync/backup command (whichever you prefer).
  
 Aki
  
 
Alternatively you can also move index files to correct locations by hand. I
strongly recommend trying out with a test setup first.
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Separate index get dovecot lost

2024-03-30 Thread Aki Tuomi via dovecot
 
 On 30/03/2024 11:33 EET Joan Moreau  wrote:
  
  
  To do that kind of a change, mailbox migration is required.
 Meaning ?> To do that kind of a change, mailbox migration is
 required. 
  
 Meaning ?
  
  
A mail migration with doveadm sync. See https://doc.dovecot.org/admin_manual/
migrating_mailboxes/ on migration. You can also do same host migration if you
have sufficient disk space, by providing new location in migration config, or
in doveadm sync/backup command (whichever you prefer).
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Separate index get dovecot lost

2024-03-30 Thread Aki Tuomi via dovecot
 
 On 30/03/2024 06:30 EET Joan Moreau  wrote:
  
  
 Hi
  
 I have large number of email (~TB) and want to put the index in a
 separate, rapid drive
  
 Initially, I have
  
 mail_location = mdbox:/files/mail/%d/%n
  
 If I put
  
 mail_location = mdbox:/files/mail/%d/%n:INDEX=/data/mailindexes/%d/%n
  
 then dovecot gets totally lost and tries to reach mailboxes content
 and
 tree from the INDEX location instead of the original location
  
 What is wrong ?
  
 Thank youHi
 I have large number of email (~TB) and want to put the index in a
 separate,
 rapid drive
  
 Initially, I have
 mail_location = mdbox:/files/mail/%d/%n
  
 If I put
 mail_location = mdbox:/files/mail/%d/%n:INDEX=/data/mailindexes/%d/%n
 then dovecot gets totally lost and tries to reach mailboxes content
 and tree
 from the INDEX location instead of the original location
  
 What is wrong ?
 Thank you
  
To do that kind of a change, mailbox migration is required. 
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Post-Auth external check?

2024-03-28 Thread Aki Tuomi via dovecot
Sounds like

https://doc.dovecot.org/configuration_manual/authentication/auth_policy/

Aki

> On 28/03/2024 10:19 EET Stephan von Krawczynski  wrote:
> 
>  
> Hello all,
> 
> is it possible to include some post-auth check in the password authentication?
> So after dovecot has found a user allowed to login to execute some external
> script for checking additional conditions which gives back simple true or
> false wether the login should be allowed?
> 
> -- 
> Regards,
> Stephan
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: replication timeout

2024-03-28 Thread Aki Tuomi via dovecot
Hi!

We received some more information to this. Are you by chance running these from 
some scheduler? It seems that if dovecot is logging, some schedulers can 
actually start blocking on log writes to stdout/stderr, which can lead to this 
problem.

I wonder if this could be the case for you?

Aki

> On 21/01/2024 17:36 EET Aki Tuomi via dovecot  wrote:
> 
>  
> Can you try with doveadm -D and send the log?
> 
> Aki
> 
> > On 20/01/2024 19:51 EET Andy Balholm  wrote:
> > 
> >  
> > I forgot to mention in my original message that I'm running Dovecot
> > 2.3.21 (47349e2482).
> > 
> > It seems like the stalls are more likely to happen
> > when the type of sync is "incremental" rather than
> > "normal" or "full".
> > (I'm inclined to think they only happen for incremental syncs,
> > but I'm not sure.)
> > 
> > Andy
> > 
> > 
> > On Friday, January 19, 2024 9:26:29 AM PST, Andy Balholm wrote:
> > > I have two Dovecot mail servers that replicate to each other.
> > > Sometimes there are delays in the synchronization,
> > > and I notice that the mail log has entries like this:
> > >
> > > Error: dsync(spokane): I/O has stalled, no activity for 600 
> > > seconds (last sent=mailbox, last recv=mailbox_state)
> > >
> > > Five minutes seems like a long time to sit there waiting with 
> > > nothing happening.
> > > Is there a way to reduce this timeout so that I don't have so many
> > > replicaton connections just sitting around doing nothing?
> > >
> > > (Of course, a way to prevent the I/O stalls would be great too,
> > > but with my limited upload bandwidth, they may be unavoidable.)
> > >
> > > Andy
> > >
> > 
> > ___
> > dovecot mailing list -- dovecot@dovecot.org
> > To unsubscribe send an email to dovecot-le...@dovecot.org
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: [Dovecot] Re: Using mbox INBOX with Maildirs?

2024-03-26 Thread Aki Tuomi via dovecot

> On 26/03/2024 00:02 EET Will  wrote:
> 
>  
> Hi,
> 
> This is my first time using this group and I have the same question as 
> the subject.  I can't seem to get dovecot to read a mbox inbox that is 
> in /var/mail/%u with /home/%u/Maildir as maildir.  This just worked on 
> my old server that I am now upgrading to AlmaLinux release 9.3 with 
> dovecot version 2.3.16 (7e2e900c1a).  Please help, this upgrade is very 
> painful.  Guess I shouldn't have waited 20 years...
> 

It would be helpful if you could provide doveconf -n please, and mail_debug=yes 
logs.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: virtual user list in a passwd file (without linux user)

2024-03-22 Thread Aki Tuomi via dovecot


> On 22/03/2024 04:58 EET p...@virtuadv.com wrote:
> 
>  
> Thanks for your continued help and for sharing your config.
> 
> 1.  I got the yahoo/gmail solved but my emails go to their spam...  I will 
> try to add DKIM and DMARC next to see if it helps.
> Hotmail is tougher, they refuse my email based on some IP filtering they have 
> for my hosting provider.  So, I am trying to add some ab...@sitex.com and 
> postmas...@sitex.com in order to join their SNDS and JMRP as they suggested.  
> Not sure if it will help.
> 
> 2.  I am trying different ways to create those abuse and postmaster emails 
> for all my web sites with the least amount of email accounts.  
> I think aliases worked for site1 when I added:
> ~~~
> postmaster: postmas...@site1.com
> abuse: postmas...@site1.com
> ~~~
> 
> But I am having trouble forwarding the other sites to site1 in order to have 
> only one email account for all these.  I tried different things and the 
> latest I tried is by adding this in file virtual:
> ~~~
> ab...@site2.com  abuse
> postmas...@site2.com postmaster
> ab...@site3.com  abuse
> postmas...@site3.com postmaster
> ~~~
> 
> It seems like it is trying to send to postmas...@mail.site1.com which dovecot 
> does not find, and it discards those emails.  Not sure what is the easiest 
> way of doing this.

The recommended way to deal with aliases is on the MTA/MX level, not in Dovecot.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


RE: Crash in dovecot snippet when using imapc

2024-03-20 Thread Aki Tuomi via dovecot
Hi!

I can see the crash now, thanks.

For 2.3, I would suggest as workaround to enable the fetch-size imapc_feature.

Aki

> On 20/03/2024 09:58 EET John van der Kamp via dovecot  
> wrote:
> 
>  
> See attached script I used. If you get EOF then you've hit the crash.
> 
>  
> John
> 
>  
>  
> 
> -Original message-
> From: Aki Tuomi 
> Sent: Wednesday, 20th March 2024, 8:40
> To: John van der Kamp ; John van der Kamp via dovecot 
> 
> Subject: RE: Crash in dovecot snippet when using imapc
>  
> CAUTION: This email originated from outside of the organization. Do not click 
> links or open attachments unless you can confirm the sender and know the 
> content is safe.
> 
> 
> 
> Could you provide some simple way to reproduce this, minimal config etc?
> 
> Aki
> 
> > On 19/03/2024 17:44 EET John van der Kamp via dovecot  
> > wrote:
> >
> >
> > Hi, sorry for the late reply.
> >
> > The commit you've pointed at before is the commit introducing code for the 
> > snippets.
> >
> > Your claim that main is fixed is incorrect: I've bisected through the git 
> > history, and the commit that "fixes" it, is the one flipping imapc features 
> > to negatives: 
> > https://github.com/dovecot/core/commit/7810b38d30b7dbb2155f78873fe760bc9e2e6212
> >  
> > <https://github.com/dovecot/core/commit/7810b38d30b7dbb2155f78873fe760bc9e2e6212>
> >  However, the default imapc_features value stays the same, so all the 
> > "negative" features are suddenly enabled.
> >
> > I've reset the defaults in the frontend config to what it was before:
> >
> > imapc_features = no-fetch-size no-fetch-headers no-search no-modseq 
> > no-delay-login no-fetch-bodystructure no-acl
> >
> > and then dovecot starts crashing again in the described scenario. It is the 
> > "no-fetch-size" flag, and if I use "rfc822.size" feature on a 2.3 branch it 
> > stops crashing.
> >
> >
> > Turns out this same feature adds some filter that seems to be meant for 
> > some exchange email side-effect: 
> > https://github.com/dovecot/core/blob/main/src/lib-storage/index/imapc/imapc-mail-fetch.c#L596
> >  
> > <https://github.com/dovecot/core/blob/main/src/lib-storage/index/imapc/imapc-mail-fetch.c#L596>
> >where this filter tries to remove any X-Message-Flag header. This is 
> > weird, because it could have been an normally received header as well as 
> > something that was tacked on later by exchange.
> >
> >
> > The main bug is not fixed by just removing that filter: chaining filters is 
> > probably very broken when using the imapc backend, and it might be broken 
> > in other unknown scenarios.
> >
> >
> > Regards,
> >
> >
> > John
> >
> >
> >
> > -Original message-
> > From: Aki Tuomi via dovecot 
> > Sent: Friday, 19th January 2024, 8:37
> > To: Aki Tuomi via dovecot ; John van der Kamp 
> > 
> > Subject: RE: Crash in dovecot snippet when using imapc
> >
> > CAUTION: This email originated from outside of the organization. Do not 
> > click links or open attachments unless you can confirm the sender and know 
> > the content is safe.
> >
> >
> >
> > Sorry, the provided patch link was wrong, it's already in 2.3.21, my bad. 
> > Anyways, it is still fixed in main, since it does not happen there.
> >
> > Aki
> >
> > > On 19/01/2024 09:13 EET Aki Tuomi via dovecot  wrote:
> > >
> > >
> > > Hi!
> > >
> > > I was able to reproduce this issue with 2.3.21, but it seems to have been 
> > > fixed in main. I think 
> > > https://github.com/dovecot/core/commit/1c1b77dbf9a548aac788efb76973ce2d0fa6c732.patch
> > >  will fix this.
> > >
> > > Aki
> > >
> > > > On 18/01/2024 22:51 EET John van der Kamp via dovecot 
> > > >  wrote:
> > > >
> > > >
> > > > Hello,
> > > >
> > > >
> > > > I've found a crash in a very specific setup. A dovecot server with 
> > > > imapc connection needs to receive an email with no body contents for 
> > > > the intent of generating a preview/snippet. It crashes somewhere deep 
> > > > in the jungle of istream and snapshots. I've included a script which 
> > > > sets up the systems to reproduce the crash.
> > > >
> > > >
> > > > I've tested this with several versions. 2.3.16 doesn't seem to be 
> > &g

RE: Crash in dovecot snippet when using imapc

2024-03-20 Thread Aki Tuomi via dovecot
Could you provide some simple way to reproduce this, minimal config etc?

Aki

> On 19/03/2024 17:44 EET John van der Kamp via dovecot  
> wrote:
> 
>  
> Hi, sorry for the late reply.
> 
> The commit you've pointed at before is the commit introducing code for the 
> snippets.
> 
> Your claim that main is fixed is incorrect: I've bisected through the git 
> history, and the commit that "fixes" it, is the one flipping imapc features 
> to negatives: 
> https://github.com/dovecot/core/commit/7810b38d30b7dbb2155f78873fe760bc9e2e6212
>  
> <https://github.com/dovecot/core/commit/7810b38d30b7dbb2155f78873fe760bc9e2e6212>
>  However, the default imapc_features value stays the same, so all the 
> "negative" features are suddenly enabled.
> 
> I've reset the defaults in the frontend config to what it was before:
> 
> imapc_features = no-fetch-size no-fetch-headers no-search no-modseq 
> no-delay-login no-fetch-bodystructure no-acl
> 
> and then dovecot starts crashing again in the described scenario. It is the 
> "no-fetch-size" flag, and if I use "rfc822.size" feature on a 2.3 branch it 
> stops crashing.
> 
>  
> Turns out this same feature adds some filter that seems to be meant for some 
> exchange email side-effect: 
> https://github.com/dovecot/core/blob/main/src/lib-storage/index/imapc/imapc-mail-fetch.c#L596
>  
> <https://github.com/dovecot/core/blob/main/src/lib-storage/index/imapc/imapc-mail-fetch.c#L596>
>    where this filter tries to remove any X-Message-Flag header. This is 
> weird, because it could have been an normally received header as well as 
> something that was tacked on later by exchange.
> 
>  
> The main bug is not fixed by just removing that filter: chaining filters is 
> probably very broken when using the imapc backend, and it might be broken in 
> other unknown scenarios.
> 
>  
> Regards,
> 
>  
> John
> 
>  
>  
> -Original message-
> From: Aki Tuomi via dovecot 
> Sent: Friday, 19th January 2024, 8:37
> To: Aki Tuomi via dovecot ; John van der Kamp 
> 
> Subject: RE: Crash in dovecot snippet when using imapc
>  
> CAUTION: This email originated from outside of the organization. Do not click 
> links or open attachments unless you can confirm the sender and know the 
> content is safe.
> 
> 
> 
> Sorry, the provided patch link was wrong, it's already in 2.3.21, my bad. 
> Anyways, it is still fixed in main, since it does not happen there.
> 
> Aki
> 
> > On 19/01/2024 09:13 EET Aki Tuomi via dovecot  wrote:
> >
> >
> > Hi!
> >
> > I was able to reproduce this issue with 2.3.21, but it seems to have been 
> > fixed in main. I think 
> > https://github.com/dovecot/core/commit/1c1b77dbf9a548aac788efb76973ce2d0fa6c732.patch
> >  will fix this.
> >
> > Aki
> >
> > > On 18/01/2024 22:51 EET John van der Kamp via dovecot 
> > >  wrote:
> > >
> > >
> > > Hello,
> > >
> > >
> > > I've found a crash in a very specific setup. A dovecot server with imapc 
> > > connection needs to receive an email with no body contents for the intent 
> > > of generating a preview/snippet. It crashes somewhere deep in the jungle 
> > > of istream and snapshots. I've included a script which sets up the 
> > > systems to reproduce the crash.
> > >
> > >
> > > I've tested this with several versions. 2.3.16 doesn't seem to be 
> > > affected, but 2.3.20 and 2.3.21 are affect.
> > >
> > >
> > > For me it produces a traceback like this, using the ubuntu version from 
> > > here: https://packages.ubuntu.com/noble/dovecot-core
> > >
> > >
> > > (gdb) bt
> > > #0  __pthread_kill_implementation (no_tid=0, signo=6, 
> > > threadid=140530132887360) at ./nptl/pthread_kill.c:44
> > > #1  __pthread_kill_internal (signo=6, threadid=140530132887360) at 
> > > ./nptl/pthread_kill.c:78
> > > #2  __GI___pthread_kill (threadid=140530132887360, signo=signo@entry=6) 
> > > at ./nptl/pthread_kill.c:89
> > > #3  0x7fcfb8842476 in __GI_raise (sig=sig@entry=6) at 
> > > ../sysdeps/posix/raise.c:26
> > > #4  0x7fcfb88287f3 in __GI_abort () at ./stdlib/abort.c:79
> > > #5  0x7fcfb8b37fe5 in default_fatal_finish (status=0, 
> > > type=LOG_TYPE_PANIC) at ../lib/failures.c:465
> > > #6  fatal_handler_real (ctx=, format=, 
> > > args=) at ../lib/failures.c:477
> > > #7  0x7fcfb8be50d7 in i_internal_fatal_handler (ctx=, 
> > > format=, args=) at ../lib/fai

Re: dovecot panic

2024-03-15 Thread Aki Tuomi via dovecot

> On 15/03/2024 10:53 EET Michael Grant via dovecot  wrote:
> 
>  
> I'm running dovecot 2.3.19.1 on debian stable.  I just started seeing a 
> slew of these in my log:
> 
> Mar 14 10:02:38 strange.networkguild.org dovecot[865654]: 
> imap(mgrant)<1939553>: Panic: file istream-header-filter.c: 
> line 663 (i_stream_header_filter_snapshot_free): assertion failed: 
> (snapshot->mstream->snapshot_pending)
> Mar 14 10:02:38 strange.networkguild.org dovecot[865654]: 
> imap(mgrant)<1939553>: Error: Raw backtrace: #0 
> test_subprocess_fork[0x7f1a33d7ca20] -> #1 backtrace_append[0x7f1a33d7cc90] 
> -> #2 backtrace_get[0x7f1a33d7ce20] -> #3 execvp_const[0x7f1a33d89f90] -> #4 
> i_syslog_fatal_handler[0x7f1a33d8a900] -> #5 i_panic[0x7f1a33ce00a4] -> #6 
> fs_wrapper_unlock[0x7f1a33cdb71d] -> #7 
> i_stream_snapshot_free[0x7f1a33d96110] -> #8 i_stream_unref[0x7f1a33d96180] 
> -> #9 index_mail_get_virtual_size[0x7f1a33f2d190] -> #10 
> index_mail_save_finish[0x7f1a33f2d470] -> #11 
> index_mail_get_special[0x7f1a33f2d690] -> #12 
> mail_get_special[0x7f1a33eaf950] -> #13 cmd_select[0x560714f983e0] -> #14 
> imap_fetch_begin[0x560714f9d170] -> #15 imap_fetch_more[0x560714f9d550] -> 
> #16 cmd_fetch[0x560714f91c00] -> #17 command_exec[0x560714f9a880] -> #18 
> cmd_x_cancel[0x560714fa0510] -> #19 cmd_x_cancel[0x560714fa0510] -> #20 
> cmd_x_cancel[0x560714fa0510] -> #21 client_handle_input[0x560714fa0880] -> 
> #22 client_input[0x560714fa0d80] -> #23 io_loop_call_io[0x7f1a33da1c70] -> 
> #24 io_loop_handler_run_internal[0x7f1a33da3970] -> #25 
> io_loop_handler_run[0x7f1a33da3b00] -> #26 io_loop_run[0x7f1a33da3cd0] -> #27 
> master_service_run[0x7f1a33d14180] -> #28 main[0x560714f8ca00] -> #29 
> __libc_init_first[0x7f1a33ac51d0] -> #30 __libc_start_main[0x7f1a33ac5280] -> 
> #31 _start[0x560714f8d000]
> 
> I realize this is a slightly old version of dovecot but this is what's in 
> debian's stable package repository.  I see 2.3.21+dfsg1-2 in testing and 
> 2.3.21+dfsg1-3 in unstable.  I really try to avoid installing this on 
> production.
> 
> I didn't recently change anything in my configs on the server.  I did start 
> recently using 'eM Client' on Windows a couple days ago, could that have 
> caused this?  Mail seems to continue to come in to my imap clients, but these 
> errors in the log are worrying!
> 
> Michael GrantI'm running dovecot 2.3.19.1 on debian stable.  I just started 
> seeing a slew of
> these in my log:
> 
> Mar 14 10:02:38 strange.networkguild.org dovecot[865654]: imap
> (mgrant)<1939553>: Panic: file istream-header-filter.c: line
> 663 (i_stream_header_filter_snapshot_free): assertion failed: (snapshot-
> >mstream->snapshot_pending)
> Mar 14 10:02:38 strange.networkguild.org dovecot[865654]: imap
> (mgrant)<1939553>: Error: Raw backtrace: #0
> test_subprocess_fork[0x7f1a33d7ca20] -> #1 backtrace_append[0x7f1a33d7cc90] -
> > #2 backtrace_get[0x7f1a33d7ce20] -> #3 execvp_const[0x7f1a33d89f90] -> #4
> i_syslog_fatal_handler[0x7f1a33d8a900] -> #5 i_panic[0x7f1a33ce00a4] -> #6
> fs_wrapper_unlock[0x7f1a33cdb71d] -> #7 i_stream_snapshot_free[0x7f1a33d96110]
> -> #8 i_stream_unref[0x7f1a33d96180] -> #9 index_mail_get_virtual_size
> [0x7f1a33f2d190] -> #10 index_mail_save_finish[0x7f1a33f2d470] -> #11
> index_mail_get_special[0x7f1a33f2d690] -> #12 mail_get_special[0x7f1a33eaf950]
> -> #13 cmd_select[0x560714f983e0] -> #14 imap_fetch_begin[0x560714f9d170] -
> > #15 imap_fetch_more[0x560714f9d550] -> #16 cmd_fetch[0x560714f91c00] -> #17
> command_exec[0x560714f9a880] -> #18 cmd_x_cancel[0x560714fa0510] -> #19
> cmd_x_cancel[0x560714fa0510] -> #20 cmd_x_cancel[0x560714fa0510] -> #21
> client_handle_input[0x560714fa0880] -> #22 client_input[0x560714fa0d80] -> #23
> io_loop_call_io[0x7f1a33da1c70] -> #24 io_loop_handler_run_internal
> [0x7f1a33da3970] -> #25 io_loop_handler_run[0x7f1a33da3b00] -> #26 io_loop_run
> [0x7f1a33da3cd0] -> #27 master_service_run[0x7f1a33d14180] -> #28 main
> [0x560714f8ca00] -> #29 __libc_init_first[0x7f1a33ac51d0] -> #30
> __libc_start_main[0x7f1a33ac5280] -> #31 _start[0x560714f8d000]
> 
> I realize this is a slightly old version of dovecot but this is what's in
> debian's stable package repository.  I see 2.3.21+dfsg1-2 in testing and
> 2.3.21+dfsg1-3 in unstable.  I really try to avoid installing this on
> production.
> 
> I didn't recently change anything in my configs on the server.  I did start
> recently using 'eM Client' on Windows a couple days ago, could that have 
> caused
> this?  Mail seems to continue to come in to my imap clients, but these errors
> in the log are worrying!
> 
> 

Would you be open to using https://repo.dovecot.org in your production? These 
are debian-compatible packages.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: antispoofing with dovecot submission

2024-03-15 Thread Aki Tuomi via dovecot


> On 14/03/2024 17:28 EET dovecot--- via dovecot  wrote:
> 
>  
> > it is possible to do antispoofing, like
> > reject_authenticated_sender_login_mismatch from postfix ?
> 
> 
> I could be wrong, but i believe dovecot submission is only a proxy to postfix 
> submission. Dovecot does not directly delivery mail to the world. Meaning the 
> mail is still passing through postfix and 
> reject_authenticated_sender_login_mismatch would still be applied.
> 
> My follow up question would be does dovecot queue the mail or proxy it live? 
> If postfix rejected the submission based on something like 
> reject_authenticated_sender_login_mismatch does the email client get sent the 
> error live by dovecot submission, or would a type of backscatter bounce be 
> created between postfix and dovecot?

Dovecot submission is only a relay. It will not queueing or anything like that, 
it always requires a live, functional MTA to back it up. If MTA does not reject 
the mail during sending, then what happens next is up to the MTA.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: [EXT] Re: How to get a memory pointer in the core process

2024-03-14 Thread Aki Tuomi via dovecot
I do understand, and the problem is that your question is similar to asking how 
to get a memory pointer from systemd for your program.

The short answer is, not doable.

The bit longer answer is that /usr/sbin/dovecot is a fancy service supervisor, 
it's job is to launch and manage processes, it won't give you persistence 
service for data.

Aki

> On 14/03/2024 07:49 EET Joan Moreau via dovecot  wrote:
> 
>  
> No, you don´t understand
> 
> There is a core process (/usr/bin/dovecot) running all the time. So I 
> want to allocate a memory block, the core process keep it and it is 
> retrievable by the pluging when laded again
> 
> At exit of /usr/bin/dovecot, it just does a "delete()" of the said 
> allocation
> 
> On 2024-03-14 13:25, Aki Tuomi via dovecot wrote:
> 
> > Hi!
> > 
> > Sorry but that's just not possible, ther is no "core" where to create 
> > such object. There is no "dovecot" where to store things.
> > 
> > When user logs in, dovecot executes /usr/libexec/dovecot/imap and 
> > transfers the connection fd there. then plugins and stuff are loaded, 
> > and the user does what he does, and then plugins and stuff are unloaded 
> > and process exists and no longer exists in memory.
> > 
> > You are clearly asking about memory persistence between sessions, and 
> > this can be done with
> > 
> > a) services (internal or external), such as redis, sql, or something 
> > else
> > b) storing things to disk
> > 
> > Aki
> > 
> > On 13/03/2024 18:45 EET Joan Moreau via dovecot  
> > wrote:
> > 
> > No, I am not referring to that
> > 
> > I want to create an object at first call in memory
> > 
> > that object would be retrievable at second and furthers calls of the
> > plugin, as long as dovecot is running
> > 
> > On 2024-03-13 16:29, Aki Tuomi via dovecot wrote:
> > 
> > Not really no. You should use e.g. dict inteface for storing this kind
> > of stateful data. When deinit is called the calling core process will
> > likely die too.
> > 
> > Aki
> > 
> > On 13/03/2024 10:19 EET Joan Moreau  wrote:
> > 
> > Keep a pointer in memory retrievable each time a plugin is called
> > 
> > So the plugin keep the memory, not has to restart everything at each
> > call
> > 
> > On 12 March 2024 08:53:38 Aki Tuomi via dovecot 
> > wrote:
> > 
> > On 11/03/2024 10:42 EET Joan Moreau  wrote:
> > 
> > Hi
> > Is it possible, from a plugin perspective, to create and recover a
> > pointer in the core process (i.e. memory not lost between 2 calls to
> > the plugin, even after the "deinit" of the plugin" ) ?
> > 
> > Thanks
> > Hi Joan!
> > 
> > May I ask what you are attempting to achieve in more detail?
> > 
> > Aki
> > ___
> > dovecot mailing list -- dovecot@dovecot.org
> > To unsubscribe send an email to dovecot-le...@dovecot.org   
> > ___
> > dovecot mailing list -- dovecot@dovecot.org
> > To unsubscribe send an email to dovecot-leave@dovecot.orgNo, I am not 
> > referring to that
> > I want to create an object at first call in memory
> > that object would be retrievable at second and furthers calls of the 
> > plugin, as
> > long as dovecot is running
> > 
> > On 2024-03-13 16:29, Aki Tuomi via dovecot wrote:
> > Not really no. You should use e.g. dict inteface for storing this
> > kind of stateful data. When deinit is called the calling core process
> > will likely die too.
> > 
> > Aki
> > 
> > On 13/03/2024 10:19 EET Joan Moreau  wrote:
> > 
> > Keep a pointer in memory retrievable each time a plugin is
> > called
> > 
> > So the plugin keep the memory, not has to restart
> > everything at each call
> > 
> > On 12 March 2024 08:53:38 Aki Tuomi via dovecot
> >  wrote:
> > 
> > On 11/03/2024 10:42 EET Joan Moreau
> >  wrote:
> > 
> > Hi
> > Is it possible, from a plugin
> > perspective, to create and recover a
> > pointer in the core process (i.e.
> > memory not lost between 2 calls to the
> > plugin, even after the "deinit" of the
> > plugin" ) ?
> > 
> > Thanks
> > 
> > Hi Joan!
> > 
> > May I ask what you are attempting to achieve in
> > more detail?
> > 
> > Aki
> > ___
> > dovecot mailing list -- dovecot@dovecot.org
> > 

Re: [EXT] Re: How to get a memory pointer in the core process

2024-03-13 Thread Aki Tuomi via dovecot
Hi!

Sorry but that's just not possible, ther is no "core" where to create such 
object. There is no "dovecot" where to store things.

When user logs in, dovecot executes /usr/libexec/dovecot/imap and transfers the 
connection fd there. then plugins and stuff are loaded, and the user does what 
he does, and then plugins and stuff are unloaded and process exists and no 
longer exists in memory.

You are clearly asking about memory persistence between sessions, and this can 
be done with

a) services (internal or external), such as redis, sql, or something else
b) storing things to disk

Aki

> On 13/03/2024 18:45 EET Joan Moreau via dovecot  wrote:
> 
>  
> No, I am not referring to that
> 
> I want to create an object at first call in memory
> 
> that object would be retrievable at second and furthers calls of the 
> plugin, as long as dovecot is running
> 
> On 2024-03-13 16:29, Aki Tuomi via dovecot wrote:
> 
> > Not really no. You should use e.g. dict inteface for storing this kind 
> > of stateful data. When deinit is called the calling core process will 
> > likely die too.
> > 
> > Aki
> > 
> > On 13/03/2024 10:19 EET Joan Moreau  wrote:
> > 
> > Keep a pointer in memory retrievable each time a plugin is called
> > 
> > So the plugin keep the memory, not has to restart everything at each 
> > call
> > 
> > On 12 March 2024 08:53:38 Aki Tuomi via dovecot  
> > wrote:
> > 
> > On 11/03/2024 10:42 EET Joan Moreau  wrote:
> > 
> > Hi
> > Is it possible, from a plugin perspective, to create and recover a 
> > pointer in the core process (i.e. memory not lost between 2 calls to 
> > the plugin, even after the "deinit" of the plugin" ) ?
> > 
> > Thanks
> > Hi Joan!
> > 
> > May I ask what you are attempting to achieve in more detail?
> > 
> > Aki
> > ___
> > dovecot mailing list -- dovecot@dovecot.org
> > To unsubscribe send an email to dovecot-le...@dovecot.org
>   ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-leave@dovecot.orgNo, I am not 
> referring to that
> I want to create an object at first call in memory
> that object would be retrievable at second and furthers calls of the plugin, 
> as
> long as dovecot is running
> 
> 
> 
> 
> On 2024-03-13 16:29, Aki Tuomi via dovecot wrote:
>  Not really no. You should use e.g. dict inteface for storing this
>  kind of stateful data. When deinit is called the calling core process
>  will likely die too.
> 
>  Aki
> 
>   On 13/03/2024 10:19 EET Joan Moreau  wrote:
> 
> 
>   Keep a pointer in memory retrievable each time a plugin is
>   called
> 
>   So the plugin keep the memory, not has to restart
>   everything at each call
> 
> 
> 
>   On 12 March 2024 08:53:38 Aki Tuomi via dovecot
>wrote:
> 
> On 11/03/2024 10:42 EET Joan Moreau
>  wrote:
> 
> 
> Hi
> Is it possible, from a plugin
> perspective, to create and recover a
> pointer in the core process (i.e.
> memory not lost between 2 calls to the
> plugin, even after the "deinit" of the
> plugin" ) ?
> 
> Thanks
> 
>Hi Joan!
> 
>May I ask what you are attempting to achieve in
>more detail?
> 
>Aki
>___
>dovecot mailing list -- dovecot@dovecot.org
>To unsubscribe send an email to dovecot-
>le...@dovecot.org
>  ___
>  dovecot mailing list -- dovecot@dovecot.org
>  To unsubscribe send an email to dovecot-le...@dovecot.org
> 
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: [EXT] Re: How to get a memory pointer in the core process

2024-03-13 Thread Aki Tuomi via dovecot
Not really no. You should use e.g. dict inteface for storing this kind of 
stateful data. When deinit is called the calling core process will likely die 
too.

Aki

> On 13/03/2024 10:19 EET Joan Moreau  wrote:
> 
> 
> Keep a pointer in memory retrievable each time a plugin is called
> 
> So the plugin keep the memory, not has to restart everything at each call
> 
> 
> 
> On 12 March 2024 08:53:38 Aki Tuomi via dovecot  wrote:
> 
> > > On 11/03/2024 10:42 EET Joan Moreau  wrote:
> > > 
> > > 
> > > Hi
> > > Is it possible, from a plugin perspective, to create and recover a 
> > > pointer in the core process (i.e. memory not lost between 2 calls to the 
> > > plugin, even after the "deinit" of the plugin" ) ?
> > > 
> > > Thanks
> > 
> > Hi Joan!
> > 
> > May I ask what you are attempting to achieve in more detail?
> > 
> > Aki
> > ___
> > dovecot mailing list -- dovecot@dovecot.org
> > To unsubscribe send an email to dovecot-le...@dovecot.org
>
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Dovecot and SNI

2024-03-13 Thread Aki Tuomi via dovecot

> On 12/03/2024 22:54 EET steffan--- via dovecot  wrote:
> 
>  
> I have an old CentOS 7 server using dovecot 2.2.36  and OpenSSL 1.0.2k-fips 
> that’s been fine for quite some time. Recently I started getting complaints 
> related to SNI.
> 
> I test with this: openssl s_client -connect mail.domain.com:993 -crlf -quiet
> 
> On macOS using OpenSSL LibreSSL 3.3.6 I test and get the default dovecot 
> domain “SomeWrongDomain.com” which causes issues.
> 
> On Oracle Linux 9 using OpenSSL 3.0.7 I get the correct response for the 
> domain “mail.domain.com”
> 
> What could cause this?
> 
> 
> Thank you,
> Steffan Cline
> stef...@hldns.com
> 602-793-0014
> 
> 
> I have an old CentOS 7 server using dovecot 2.2.36  and OpenSSL 1.0.2k-fips
> that’s been fine for quite some time. Recently I started getting complaints
> related to SNI.
>  
> I test with this: openssl s_client -connect mail.domain.com:993 -crlf -quiet
>  
> On macOS using OpenSSL LibreSSL 3.3.6 I test and get the default dovecot 
> domain
> “SomeWrongDomain.com” which causes issues.
>  
> On Oracle Linux 9 using OpenSSL 3.0.7 I get the correct response for the 
> domain
> “mail.domain.com”
>  
> What could cause this?
>  
>  
> Thank you,
> Steffan Cline
> stef...@hldns.com
> 602-793-0014 

One reason could be that Dovecot 2.3 does not support openssl3, and there is a 
broken patch flying around. We are close to releasing our next major release, 
which does include support for ossl3.

We can't really debug issues likely caused by 3rd party patch.

Try with RHEL8 or compatible, we have packages for that as well.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Configure: "Can't build with MySQL support: libmysqlclient not found"

2024-03-12 Thread Aki Tuomi via dovecot

> On 12/03/2024 14:46 EET James L. Brown via dovecot  
> wrote:
> 
>  
> On 12 Mar 2024, at 10:06 PM, Odhiambo Washington  wrote:
> 
> On Tue, Mar 12, 2024 at 4:20 AM James L. Brown via dovecot 
> mailto:dovecot@dovecot.org>> wrote:
> Hi all.
> 
> I’m getting errors when trying to configure make for version 2.3.21 on macOS
> 14.3.1 Sonoma.
> 
> It ends with:
> 
> checking for mysql_config... mysql_config
> checking for mysql_init in -lmysqlclient... no
> configure: error: Can't build with MySQL support: libmysqlclient not found
> 
> I’m using:
> 
> env PKG_CONFIG_PATH=/opt/homebrew/lib/pkgconfig pkg-config --libs libsodium
> 
> CPPFLAGS=-I/opt/homebrew/Cellar/openssl@3/3.2.1/include LDFLAGS=-L/opt/
> homebrew/opt/openssl@3/lib ./configure --with-ssl=openssl --with-mysql --with-
> sodium
> 
> Looking at config.log I see:
> 
> configure:28222: checking for mysql_config
> configure:28238: found /opt/homebrew/bin/mysql_config
> configure:28250: result: mysql_config
> configure:28285: checking for mysql_init in -lmysqlclient
> configure:28310: gcc -o conftest -std=gnu99 -g -O2 -fstack-protector-strong -
> U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wmissing-
> declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast 
> -
> Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -I/opt/homebrew/Cellar/
> openssl@3/3.2.1/include -I/opt/homebrew/Cellar/openssl@3/3.2.1/include -L/opt/
> homebrew/opt/openssl@3/lib conftest.c -lmysqlclient   -L/opt/homebrew/Cellar/
> mysql/8.3.0_1/lib -lmysqlclient -lz  -lzstd  -lssl  -lcrypto -lresolv -lz -lm
> >&5
> ld: warning: ignoring duplicate libraries: '-lmysqlclient', '-lz'
> ld: library 'zstd' not found
> clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)

You are missing zstd library.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Remote IP address in dovecot

2024-03-12 Thread Aki Tuomi via dovecot

> On 10/03/2024 09:27 EET Andre Rodier via dovecot  wrote:
> 
>  
> Hello,
> 
> I am using a webmail, SOGo, to access Dovecot mail server in IMAP.
> 
> SOGo correctly logs the remote IP address, using the standard nginx headers, 
> especially X-Forwarded-For.
> 
> However, when I check the IMAP logs, I see my server's IP address for the 
> "remote_ip" value.
> 
> I think there is a way to override this value from the environment, but I 
> could not find it.
> 
> Thanks for your help,
> 
> -- 
> André Rodier

SOGo has support for this, see 
https://github.com/Alinto/sogo/commit/256b679798404db77fa85b53df6bcf815c8e4007

On dovecot side, be sure to set

login_trusted_networks = ip-address(es)-of-sogo

even if it's 127.0.0.1

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: How to get a memory pointer in the core process

2024-03-11 Thread Aki Tuomi via dovecot


> On 11/03/2024 10:42 EET Joan Moreau  wrote:
> 
> 
> Hi
> Is it possible, from a plugin perspective, to create and recover a pointer in 
> the core process (i.e. memory not lost between 2 calls to the plugin, even 
> after the "deinit" of the plugin" ) ?
> 
> Thanks

Hi Joan!

May I ask what you are attempting to achieve in more detail?

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: How to get a memory pointer in the core process

2024-03-11 Thread Aki Tuomi via dovecot
> On 11/03/2024 12:53 EET Aki Tuomi  wrote:
> 
>  
> > On 11/03/2024 10:42 EET Joan Moreau  wrote:
> > 
> > 
> > Hi
> > Is it possible, from a plugin perspective, to create and recover a pointer 
> > in the core process (i.e. memory not lost between 2 calls to the plugin, 
> > even after the "deinit" of the plugin" ) ?
> > 
> > Thanks
> 
> Hi Joan!
> 
> May I ask what you are attempting to achieve in more detail?
> 
> Aki

Resending.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: deliverability test

2024-03-11 Thread Aki Tuomi via dovecot


> On 11/03/2024 13:43 EET Aki Tuomi  wrote:
> 
>  
> Test
> 
> Aki

Apologies to everyone, this mail was not supposed to make it to the list, yet 
it did.

In that tune, due to a bug in mailman, some of the recent mails have failed to 
make it to the list, so if you have sent a mail after 3rd of March (last  seen 
mail in the archive), you may want to send it again.

I'll be reporting this to the mailman3 developers.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Fw: User-configurable time-based mail deletion in specific folders

2024-02-25 Thread Aki Tuomi via dovecot
Hi!
 
You could return from userdb namespace/foo/mailbox/bar/autoexpunge=15d
 
to set per-user per-mailbox retention policies.
 
Aki
 On 25/02/2024 10:38 EET Rupert Gallagher via dovecot
  wrote:
  
  
  Things like this should be done locally on the Mailclient
  (MUA), IMHO.
  
 If you are a company, then you must delete old e-mails automatically,
 by GDPR law.
  
  Original Message 
 On Feb 21, 2024, 23:25, Steven Varco < dovecot@bbs.varco.ch>
 wrote:
  
  Am 21.02.2024 um 21:25 schrieb Peter Reinhold : > > Hi > I
  have been wondering about if Dovecot has a feature that
  would allow users to > setup a rule for a given folder,
  that mails older than X days should be > deleted? > Or is >
  this something that would need to be done by an external
  script? Yes. It goes beyond of what I expect from an IMAP
  server. > I have looked a bit at autoexpunge, and while the
  basic feature looks to be > what I need, it doesn't seem to
  be configurable down to a specific folder on a > single
  user. Things like this should be done locally on the
  Mailclient (MUA), IMHO. Steven -- https://steven.varco.ch/
  https://www.tech-island.com/
  ___ dovecot
  mailing list -- dovecot@dovecot.org To unsubscribe send an
  email to dovecot-le...@dovecot.org
  Things like this should be done locally on the Mailclient
  (MUA), IMHO.
  
 If you are a company, then you must delete old e-mails automatically,
 by GDPR
 law.
  
  
  
  Original Message 
 On Feb 21, 2024, 23:25, Steven Varco < dovecot@bbs.varco.ch>
 wrote:
  
  Am 21.02.2024 um 21:25 schrieb Peter Reinhold : > > Hi > I
  have been
 wondering about if Dovecot has a feature that would allow users to >
 setup a
 rule for a given folder, that mails older than X days should be >
 deleted? > Or
 is > this something that would need to be done by an external script?
 Yes. It
 goes beyond of what I expect from an IMAP server. > I have looked a
 bit at
 autoexpunge, and while the basic feature looks to be > what I need,
 it doesn't
 seem to be configurable down to a specific folder on a > single user.
 Things
 like this should be done locally on the Mailclient (MUA), IMHO.
 Steven -
 - https://steven.varco.ch/ https://www.tech-island.com/
 ___ dovecot mailing list
 -
 - dovecot@dovecot.org To unsubscribe send an email to dovecot-
 le...@dovecot.org
  
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Packages for Debian bookworm

2024-02-25 Thread Aki Tuomi via dovecot
Hi!
 
They will be added with upcoming 2.4 release.
 
Aki
 On 25/02/2024 15:38 EET Andreas via dovecot 
 wrote:
  
  
 Is there a reason there are no packages for recent Debian and Ubuntu
 versions?
  
 https://repo.dovecot.org/
  
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Valid Docs for Dovecot with postgresql

2024-02-19 Thread Aki Tuomi via dovecot

> On 19/02/2024 22:26 EET burkha...@konsultaner.de  
> wrote:
> 
>  
> Hi! The docs for dovecot with postgres are outdated and I somehow cannot 
> connect from my dovecot instance to my postgresql database.
> 
> I tried a lot but the debug output dosn't help me.
> 
> What user is actually trying to connect to the postgresql? the dovecot user 
> or root or the actual user from the connection config?
> I want to connect locally. Do I use password or md5 or peer with a map to 
> connect? (tried all)
> 
> simple console with pgsql command works fine.
> 
>  I found a couple of "How tos" but nothing helped. Are there any potential 
> version conflict? I'm on 2.3.16 with postgresql 16.
> 
> Thanks!
> Richi
> Hi! The docs for dovecot with postgres are outdated and I somehow cannot
> connect from my dovecot instance to my postgresql database.
> 
> I tried a lot but the debug output dosn't help me.
> 
> What user is actually trying to connect to the postgresql? the dovecot user or
> root or the actual user from the connection config?
> I want to connect locally. Do I use password or md5 or peer with a map to
> connect? (tried all)
> 
> simple console with pgsql command works fine.
> 
>  I found a couple of "How tos" but nothing helped. Are there any potential
> version conflict? I'm on 2.3.16 with postgresql 16.
> 
> Thanks! 
> Richi

You can use password authentication. The user connecting will be dovecot, not 
root. 

connect = host=localhost dbname=mails user=admin password=pass

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: [Dovecot] doveadm delete folders ? / unsubscribe ?

2024-02-19 Thread Aki Tuomi via dovecot


> On 19/02/2024 22:17 EET Ryan Ford  wrote:
> 
>  
> Hello,
> Would you be able to show what you did in order to make this command
> unsubscribe as well? The link provided with the answer, no longer works.
> 
> Thank you, Ryan
> 

doveadm mailbox unsubscribe -u  

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Additional Kerberos (Samba) / GSSAPI auth for intranet users

2024-02-13 Thread Aki Tuomi via dovecot


> On 14/02/2024 05:43 EET r.barclay--- via dovecot  wrote:
> 
>  
> Hi, 
> 
> I have a Dovecot (IMAP only) and Postfix (SMTP) based mail server. 
> User names, mailbox settings and password hashes are loaded from a PostgreSQL 
> database. 
> The users use Thunderbird on the desktop and K9mail or Apple Mail on mobile 
> phones.
> This works fine since a few years.
> 
> Now I'd like to introduce Single Sign On with Thunderbird to ease up the 
> deployment of clients systems. (No more manual mail password entry.)
> 
> Users log in on a Samba AD domain, e.g.: johndoe@ad.example.internal.
> The mail addresses (and equally auth user names for Dovecot) are in the 
> format: john...@example.org
> Up to now users have different passwords for AD and mail. These systems are 
> not integrated.
> 
> I have two related questions concerning that: 
> 
> First question: How can I map between these on the Dovecot side? There are no 
> mailboxes or auth users like "johndoe@ad.example.internal". Instead, the 
> public domain (e.g. example.org) is used for the mail system. Up to now the 
> mail server doesn't know anything about the Samba domain and has nothing to 
> do with that.
> 
> Second question: Can I allow GSSAPI auth for intranet users only (e.g. 
> 192.168.42.0/24)? 
> My Internet router forwards the IMAP and SMTP ports to the mail server to 
> allow the mobiles phones to connect to it. 
> But it doesn't make sense to offer GSSAPI auth for Internet users from all 
> over the world. Isn't that somewhat risky? 
> All the M$ish AD stuff feels somewhat Mystery Meat like for me... 
> 
> Thank you very much for all input and help you can provide! 
> 
> Yours,
> Reg

Firstly, 

I would run LDAP that can match the auth users and return the correct 
(internal) identifier for the user. Since you have kerberos available, you can 
use kerberos to authenticate against your AD.

Secondly,

You got some choices here. You can run an authentication proxy on your internal 
network, or you can accept GSSAPI from internet, which isn't so unsafe, not 
sure what risks you perceive here though?

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Enforcing quotas on shared mailboxes

2024-02-11 Thread Aki Tuomi via dovecot


> On 07/02/2024 12:31 EET dovecot--- via dovecot  wrote:
> 
>  
> I have configured a shared private namespace in dovecot so that, via ACLs, 
> users can access other users' mailboxes.
> 
> I set up a quota for each user and this also works well. The quota is 
> monitored and new messages are denied if the quota is exceeded.
> 
> There is one problem though: apparently dovecot treats shared mailboxes in 
> relation to the current user's quota, it does not consider (as would be 
> appropriate) the shared mailbox owner's quota.
> 
> I will try to explain better with a couple of examples.
> 
> ==
> 
> Consider the following case:
> 
> user1 has a quota of 1MB, totally available
> user2 has a quota of 10MB, totally available
> user1 shares the "Sales" mailbox with user2
> user2 copies a 500KB message to the shared "Sales" mailbox
> user1's quota will be correctly deducted by 500KB, thus resulting in 
> 0.5MB available
> 
> At this point, however, let's try another operation:
> 
> user2 copies an 800KB message to the shared "Sales" mailbox.
> 
> The server should return error because this way user1 exceeds the allocated 
> quota of 1MB (500KB + 800KB), but instead the copy operation succeeds.
> 
> This happens because at the time of the copy operation, dovecot considers the 
> quota limit of user2 instead of considering the quota limit of user1.
> 
> ==
> 
> Let us consider another case, performing the same operations but where the 
> user quota limits are reversed (user1 has a larger quota than user2):
> 
> user1 has a quota of 10MB, totally available
> user2 has a quota of 1MB, totally available
> user1 shares the "Sales" mailbox with user2
> user2 copies a 500KB message to the shared mailbox "Sales"
> 
> The operation fails by overquota, because again dovecot considers user2's 
> quota limit instead of considering user1's quota limit. Therefore, it is as 
> if user2, with a 1MB limit, tries to write to a "larger" area (10MB).
> 
> As a counterevidence, setting user1 and user2 with the same quota limit, the 
> operation succeeds perfectly.
> 
> ==
> 
> Can anyone help me solve the problem? Is this a problem that is related to my 
> configuration?
> Below I attach the output of dovecot -n
> 

Try

plugin {
  quota_rule=Shared/*:ignore
}

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: SQL Authentication when the password contains spaces

2024-02-11 Thread Aki Tuomi via dovecot


> On 11/02/2024 19:11 EET Yassine Chaouche  wrote:
> 
>  
> Dear list,
> 
> I created a dovecot mysql user with a password containing spaces.
> When I try to run doveadm fetch (to test the sql authentication),
> I get the following error message in the logs:
> 
> 
> Feb 11 17:37:32 auth: Fatal: sqlpool: Missing value in connect string: xxx
> 
> the connect line was:
> 
> connect = "host=localhost dbname=mail user=dovecot password=xxx xxx xxx"
> 
> The following code source
> taken from dovecot's github repo[1],
> suggests that the parsing relies on spaces as field separators.
> 
> 
> 
> static int driver_mysql_parse_connect_string(struct mysql_db *db,
>const char *connect_string,
>const char **error_r)
> {
>   const char *const *args, *name, *value;
>   const char **field;
> 
>   db->ssl_cipher = "HIGH";
>   db->ssl_verify_server_cert = 1;
>   db->connect_timeout = SQL_CONNECT_TIMEOUT_SECS;
>   db->read_timeout = MYSQL_DEFAULT_READ_TIMEOUT_SECS;
>   db->write_timeout = MYSQL_DEFAULT_WRITE_TIMEOUT_SECS;
> 
>   args = t_strsplit_spaces(connect_string, " ");
>   for (; *args != NULL; args++) {
>   value = strchr(*args, '=');
>   if (value == NULL) {
>   *error_r = t_strdup_printf("Missing value in connect 
> string: %s",
>  *args);
>   return -1;
>   }
> [...]
> 
>  
> 
> How do I supply the connection string in a suitable way?
> 
> 
> References:
> 
> [1] dovecot source code on github
> https://github.com/dovecot/core/blob/main/src/lib-sql/driver-mysql.c#L194
> 
> 
> Troubleshooting info:
> 
> Dovecot v2.3.19.1 (9b53102964) starting up for imap, lmtp, pop3 (core dumps 
> disabled)
> on Debian 12
> 
> 
> -- 
> yassine -- sysadm

Would it be possible to use a password without spaces?

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: IRC/Matrix

2024-02-09 Thread Aki Tuomi via dovecot


> On 09/02/2024 20:10 EET Duje via dovecot  wrote:
> 
>  
> Hi there! Do you have an IRC or Matrix channel, would you consider 
> opening one for more direct response or questions one has using dovecot? 
> - Duje
> Hi there! Do you have an IRC or Matrix channel, would you consider opening one
> for more direct response or questions one has using dovecot? - Duje

Hi!

Our irc channel #dovecot is at irc.oftc.net.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Problem with share mailbox

2024-02-05 Thread Aki Tuomi via dovecot

> On 05/02/2024 12:11 EET frederic.fondri...@gmail.com wrote:
> 
>  
> 2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
> Iterating prefix shared/shared-boxes/
> 2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
> Iteration finished, got 0 rows
> 2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
> Starting transaction
> 2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
> Setting 'shared/shared-boxes/user/yyy/xxx' to '1'
> 2024-02-05 11:05:15 imap(xxx)<14156>: Debug: dict(file): 
> Dict transaction finished
> 2024-02-05 11:05:15 imap(xxx)<14156>: Error: acl: dict 
> commit failed: dict-file: 
> file_dotlock_open(/var/lib/dovecot/shared-mailboxes.db) failed: Permission 
> denied
> 2024-02-05 11:05:15 imap(xxx)<14156>: Debug: acl vfile: 
> reading file /home/vmail/xxx/Maildir/dovecot-acl
> 2024-02-05 11:05:15 imap(xxx)<14156>: Debug: Mailbox INBOX: 
> Mailbox opened
> 
> ==> permission denied but file is :
> root@servmail:/var/lib/dovecot# ls -lh
> total 4,0K
> -rw-r--r-- 1 root root 113  5 févr. 09:43 instances
> -rwxrwxrwx 1 root root   0  5 févr. 09:42 shared-mailboxe

Dovecot needs write access to the directory too.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Problem with share mailbox

2024-02-05 Thread Aki Tuomi via dovecot

> On 05/02/2024 11:21 EET frederic.fondri...@gmail.com wrote:
> 
>  
> no problem still here :
> 2024-02-05 09:44:12 imap(x)<13848>: Debug: dict(file): 
> dict created (uri=file:/var/lib/dovecot/shared-mailboxes.db, 
> base_dir=/var/run/dovecot)
> 2024-02-05 09:44:12 imap(x)<13848>: Debug: 
> open(/proc/self/io) failed: Permission denied
> 
> root@servmail:/var/lib/dovecot# ls -lh
> total 4,0K
> -rw-r--r-- 1 root root 113  5 févr. 09:43 instances
> -rwxrwxrwx 1 root root   0  5 févr. 09:42 shared-mailboxes.db
> ___

I don't instantly see any problem, did you share a folder or what is the output 
from? You can ignore the /proc/self/io debug message.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Problem with share mailbox

2024-02-05 Thread Aki Tuomi via dovecot

> On 05/02/2024 10:36 EET Frédéric FONDRIEST  
> wrote:
> 
>  
> Hi all,
> we get some problems with sharing mailbox between users.
> when we share something the dovecot-acl file is updated, but the
> shared-mailboxes.db file is not created nor updated.
> Even if we create the file and set permission to 777...
> 

Dovecot systemd unit sets PrivateTmp=yes, so /tmp is not persisted.

Use /var/lib/dovecot/shared-mailboxes.db instead.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: submission_add_received_header option?

2024-02-02 Thread Aki Tuomi via dovecot


> On 02/02/2024 20:25 EET Ellie McNeill  wrote:
> 
>  
> Hi, I've recently upgraded my mail server from Debian 11 to Debian 12. 
> It now runs dovecot 2.3.19.1 (verified with dovecot --version).
> 
> According to the "Dovecot Core Settings" page, a new setting 
> 'submission_add_received_header' was added in dovecot 2.3.19 to give 
> admins the option of hiding the IP of the sending client when using 
> dovecot's submissiond:
> 
> https://doc.dovecot.org/3.0/settings/core/
> 
> However, when I place this option in my config, dovecot refuses to start 
> and says that the option is not recognised:
> 
> doveconf: Fatal: Error in configuration file 
> /etc/dovecot/conf.d/20-submission.conf line 92: Unknown setting: 
> submission_add_received_header
> 
> Can anyone help me with this?
> 
> Ellie

Hi!

Unfortunately you are looking at Dovecot 3.0 (2.4 CE) settings.

Please see https://doc.dovecot.org/settings/core/ for 2.3 settings.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Emails automatically thread by subject, no matter how old or unrelated

2024-01-31 Thread Aki Tuomi via dovecot

> On 01/02/2024 03:49 EET wakod67943--- via dovecot  wrote:
> 
>  
> To preface, I’m using the Crossbox mail client hosted by MXroute. I was 
> directed to Dovecot support when I made my inquiry to the former’s developers.
> 
> Apparently, when you write an email subject that is verbatim to another, 
> previously sent email, the two become linked in a conversation thread.
> 
> I could have an email from 1996 titled “Groceries” and if I make one today 
> titled “Groceries” my inbox would have them connected as one long thread. I’m 
> getting email threads in the 100s because of this.
> 
> Crossbox people have told me it’s not something they have control over. They 
> mentioned it being a Dovecot problem. Has anyone encountered this?
> 
> It would be tremendously inconvenient to ensure that every email I ever send 
> from now on has a unique subject so to as not have them threaded together. 
> Let me be clear, email threading and conversation views are extremely useful. 
> I just want them to be…relevant to the chain of emails that are being looked 
> at.
> 
> Is there a way to group threads by unique header information? It is becoming 
> borderline unusable to sift through invoices.

You could take a look at https://datatracker.ietf.org/doc/html/rfc5256 which 
explains two threading algoritms, ORDEREDSUBJECT and REFERENCES. ORDEREDSUBJECT 
is probably what you are using now, and REFERENCES is the one you'd want to use?

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Splitting up packages

2024-01-31 Thread Aki Tuomi via dovecot


> On 27/01/2024 03:31 EET Larry Rosenman  wrote:
> 
>  
> I'm the maintainer of the dovecot and pigeonhole ports on FreeBSD and am
> looking to make separate
> installable packages like the project does for Linux.  Can you help me know
> what needs to go where and what options (if any) change the base?  Thanks
> for any help here.
> 

Not sure I understand the question. Pigeonhole already is a separate source 
package, https://github.com/dovecot/pigeonhole. Just build it separately, you 
will need Dovecot present for this.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: One Way sync is deleting emails

2024-01-29 Thread Aki Tuomi via dovecot
 
 On 29/01/2024 23:23 EET Steve Moser via dovecot 
 wrote:
  
  
 Hello,
 I am hoping that you can help me.
 I am running this command on my main email server, one way backup/
 sync to the backup server.
 sudo doveadm sync -1 -A remote:root@x.x.x.x
  
 x.x.x.x is my remote server.
 I will add a new email on the main, run the command and it shows up
 on the backup.  - Great!
 Now I delete that email from the main, run the command and the email
 is removed from the backup.  That should not delete anything from the
 backup, correct?  I prefer Not to delete anything, only update/add.
 Do you see what I am doing wrong?
 Thank You
 Here my installed versions
 dovecot-core                          1:2.3.16+dfsg1-3ubuntu2.2 
  dovecot-imapd                         1:2.3.16+dfsg1-
 3ubuntu2.2 dovecot-lmtpd                         1:2.3.16+dfsg1-
 3ubuntu2.2  dovecot-mysql                         1:2.3.16+dfsg1-
 3ubuntu2.2 dovecot-pop3d                         1:2.3.16+dfsg1-
 3ubuntu2.2
  
 postfix                               3.6.4-1ubuntu1.2               
         amd64        High-performance mail transport agentpostfix-
 mysql                         3.6.4-1ubuntu1.2                       
 amd64        MySQL map support for Postfixpostfix-policyd-spf-python 
           2.9.3-1                                 all         
 Postfix policy server for SPF checking
  
 Hello,
  
 I am hoping that you can help me.
  
 I am running this command on my main email server, one way backup/
 sync to the
 backup server.
  
 sudo doveadm sync -1 -A remote:root@x.x.x.x
  
 x.x.x.x is my remote server.
  
 I will add a new email on the main, run the command and it shows up
 on the
 backup.  - Great!
  
 Now I delete that email from the main, run the command and the email
 is removed
 from the backup.  
 That should not delete anything from the backup, correct?  I prefer
 Not to
 delete anything, only update/add.
  
 Do you see what I am doing wrong?
  
 Thank You
  
Sync will synchronize the state of your mailbox, including deletions. One way
sync only promises not to touch the source mailbox. 
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: fts indexer stuck on very large plaintext messages

2024-01-28 Thread Aki Tuomi via dovecot


> On 28/01/2024 10:21 EET p h via dovecot  wrote:
> 
>  
> Hi,
> 
> I recently fts indexed a users mailbox with xapian which had 10-15 very large 
> plaintext messages (>20Mb). The content of these messages was mostly a list 
> of all files on a linux server (tripwire and backup reports).
> 
> The indexer-worker process was completely stuck processing these messages, 
> cpu pegged at 100% running continuously for multiple days.
> 
> I was wondering if there is way to avoid this issue. It would be great if I 
> could configure limits for the fts indexing process.

Hi!

fts-xapian is can be slow, can you try if fts-flatcurve gives better results? 
https://github.com/slusarz/dovecot-fts-flatcurve

it uses xapian too.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Azure AD / Entra Id OAuth2 issue, username not recognized

2024-01-26 Thread Aki Tuomi via dovecot
Your problem is that the access_token field actually contains the token. so you 
need use either local validation or introspection. I would recommend setting up 
local validation.

Aki

> On 26/01/2024 10:33 EET me...@meint.net wrote:
> 
>  
> Dovecot version 2.3.16
> 
> Trying to use Azure AD / Entra Id with OAuth2 authentication, I have most of 
> it working but somehow Dovecot fails to map / recognize the username, 
> hopefully somebody can point out what I'm doing wrong?
> 
> Excerpt from log:
> Jan 26 09:13:20 localhost dovecot: auth: Debug: http-client: conn 
> [2603:1026:3000:108::4]:443 [1]: Got 200 response for request [Req1: POST 
> https://login.microsoftonline.com/79b065d9-761f-4b79-a5cb-71a452f452af/oauth2/v2.0/token]:
>  OK (took 220 ms + 82 ms in queue)
> Jan 26 09:13:20 localhost dovecot: auth: Debug: 
> oauth2(test-exter...@secumailer.com,2a05:d018:ebe:d005:22b6:dc4b:41c6:7fec): 
> Password grant succeeded
> Jan 26 09:13:20 localhost dovecot: auth: Debug: 
> oauth2(test-exter...@secumailer.com,2a05:d018:ebe:d005:22b6:dc4b:41c6:7fec): 
> Processing field token_type
> Jan 26 09:13:20 localhost dovecot: auth: Debug: 
> oauth2(test-exter...@secumailer.com,2a05:d018:ebe:d005:22b6:dc4b:41c6:7fec): 
> Processing field scope
> Jan 26 09:13:20 localhost dovecot: auth: Debug: 
> oauth2(test-exter...@secumailer.com,2a05:d018:ebe:d005:22b6:dc4b:41c6:7fec): 
> Processing field expires_in
> Jan 26 09:13:20 localhost dovecot: auth: Debug: 
> oauth2(test-exter...@secumailer.com,2a05:d018:ebe:d005:22b6:dc4b:41c6:7fec): 
> Processing field ext_expires_in
> Jan 26 09:13:20 localhost dovecot: auth: Debug: 
> oauth2(test-exter...@secumailer.com,2a05:d018:ebe:d005:22b6:dc4b:41c6:7fec): 
> Processing field access_token
> Jan 26 09:13:20 localhost dovecot: auth: Error: 
> oauth2(test-exter...@secumailer.com,2a05:d018:ebe:d005:22b6:dc4b:41c6:7fec): 
> oauth2 failed: Password grant failed: No username returned
> 
> I'm using Resource Owner Password Grant flow. I have the following configured 
> in  conf.d/auth-oauth.conf.ext:
> 
> passdb {
>   driver = oauth2
>   mechanisms = plain
>   args = /etc/dovecot/dovecot-oauth2.plain.conf.ext
> }
> 
> I have the following configured in dovecot-oauth2.plain.conf.ext:
> 
> grant_url = https://login.microsoftonline.com//oauth2/v2.0/token
> client_id = 
> client_secret = 
> username_attribute = email
> use_grant_password = yes
> scope = api:///mail-relay
> debug = yes
> rawlog_dir = /tmp/oauth2
> 
> I have the following response from the oauth raw logs:
> 
> out:
> 1706256800.309971 POST //oauth2/v2.0/token HTTP/1.1
> 1706256800.309971 Host: login.microsoftonline.com
> 1706256800.309971 Date: Fri, 26 Jan 2024 08:13:20 GMT
> 1706256800.309971 User-Agent: dovecot-oauth2-passdb/2.3.16
> 1706256800.309971 Content-Length: 255
> 1706256800.309971 Connection: Keep-Alive
> 1706256800.310013 Content-Type: application/x-www-form-urlencoded
> 1706256800.310018
> 1706256800.310056 
> grant_type=password=test-exter...@example.org=_id=_secret==api:%2f%2f%2fmail-relay
> 
> in:
> 1706256800.530754 HTTP/1.1 200 OK
> 1706256800.530754 Cache-Control: no-store, no-cache
> 1706256800.530754 Pragma: no-cache
> 1706256800.530754 Content-Type: application/json; charset=utf-8
> 1706256800.530754 Expires: -1
> 1706256800.530754 Strict-Transport-Security: max-age=31536000; 
> includeSubDomains
> 1706256800.530754 X-Content-Type-Options: nosniff
> 1706256800.530754 P3P: CP="DSP CUR OTPi IND OTRi ONL FIN"
> 1706256800.530754 x-ms-request-id: 629ce7bf-a5e9-4655-9019-83690c8b4400
> 1706256800.530754 x-ms-ests-server: 2.1.17122.2 - SEC ProdSlices
> 1706256800.530754 X-XSS-Protection: 0
> 1706256800.530754 Set-Cookie: 
> fpc=Am8EyNTmX2ZOkMLj2MB82W4gKLwwAQAAAJ9gRd0O; expires=Sun, 25-Feb-2024 
> 08:13:20 GMT; path=/; secure; HttpOnly; SameSite=None
> 1706256800.530754 Set-Cookie: x-ms-gateway-slice=estsfd; path=/; secure; 
> samesite=none; httponly
> 1706256800.530754 Set-Cookie: stsservicecookie=estsfd; path=/; secure; 
> samesite=none; httponly
> 1706256800.530754 Date: Fri, 26 Jan 2024 08:13:20 GMT
> 1706256800.530754 Content-Length: 1979
> 1706256800.530754
> 1706256800.530754 
> {"token_type":"Bearer","scope":"api:///mail-relay","expires_in":5296,"ext_expires_in":5296,"access_token":"eyJ0eX
>  ..."}
> 
> If I inspect the access token I'm getting:
> {
>   "aud": "",
>   "iss": "",
>   "iat": 1706256500,
>   "nbf": 1706256500,
>   "exp": 1706262097,
>   "acr": "1",
>   "aio": 
> "ATQAy/8VNgbkS6NmHL3yGyROhLM28ooLX57pCjHjp0TGtd7EjwgVZy/i2aEqfV6sxiHeGZ0N",
>   "amr": [
> "pwd"
>   ],
>   "appid": "",
>   "appidacr": "1",
>   "email": "test-exter...@example.org",
>   "ipaddr": "",
>   "login_hint": "",
>   "name": "test-external",
>   "oid": "657401f0-c9f0-402c-af6f-9ef063e7a281",
>   "preferred_username": "test-exter...@example.org",
>   "rh": "0.ATEA2WWweR92eUuly3GkUvRSr08CZ45J3dRLnCQJZCVUYBcxAKo.",
>   "scp": "mail-relay",
>   "sub": "ST9owcQQN2e0tBsHiVjvR8SCdlfUR_114tJk4C2bRxg",
>   "tid": 

RE: Please do not remove replication

2024-01-25 Thread Aki Tuomi via dovecot

> On 25/01/2024 11:57 EET Michael Grant via dovecot  wrote:
> 
>  
> I keep seeing this come up over and over.  My understanding is it’s not 
> getting removed, it’s just moving to the paid version of Dovecot.  What is 
> the cost for a small user license of dovecot that incudes replication anyway? 
>  Is the price that outrageous?  
> I keep seeing this come up over and over.  My understanding is it’s not 
> getting
> removed, it’s just moving to the paid version of Dovecot.  What is the cost 
> for
> a small user license of dovecot that incudes replication anyway?  Is the price
> that outrageous? 


Hi!

Your understanding is wrong though, we are not moving replicator or director to 
a paid version of Dovecot, they are fully removed.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: replication timeout

2024-01-22 Thread Aki Tuomi via dovecot
doveconf replication_dsync_parameters

then you can do

doveadm sync -u   

Aki

> On 22/01/2024 21:05 EET Andy Balholm  wrote:
> 
>  
> Is there a way to find out the exact command line that the
> replicator is using to invoke doveadm sync?
> 
> Andy
> 
> On Monday, January 22, 2024 10:55:12 AM PST, Aki Tuomi wrote:
> > you could try running it manually from cli..
> >
> > doveadm -D sync 
> >
> > Aki
> >
> >> On 22/01/2024 20:32 EET Andy Balholm  wrote:
> >> 
> >>  
> >> I'm not sure how to do that, because I'm doing automatic replication,
> >> not running doveadm sync manually.
> >> I tried adding -D to replication_dsync_parameters, ...
> >
> >
> 
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: replication timeout

2024-01-22 Thread Aki Tuomi via dovecot
you could try running it manually from cli..

doveadm -D sync 

Aki

> On 22/01/2024 20:32 EET Andy Balholm  wrote:
> 
>  
> I'm not sure how to do that, because I'm doing automatic replication,
> not running doveadm sync manually.
> I tried adding -D to replication_dsync_parameters,
> but that gave me an error, because the -D was in the wrong place
> on the command line.
> (It should be doveadm -D sync, and it was ending up with something like
> doveadm sync -D)
> 
> Andy
> 
> On Sunday, January 21, 2024 7:36:13 AM PST, Aki Tuomi wrote:
> > Can you try with doveadm -D and send the log?
> >
> > Aki
> >
> >> On 20/01/2024 19:51 EET Andy Balholm  wrote:
> >> 
> >>  
> >> I forgot to mention in my original message that I'm running Dovecot
> >> 2.3.21 (47349e2482).
> >> 
> >> It seems like the stalls are more likely to happen ...
> >
> >
> 
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: "Connection reset by peer" errors with Outlook

2024-01-22 Thread Aki Tuomi via dovecot

> On 22/01/2024 17:16 EET Steve Dondley via dovecot  wrote:
> 
>  
> > there is no user in the above line
> > 
> >> Some characteristics of the problem that may offer a clue:
> >> * happening with multiple users, not just the same one
> >> * happens from different IP addresses.
> > 
> > bots detected
> 
> The problem is happening to real users on real devices who are reporting very 
> real connection errors, not bots. 
> 
> > 
> >> * happens about 3 to 5 times per day and the errors come in batches like 
> >> above
> >> * MS Outlook error is:
> > 
> > why is it a microsoft problem now ?
> > 
> >> reported error (0x80042109): ‘Outlook cannot conect to your outgoing SMTP 
> >> email server. If you continue to receive this message….blah blah blah
> > 
> > disable pop3 in dovecot, problem is then gone
> 
> The same problem happens on IMAP. Example from log:
> 
> Jan 21 01:51:55 ip-172-30-0-131 dovecot: imap-login: Disconnected (no auth 
> attempts in 0 secs): user=<>, rip=87.xxx.xxx.xxx, lip=172.30.0.131, TLS 
> handshaking: read(size=598) failed: Connection reset by peer, 
> session=
> 
> 


Hi!

Ensure your config says

auth_mechanisms = PLAIN LOGIN

and that you do not enable "Secure Password Authentication (SPA)" on the client 
unless you've done the necessary preparations.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: managesieve server not answering?

2024-01-21 Thread Aki Tuomi via dovecot
Another thing i noticed that you are using 

login_access_sockets = tcpwrap

I wonder if tcpwrap might be interfering here?

Also, since you are using FreeBSD, can you use sockstat -l to determine if 4190 
is listed there anymore?

Did you check that you haven't firewalled the port off?

Aki

> On 19/01/2024 18:36 EET joe a  wrote:
> 
>  
> Where can one look to determine if managesieve "loaded"? Such as via 
> logs or other some means?
> 
> As indicated it did not, AFAICT, bind to 4190 as directed, and no errors 
> appear in logs, via "doveadm log errors".
> 
> If there were some configuration error or failure in some startup, 
> should there not be something?
> 
> joe a.
> 
> 
> On 1/18/2024 18:30:06, Joe Acquisto wrote:
> > Trying to connect to managesieve server configured to port 4190. No go.
> > 
> > Roundcube is configured (thunderbird apparently having nothing current), 
> > but selecting "Add Filter" (new since re-configured for managesieve) 
> > produces "unable to connect to server".
> > 
> > Port 4190 does not seem to answer or be "bound" to anything. Telnet to 
> > 4190 produces "connection refused".
> > 
> > A "one box" solution.
> > 
> > If I had to guess, I would guess, operator error.    Otherwise, things 
> > are looking up.  But, I remember a movie that said never to do that . . .
> > 
> > 
> > ___
> > dovecot mailing list -- dovecot@dovecot.org
> > To unsubscribe send an email to dovecot-le...@dovecot.org
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: replication timeout

2024-01-21 Thread Aki Tuomi via dovecot
Can you try with doveadm -D and send the log?

Aki

> On 20/01/2024 19:51 EET Andy Balholm  wrote:
> 
>  
> I forgot to mention in my original message that I'm running Dovecot
> 2.3.21 (47349e2482).
> 
> It seems like the stalls are more likely to happen
> when the type of sync is "incremental" rather than
> "normal" or "full".
> (I'm inclined to think they only happen for incremental syncs,
> but I'm not sure.)
> 
> Andy
> 
> 
> On Friday, January 19, 2024 9:26:29 AM PST, Andy Balholm wrote:
> > I have two Dovecot mail servers that replicate to each other.
> > Sometimes there are delays in the synchronization,
> > and I notice that the mail log has entries like this:
> >
> > Error: dsync(spokane): I/O has stalled, no activity for 600 
> > seconds (last sent=mailbox, last recv=mailbox_state)
> >
> > Five minutes seems like a long time to sit there waiting with 
> > nothing happening.
> > Is there a way to reduce this timeout so that I don't have so many
> > replicaton connections just sitting around doing nothing?
> >
> > (Of course, a way to prevent the I/O stalls would be great too,
> > but with my limited upload bandwidth, they may be unavoidable.)
> >
> > Andy
> >
> 
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: dsync with vurtial folder leads to mess of msg ID

2024-01-21 Thread Aki Tuomi via dovecot
> On 20/01/2024 17:00 EET Kirill A. Korinsky  wrote:
> 
>  
> I'd like to add that allowing to save messages via virtual folder to some 
> folder
> by change it defintion to
> 
>   *
>   !Archive
>   -Trash
>   -Trash/*
>   -Junk
>   -Junk/*
> all
> 
> doesn't help and syncronization fails as usual:
> 
>   Jan 20 15:34:06 mx1 dovecot: 
> doveadm(kir...@korins.ky)<75563>: Error: Can't create 
> mailbox virtual.All: Can't create virtual mailboxes
> 
> And to share my setup of virtual folder which is quite simple:
> 
>   mail_plugins = $mail_plugins virtual
> 
>   namespace virtual {
> separator = .
> prefix = virtual.
> 
> location = virtual:/etc/dovecot/virtual:INDEX=~/virtual
> 
> mailbox All {
>   special_use = \All
>   comment = All messages without Trash and Junk
> }
> 
> mailbox Flagged {
>   special_use = \Flagged
>   comment = All flagged messages without Trash and Junk
> }
>   }
> 
> --
> wbr, Kirill

Can you send output of doveconf -n?

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Migrate Dovecot 2.0.16 (mbox) to Dovecot 2.3.16 (MaiDir) and preserve POP UIDs

2024-01-20 Thread Aki Tuomi via dovecot
 
 On 20/01/2024 21:25 EET Barbara M.  wrote:
  
  
 Already done a first migration using imapsync
 Good result, but there is the POP3 UIDs problem.
 Searching online give a
 Tried to understand the instructions on:
 https://doc.dovecot.org/settings/plugin/pop3-migration-plugin/?
  
 with limited comprension results (the link in the page is to the old
 wiki).
 Searching online give more confusion ...
  
 I am obviouly interested to resync the INBOX with somethig that give
 to
 clients the old UIDs so they don't re-download all messages in the
 inbox
 as duplicates into their mailbox.
  
 I suppose I can do:
  
 doveadm -v expunge -u  mailbox INBOX all
 rm dovecot* in the Maildir folder
 doveadm force-resync -u  INBOX
  
 then use dsync to migrate the INBOX
  
 Here I need some hints to how setup it and wich syntax use.
  
  
 If useful I can copy or mount the /var/mail/ folder of the old server
 that
 contains the users INBOX to the new server.
  
 Thanks, B
 
Hi!
 
Please see https://doc.dovecot.org/admin_manual/migrating_mailboxes/
for instructions.
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: managesieve server not answering?

2024-01-19 Thread Aki Tuomi via dovecot
Did you notice that your server is listening only on specific IPv4 address? Did 
you try to connect against that?

Aki

> On 19/01/2024 16:43 EET Joe Acquisto  wrote:
> 
>  
> The problem of managesieve server/service not taking hold of port 4190 
> remains.  Perhaps the service is not being loaded/running at all?   
> Pardon any terminology faux pas
> 
> On 1/18/24 18:30, Joe Acquisto wrote:
> > Trying to connect to managesieve server configured to port 4190. No go.
> >
> > Roundcube is configured (thunderbird apparently having nothing 
> > current), but selecting "Add Filter" (new since re-configured for 
> > managesieve) produces "unable to connect to server".
> >
> > Port 4190 does not seem to answer or be "bound" to anything. Telnet to 
> > 4190 produces "connection refused".
> >
> > A "one box" solution.
> >
> > If I had to guess, I would guess, operator error.    Otherwise, things 
> > are looking up.  But, I remember a movie that said never to do that . . .
> >
> >
> > ___
> > dovecot mailing list -- dovecot@dovecot.org
> > To unsubscribe send an email to dovecot-le...@dovecot.org
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Crash in dovecot snippet when using imapc

2024-01-18 Thread Aki Tuomi via dovecot
Sorry, the provided patch link was wrong, it's already in 2.3.21, my bad. 
Anyways, it is still fixed in main, since it does not happen there.

Aki

> On 19/01/2024 09:13 EET Aki Tuomi via dovecot  wrote:
> 
>  
> Hi!
> 
> I was able to reproduce this issue with 2.3.21, but it seems to have been 
> fixed in main. I think 
> https://github.com/dovecot/core/commit/1c1b77dbf9a548aac788efb76973ce2d0fa6c732.patch
>  will fix this.
> 
> Aki
> 
> > On 18/01/2024 22:51 EET John van der Kamp via dovecot  
> > wrote:
> > 
> >  
> > Hello,
> > 
> >  
> > I've found a crash in a very specific setup. A dovecot server with imapc 
> > connection needs to receive an email with no body contents for the intent 
> > of generating a preview/snippet. It crashes somewhere deep in the jungle of 
> > istream and snapshots. I've included a script which sets up the systems to 
> > reproduce the crash.
> > 
> >  
> > I've tested this with several versions. 2.3.16 doesn't seem to be affected, 
> > but 2.3.20 and 2.3.21 are affect.
> > 
> >  
> > For me it produces a traceback like this, using the ubuntu version from 
> > here: https://packages.ubuntu.com/noble/dovecot-core
> > 
> >  
> > (gdb) bt
> > #0  __pthread_kill_implementation (no_tid=0, signo=6, 
> > threadid=140530132887360) at ./nptl/pthread_kill.c:44
> > #1  __pthread_kill_internal (signo=6, threadid=140530132887360) at 
> > ./nptl/pthread_kill.c:78
> > #2  __GI___pthread_kill (threadid=140530132887360, signo=signo@entry=6) at 
> > ./nptl/pthread_kill.c:89
> > #3  0x7fcfb8842476 in __GI_raise (sig=sig@entry=6) at 
> > ../sysdeps/posix/raise.c:26
> > #4  0x7fcfb88287f3 in __GI_abort () at ./stdlib/abort.c:79
> > #5  0x7fcfb8b37fe5 in default_fatal_finish (status=0, 
> > type=LOG_TYPE_PANIC) at ../lib/failures.c:465
> > #6  fatal_handler_real (ctx=, format=, 
> > args=) at ../lib/failures.c:477
> > #7  0x7fcfb8be50d7 in i_internal_fatal_handler (ctx=, 
> > format=, args=) at ../lib/failures.c:879
> > #8  0x7fcfb8b37eea in i_panic (format=0x7fcfb8c29020 "file %s: line %d 
> > (%s): assertion failed: (%s)") at ../lib/failures.c:530
> > #9  0x7fcfb8b3387b in i_stream_header_filter_snapshot_free 
> > (_snapshot=) at ../lib-mail/istream-header-filter.c:663
> > #10 i_stream_header_filter_snapshot_free (_snapshot=0x55dabe297a60) at 
> > ../lib-mail/istream-header-filter.c:655
> > #11 0x7fcfb8bf25ac in i_stream_snapshot_free 
> > (_snapshot=_snapshot@entry=0x55dabe29b0d0) at ../lib/istream.c:253
> > #12 0x7fcfb8bf2654 in i_stream_unref (stream=0x7ffc16cc7fa0) at 
> > ../lib/istream.c:66
> > #13 0x7fcfb8d96baa in index_mail_write_body_snippet 
> > (mail=0x55dabe292058) at index/index-mail.c:1151
> > #14 0x7fcfb8d97e48 in index_mail_parse_bodystructure 
> > (mail=0x55dabe292058, field=MAIL_CACHE_BODY_SNIPPET) at 
> > index/index-mail.c:1551
> > #15 0x7fcfb8d97fe2 in index_mail_fetch_body_snippet 
> > (value_r=0x7ffc16cc8050, mail=0x55dabe292058) at index/index-mail.c:1602
> > #16 index_mail_get_special (_mail=0x55dabe292058, field=, 
> > value_r=0x7ffc16cc8050) at index/index-mail.c:1730
> > #17 0x7fcfb8d16ffe in mail_get_special (mail=mail@entry=0x55dabe292058, 
> > field=field@entry=MAIL_FETCH_BODY_SNIPPET, 
> > value_r=value_r@entry=0x7ffc16cc8050)
> >     at 
> > /home/ubuntu/dovecot/new/dovecot-2.3.21+dfsg1/src/lib-storage/mail.c:418
> > #18 0x55dabc52645c in fetch_snippet (ctx=0x55dabe26e050, 
> > mail=0x55dabe292058, preview=0x55dabe28f1f8) at 
> > ./src/imap/imap-fetch-body.c:615
> > #19 0x55dabc52b5cc in imap_fetch_more_int (ctx=0x55dabe26e050, 
> > cancel=false) at ./src/imap/imap-fetch.c:562
> > #20 0x55dabc52b8ad in imap_fetch_more (ctx=0x55dabe26e050, 
> > cmd=0x55dabe26de98) at ./src/imap/imap-fetch.c:617
> > #21 0x55dabc51fd07 in cmd_fetch (cmd=0x55dabe26de98) at 
> > ./src/imap/cmd-fetch.c:382
> > #22 0x55dabc528af4 in command_exec (cmd=0x55dabe26de98) at 
> > ./src/imap/imap-commands.c:201
> > #23 0x55dabc52e9e2 in client_command_input (cmd=) at 
> > ./src/imap/imap-client.c:1237
> > #24 0x55dabc52ea96 in client_command_input (cmd=) at 
> > ./src/imap/imap-client.c:1307
> > #25 0x55dabc52eeed in client_handle_next_command 
> > (remove_io_r=, client=0x55dabe26d2c8) at 
> > ./src/imap/imap-client.c:1349
> > #26 client_handle_input (client=0x55dabe26d2c8) at 
> > ./src/imap/imap-client.c:1363
> > #27 0x55dabc52f2c4 in client_input (client=0x55dabe26d2c

Re: Crash in dovecot snippet when using imapc

2024-01-18 Thread Aki Tuomi via dovecot
Hi!

I was able to reproduce this issue with 2.3.21, but it seems to have been fixed 
in main. I think 
https://github.com/dovecot/core/commit/1c1b77dbf9a548aac788efb76973ce2d0fa6c732.patch
 will fix this.

Aki

> On 18/01/2024 22:51 EET John van der Kamp via dovecot  
> wrote:
> 
>  
> Hello,
> 
>  
> I've found a crash in a very specific setup. A dovecot server with imapc 
> connection needs to receive an email with no body contents for the intent of 
> generating a preview/snippet. It crashes somewhere deep in the jungle of 
> istream and snapshots. I've included a script which sets up the systems to 
> reproduce the crash.
> 
>  
> I've tested this with several versions. 2.3.16 doesn't seem to be affected, 
> but 2.3.20 and 2.3.21 are affect.
> 
>  
> For me it produces a traceback like this, using the ubuntu version from here: 
> https://packages.ubuntu.com/noble/dovecot-core
> 
>  
> (gdb) bt
> #0  __pthread_kill_implementation (no_tid=0, signo=6, 
> threadid=140530132887360) at ./nptl/pthread_kill.c:44
> #1  __pthread_kill_internal (signo=6, threadid=140530132887360) at 
> ./nptl/pthread_kill.c:78
> #2  __GI___pthread_kill (threadid=140530132887360, signo=signo@entry=6) at 
> ./nptl/pthread_kill.c:89
> #3  0x7fcfb8842476 in __GI_raise (sig=sig@entry=6) at 
> ../sysdeps/posix/raise.c:26
> #4  0x7fcfb88287f3 in __GI_abort () at ./stdlib/abort.c:79
> #5  0x7fcfb8b37fe5 in default_fatal_finish (status=0, 
> type=LOG_TYPE_PANIC) at ../lib/failures.c:465
> #6  fatal_handler_real (ctx=, format=, 
> args=) at ../lib/failures.c:477
> #7  0x7fcfb8be50d7 in i_internal_fatal_handler (ctx=, 
> format=, args=) at ../lib/failures.c:879
> #8  0x7fcfb8b37eea in i_panic (format=0x7fcfb8c29020 "file %s: line %d 
> (%s): assertion failed: (%s)") at ../lib/failures.c:530
> #9  0x7fcfb8b3387b in i_stream_header_filter_snapshot_free 
> (_snapshot=) at ../lib-mail/istream-header-filter.c:663
> #10 i_stream_header_filter_snapshot_free (_snapshot=0x55dabe297a60) at 
> ../lib-mail/istream-header-filter.c:655
> #11 0x7fcfb8bf25ac in i_stream_snapshot_free 
> (_snapshot=_snapshot@entry=0x55dabe29b0d0) at ../lib/istream.c:253
> #12 0x7fcfb8bf2654 in i_stream_unref (stream=0x7ffc16cc7fa0) at 
> ../lib/istream.c:66
> #13 0x7fcfb8d96baa in index_mail_write_body_snippet (mail=0x55dabe292058) 
> at index/index-mail.c:1151
> #14 0x7fcfb8d97e48 in index_mail_parse_bodystructure 
> (mail=0x55dabe292058, field=MAIL_CACHE_BODY_SNIPPET) at 
> index/index-mail.c:1551
> #15 0x7fcfb8d97fe2 in index_mail_fetch_body_snippet 
> (value_r=0x7ffc16cc8050, mail=0x55dabe292058) at index/index-mail.c:1602
> #16 index_mail_get_special (_mail=0x55dabe292058, field=, 
> value_r=0x7ffc16cc8050) at index/index-mail.c:1730
> #17 0x7fcfb8d16ffe in mail_get_special (mail=mail@entry=0x55dabe292058, 
> field=field@entry=MAIL_FETCH_BODY_SNIPPET, 
> value_r=value_r@entry=0x7ffc16cc8050)
>     at 
> /home/ubuntu/dovecot/new/dovecot-2.3.21+dfsg1/src/lib-storage/mail.c:418
> #18 0x55dabc52645c in fetch_snippet (ctx=0x55dabe26e050, 
> mail=0x55dabe292058, preview=0x55dabe28f1f8) at 
> ./src/imap/imap-fetch-body.c:615
> #19 0x55dabc52b5cc in imap_fetch_more_int (ctx=0x55dabe26e050, 
> cancel=false) at ./src/imap/imap-fetch.c:562
> #20 0x55dabc52b8ad in imap_fetch_more (ctx=0x55dabe26e050, 
> cmd=0x55dabe26de98) at ./src/imap/imap-fetch.c:617
> #21 0x55dabc51fd07 in cmd_fetch (cmd=0x55dabe26de98) at 
> ./src/imap/cmd-fetch.c:382
> #22 0x55dabc528af4 in command_exec (cmd=0x55dabe26de98) at 
> ./src/imap/imap-commands.c:201
> #23 0x55dabc52e9e2 in client_command_input (cmd=) at 
> ./src/imap/imap-client.c:1237
> #24 0x55dabc52ea96 in client_command_input (cmd=) at 
> ./src/imap/imap-client.c:1307
> #25 0x55dabc52eeed in client_handle_next_command (remove_io_r= pointer>, client=0x55dabe26d2c8) at ./src/imap/imap-client.c:1349
> #26 client_handle_input (client=0x55dabe26d2c8) at 
> ./src/imap/imap-client.c:1363
> #27 0x55dabc52f2c4 in client_input (client=0x55dabe26d2c8) at 
> ./src/imap/imap-client.c:1407
> #28 0x7fcfb8bfe27d in io_loop_call_io (io=0x55dabe26e660) at 
> ../lib/ioloop.c:737
> #29 0x7fcfb8bff81a in io_loop_handler_run_internal 
> (ioloop=0x55dabe243fd0) at ../lib/ioloop-epoll.c:222
> #30 0x7fcfb8bff8d4 in io_loop_handler_run (ioloop=0x55dabe243fd0) at 
> ../lib/ioloop.c:789
> #31 0x7fcfb8bffa90 in io_loop_run (ioloop=0x55dabe243fd0) at 
> ../lib/ioloop.c:762
> #32 0x7fcfb8b6ce57 in master_service_run (service=0x55dabe243e20, 
> callback=callback@entry=0x55dabc533210 ) at 
> ../lib-master/master-service.c:878
> #33 0x55dabc51ad37 in main (argc=, argv=) 
> at ./src/imap/main.c:575
> 
>  
> John
> 
>  
> 
> Hello,
>  
> I've found a crash in a very specific setup. A dovecot server with imapc
> connection needs to receive an email with no body contents for the intent of
> generating a preview/snippet. It crashes somewhere deep in the jungle of
> istream 

Re: Documentation flaw: man-page link.

2024-01-18 Thread Aki Tuomi via dovecot


> On 18/01/2024 15:34 EET Ralph Corderoy  wrote:
> 
>  
> Hi,
> 
> https://doc.dovecot.org/admin_manual/doveadm_mailbox_commands/ ends with
> 
> The man-pages also contain good descriptions of doveadm commands.
> Man-pages can be accessed online at e.g.
> https://wiki.dovecot.org/Tools/Doveadm
> 
> That wiki page says
> 
> Our primary documentation is now at https://doc.dovecot.org, please
> update your links.
> 
> But I was at https://doc.dovecot.org to start with and there is no
> obvious mention of man pages there.
> 
> This needs tidying up to avoid the loop and ideally provide man pages.
> 
> -- 
> Cheers, Ralph.

Hi!

Thanks for pointing this out, we are working on fixing the links.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: [EXT] Re: Dovecot imap-hibernate errors in 2.3.21

2024-01-18 Thread Aki Tuomi via dovecot
Can you send `doveconf -n`? I think it might be related to the separete user 
accounts somehow.

Aki

> On 18/01/2024 09:45 EET Lucas Rolff  wrote:
> 
> 
> SELinux runs in permissive mode on the system (so doesn't take action, and no 
> violations are logged either), the OS specifically is Oracle Linux 8.9, the 
> only main thing that differs from RHEL or eg rocky/almalinux is I use the 
> newer oracle kernel they release, but shouldn't have any effect
> 
> 
> The only "special" thing being that mail users are isolated on their own 
> Linux user (a domain will result in a local Linux user being created), but 
> that's about it.
> There's nothing with eg virtualized file systems or anything like that, that 
> would result in per user mount points as well
> 
> 
> Sent from Outlook for iOS (https://aka.ms/o0ukef)
> --
> From: Aki Tuomi 
>  Sent: Thursday, January 18, 2024 8:37:07 AM
>  To: Lucas Rolff ; dovecot@dovecot.org 
> 
>  Subject: Re: Dovecot imap-hibernate errors in 2.3.21
> Did you check if maybe selinux is interfering here? I tested the 2.3.21-CE in 
> a RHEL7 VM and hibernation seems to work there.
>  
>  Aki
>  
>  > On 17/01/2024 22:51 EET lu...@lucasrolff.com wrote:
>  > 
>  > 
>  > Thanks for your reply Aki!
>  > 
>  > It doesn't seem to contain much more information sadly that points towards 
> anything related to hibernate itself.
>  > "Debug: open(/proc/self/io) failed: Permission denied" being the main 
> "thing" that seems a bit odd, but that also happens under 2.3.20 as well by 
> the looks of it:
>  > 
>  > ```
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: imap-login: Login: 
> user=, method=PLAIN, rip=193.36.xx.xx, 
> lip=176.9.151.xxx, mpid=3631534, TLS, session=
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Loading modules 
> from directory: /usr/lib64/dovecot
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Module loaded: 
> /usr/lib64/dovecot/lib10_quota_plugin.so
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Module loaded: 
> /usr/lib64/dovecot/lib11_imap_quota_plugin.so
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Module loaded: 
> /usr/lib64/dovecot/lib20_fts_plugin.so
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Module loaded: 
> /usr/lib64/dovecot/lib20_quota_clone_plugin.so
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Module loaded: 
> /usr/lib64/dovecot/lib20_zlib_plugin.so
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Module loaded: 
> /usr/lib64/dovecot/lib21_fts_solr_plugin.so
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Added userdb 
> setting: mail=mdbox:~/mail/example.com/customer/
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Added userdb 
> setting: plugin/quota_rule=*:bytes=10240M
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Effective 
> uid=1098, gid=1098, home=/home/username/
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Quota root: 
> name=User quota backend=count args=
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Quota rule: 
> root=User quota mailbox=* bytes=10737418240 messages=0
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Quota grace: 
> root=User quota bytes=1073741824 (10%)
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: dict(proxy): 
> dict created (uri=proxy::sqlquota, base_dir=/run/dovecot)
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: 
> open(/proc/self/io) failed: Permission denied
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Namespace 
> inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, 
> subscriptions=yes location=mdbox:~/mail/example.com/customer/
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: fs: 
> root=/home/username//mail/example.com/customer, index=, indexpvt=, control=, 
> inbox=, alt=
>  > Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: quota: 
> quota_over_flag check: quota_over_script unset - skipping
>  > Jan 17 20:42:17 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Mailbox INBOX: 
> Mailbox opened
>  > Jan 17 20:42:17 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Mailbox INBOX: 
> Mailbox opened
>  > Jan 17 20:42:49 de-mail01 dovecot[3631433]: 

Re: Dovecot imap-hibernate errors in 2.3.21

2024-01-17 Thread Aki Tuomi via dovecot
Did you check if maybe selinux is interfering here? I tested the 2.3.21-CE in a 
RHEL7 VM and hibernation seems to work there.

Aki

> On 17/01/2024 22:51 EET lu...@lucasrolff.com wrote:
> 
>  
> Thanks for your reply Aki!
> 
> It doesn't seem to contain much more information sadly that points towards 
> anything related to hibernate itself.
> "Debug: open(/proc/self/io) failed: Permission denied" being the main "thing" 
> that seems a bit odd, but that also happens under 2.3.20 as well by the looks 
> of it:
> 
> ```
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: imap-login: Login: 
> user=, method=PLAIN, rip=193.36.xx.xx, 
> lip=176.9.151.xxx, mpid=3631534, TLS, session=
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Loading modules 
> from directory: /usr/lib64/dovecot
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Module loaded: 
> /usr/lib64/dovecot/lib10_quota_plugin.so
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Module loaded: 
> /usr/lib64/dovecot/lib11_imap_quota_plugin.so
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Module loaded: 
> /usr/lib64/dovecot/lib20_fts_plugin.so
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Module loaded: 
> /usr/lib64/dovecot/lib20_quota_clone_plugin.so
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Module loaded: 
> /usr/lib64/dovecot/lib20_zlib_plugin.so
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Module loaded: 
> /usr/lib64/dovecot/lib21_fts_solr_plugin.so
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Added userdb 
> setting: mail=mdbox:~/mail/example.com/customer/
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Added userdb 
> setting: plugin/quota_rule=*:bytes=10240M
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Effective 
> uid=1098, gid=1098, home=/home/username/
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Quota root: 
> name=User quota backend=count args=
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Quota rule: 
> root=User quota mailbox=* bytes=10737418240 messages=0
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Quota grace: 
> root=User quota bytes=1073741824 (10%)
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: dict(proxy): 
> dict created (uri=proxy::sqlquota, base_dir=/run/dovecot)
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: 
> open(/proc/self/io) failed: Permission denied
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Namespace 
> inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, 
> subscriptions=yes location=mdbox:~/mail/example.com/customer/
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: fs: 
> root=/home/username//mail/example.com/customer, index=, indexpvt=, control=, 
> inbox=, alt=
> Jan 17 20:42:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: quota: 
> quota_over_flag check: quota_over_script unset - skipping
> Jan 17 20:42:17 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Mailbox INBOX: 
> Mailbox opened
> Jan 17 20:42:17 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Mailbox INBOX: 
> Mailbox opened
> Jan 17 20:42:49 de-mail01 dovecot[3631433]: imap-hibernate: Error: conn 
> unix:imap-hibernate (pid=3631534,uid=1098): IMAP client fd not received
> Jan 17 20:42:49 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Error: Couldn't 
> hibernate imap client: /run/dovecot/imap-hibernate disconnected
> Jan 17 20:43:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Mailbox INBOX: 
> Mailbox opened
> Jan 17 20:43:49 de-mail01 dovecot[3631433]: imap-hibernate: Error: conn 
> unix:imap-hibernate (pid=3631534,uid=1098): IMAP client fd not received
> Jan 17 20:43:49 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Error: Couldn't 
> hibernate imap client: /run/dovecot/imap-hibernate disconnected
> Jan 17 20:44:16 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Debug: Mailbox INBOX: 
> Mailbox opened
> Jan 17 20:44:49 de-mail01 dovecot[3631433]: imap-hibernate: Error: conn 
> unix:imap-hibernate (pid=3631534,uid=1098): IMAP client fd not received
> Jan 17 20:44:49 de-mail01 dovecot[3631433]: 
> imap(custo...@example.com)<3631534>: Error: Couldn't 
> hibernate imap client: 

Re: Uncompress compressed messages in Maildir mailbox?

2024-01-17 Thread Aki Tuomi via dovecot
Did you try gunzip?

Aki

> On 17/01/2024 20:32 EET Alexander Chekalin  wrote:
> 
>  
> Thank you!
> 
> Here is the whole problem I see:
> 
> as I saw how good it is to have messages compressed I used 
> https://github.com/George-NG/dovecot-maildir-compress script to compress 
> whole mailboxes and thus save more space on disk. Looks like lock won't 
> worked well so now I can see lines like that in Dovecot logs:
> 
> Error: Mailbox ... : Deleting corrupted cache record uid=61: UID 61: 
> Broken virtual size in mailbox ... : read(compress(/data/vmail/...)): 
> FETCH BODY[] got too little data: 38910 vs 70020"
> 
> I tried to recover these messages by uncompress files with your command, 
> and I can say it was possible to uncompress some files while others (the 
> one that were reffered by these errors lines) seems can't be recovered.
> 
> Seems like I have data lost in some messages and this is not something I 
> got used with dovecot which I use since pre-1.0 version.
> 
> P.S. I also tried gzip-ing messages so how have to ask you for the 
> command to un-gzip messages, as "doveadm fs get compress 
> gzip:6:posix:prefix=$PWD/ filename" seems not working for me.
> 
> 
> >> On 17/01/2024 18:08 eetacheka...@lazurit.com  wrote:
> >>
> >>   
> >> Some time ago I enabled compression on incoming messages, so LMTP 
> >> delivered messages were compressed. Good idea in terms of disk space, but 
> >> now I cannot uncompress any of these messages even when I need to!
> >>
> >> I was using this setting:
> >>
> >> plugins {
> >>zlib_save = lz4
> >> }
> >>
> >> and now I can see this string at the beginning of each message file - 
> >> "Dovecot-LZ4", so no other software can uncompress them for me.
> >>
> >> Please advise, how can I uncompress message file in Maildir mailbox when I 
> >> need to access its contents directly?
> >
> > One simple way:
> >
> > doveadm fs get compress lz4:6:posix:prefix=$PWD/ filename
> >
> > AkiThank you!
> Here is the whole problem I see:
> as I saw how good it is to have messages compressed I used https://github.com/
> George-NG/dovecot-maildir-compress script to compress whole mailboxes and thus
> save more space on disk. Looks like lock won't worked well so now I can see
> lines like that in Dovecot logs:
> Error: Mailbox ... : Deleting corrupted cache record uid=61: UID 61: Broken
> virtual size in mailbox ... : read(compress(/data/vmail/...)): FETCH BODY[] 
> got
> too little data: 38910 vs 70020"
> I tried to recover these messages by uncompress files with your command, and I
> can say it was possible to uncompress some files while others (the one that
> were reffered by these errors lines) seems can't be recovered.
> Seems like I have data lost in some messages and this is not something I got
> used with dovecot which I use since pre-1.0 version.
> P.S. I also tried gzip-ing messages so how have to ask you for the command to
> un-gzip messages, as "doveadm fs get compress gzip:6:posix:prefix=$PWD/
> filename" seems not working for me.
> 
>   On 17/01/2024 18:08 EET acheka...@lazurit.com wrote:
> 
> 
>   Some time ago I enabled compression on incoming messages,
>   so LMTP delivered messages were compressed. Good idea in
>   terms of disk space, but now I cannot uncompress any of
>   these messages even when I need to!
> 
>   I was using this setting:
> 
>   plugins {
> zlib_save = lz4
>   }
> 
>   and now I can see this string at the beginning of each
>   message file - "Dovecot-LZ4", so no other software can
>   uncompress them for me.
> 
>   Please advise, how can I uncompress message file in Maildir
>   mailbox when I need to access its contents directly?
> 
>  One simple way:
> 
>  doveadm fs get compress lz4:6:posix:prefix=$PWD/ filename
> 
>  Aki
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Dovecot imap-hibernate errors in 2.3.21

2024-01-17 Thread Aki Tuomi via dovecot
Jan 13 01:09:03 mail01 dovecot[3646235]: imap-hibernate: Error: conn 
unix:imap-hibernate (pid=3646265,uid=1010): IMAP client fd not received

This is bit weird. Can you try enabling mail_debug=yes and trying once more on 
test system?

Aki

> On 17/01/2024 21:06 EET lu...@lucasrolff.com wrote:
> 
>  
> Hello,
> 
> I recently upgraded a Dovecot install from 2.3.20 to 2.3.21 from the 
> 2.3-latest repository ( 
> http://repo.dovecot.org/ce-2.3-latest/rhel/$releasever/RPMS/$basearch )
> 
> However since then, I seem to be getting:
> Jan 13 01:08:32 mail01 dovecot[3646235]: imap-login: Login: 
> user=, method=PLAIN, rip=35.243.xxx.xxx, lip=176.9.xxx.xxx, 
> mpid=3646265, TLS, session=
> Jan 13 01:09:03 mail01 dovecot[3646235]: imap-hibernate: Error: conn 
> unix:imap-hibernate (pid=3646265,uid=1010): IMAP client fd not received
> Jan 13 01:09:03 mail01 dovecot[3646235]: 
> imap(u...@example.com)<3646265>: Error: Couldn't hibernate 
> imap client: /run/dovecot/imap-hibernate disconnected
> 
> This seems to be the case for every email-account on the system.
> 
> Related configs:
> 
> 20-imap.conf:
> protocol imap {
>   imap_hibernate_timeout = 30s
> 
>   imap_idle_notify_interval = 24 mins
> 
>   mail_plugins = $mail_plugins imap_quota quota_clone zlib fts fts_solr
> 
>   mail_max_userip_connections = 20
> }
> 
> 10-master.conf:
> service imap {
>   # Most of the memory goes to mmap()ing files. You may need to increase this
>   # limit if you have huge mailboxes.
>   #vsz_limit = $default_vsz_limit
> 
>   unix_listener imap-master {
> user = $default_internal_user
>   }
>   extra_groups = $default_internal_group
> }
> 
> service imap-hibernate {
>   unix_listener imap-hibernate {
> mode = 0660
> group = $default_internal_group
>   }
> }
> 
> 10-metrics.conf
> event_exporter log {
>   format = json
>   format_args = time-rfc3339
>   transport = log
> }
> 
> metric hibernation_logging {
>   exporter = log
>   filter = event=imap_client_hibernated OR event=imap_client_unhibernated
> }
> 
> socket:
> 
> $ stat /run/dovecot/imap-hibernate
>   File: /run/dovecot/imap-hibernate
>   Size: 0 Blocks: 0  IO Block: 4096   socket
> Device: 19h/25d   Inode: 48551407Links: 1
> Access: (0660/srw-rw)  Uid: (0/root)   Gid: (   97/ dovecot)
> Context: system_u:object_r:dovecot_var_run_t:s0
> Access: 2024-01-13 01:03:07.432084831 +0100
> Modify: 2024-01-13 00:50:56.394662577 +0100
> Change: 2024-01-13 00:50:56.394662577 +0100
>  Birth: -
> 
> >From the change log, I see the following:
> 
>   - imap-hibernate: If an IMAP client unhibernation timed out with
> "(version received)", the unhibernation could still have successfully
> finished later on and continued working normally. This was rather
> confusing, because imap-hibernate already logged that the client got
> disconnected. Avoid this by forcing the connection to shutdown on
> unhibernation timeout.
> 
> 
> By the looks of it, it seems hibernation never actually happens anymore as of 
> the new version.
> Downgrading to version 2.3.20 again seems to make hibernation function again 
> based on the event logs.
> 
> In 2.3.21 I only see events being logged for `imap_client_hibernated` which 
> matches the /run/dovecot/imap-hibernate disconnected:
> "error":"/run/dovecot/imap-hibernate disconnected"
> 
> In 2.3.20 I get both imap_client_hibernated and imap_client_unhibernated 
> events (that it happens and when idle_done is triggered).
> 
> Thank you in advance!
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Uncompress compressed messages in Maildir mailbox?

2024-01-17 Thread Aki Tuomi via dovecot


> On 17/01/2024 18:08 EET acheka...@lazurit.com wrote:
> 
>  
> Some time ago I enabled compression on incoming messages, so LMTP delivered 
> messages were compressed. Good idea in terms of disk space, but now I cannot 
> uncompress any of these messages even when I need to!
> 
> I was using this setting:
> 
> plugins {
>   zlib_save = lz4
> }
> 
> and now I can see this string at the beginning of each message file - 
> "Dovecot-LZ4", so no other software can uncompress them for me.
> 
> Please advise, how can I uncompress message file in Maildir mailbox when I 
> need to access its contents directly?


One simple way:

doveadm fs get compress lz4:6:posix:prefix=$PWD/ filename

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: recipient delimiter option in dovecot

2024-01-17 Thread Aki Tuomi via dovecot

> On 17/01/2024 14:47 EET André Rodier via dovecot  wrote:
> 
>  
> Hello, all.
> 
> 
> Postfix allows me to configure multiple characters to be used as 
> recipient delimiter.
> 
> However, I don't see that in dovecot, it seems I can only use one 
> character in recipient_delimiter ?
> 
> Am I right ? Does dovecot would only let me use email+...@domain.com, or 
> can I use other forms, for instance email~b...@domain.com and 
> email@domain.com ?
> 
> Thanks.
> And

Multiple recipient delimiters is supported since 2.3.0.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: ARM support

2024-01-14 Thread Aki Tuomi via dovecot


> On 15/01/2024 08:20 EET Michael Tokarev  wrote:
> 
>  
> 14.01.2024 17:46, peter+dovecot--- via dovecot:
> 
> > Isn't https://github.com/dovecot/docker the source for the official docker 
> > images?
> 
> Docker images of dovecot, most likely yes (I don't know).
> 
> /mjt

I ment Docker's official image library, which is bit different. We of course 
publish our own official images.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: ARM support

2024-01-14 Thread Aki Tuomi via dovecot


> On 14/01/2024 11:46 EET peter+dovecot--- via dovecot  
> wrote:
> 
>  
> I would be fantastic if dovecot could release arm64 debian packages to 
> the community repo, as it would allow fixing a lot of downstream problems:
> - release of official arm64 docker images
> - fix other downstream docker images like docker mailserver and mailcow
> 

Unfortunately we haven't even gotten the AM64 docker image published officially 
yet. We have been waiting for action on this from Docker official images team 
for a long while now. So I doubt building arm64 packages would move this 
anywhere.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: execute: /user/bin/checkpassword /user/libexec/dovecot/checkpassword-reply

2024-01-14 Thread Aki Tuomi via dovecot


> On 09/01/2024 17:45 EET Steve Button  wrote:
> 
>  
> Hi,
> 
> 
> 
> I have recently moved a dovecot installation from 2.2.36 on RHEL7.9 onto
> 2.3.20 on Amazon Linux 2023 and I'm now seeing the error message in the
> title relating to /usr/bin/checkpassword (which doesn't exist on either).
> This is a project that I've inherited, and I've never used dovecot
> previously. I've been searching around for a couple of days trying to
> figure this out. Running out of ideas.
> 
>

Hi!

Your checkpassword exists with code 84.

Jan 04 17:23:22 auth: Error:
checkpassword(redacted@redacted.redacted.local,127.0.0.1,<6uwL/SEOzpt/AAAB>):
Child 106455 exited with status 84

Maybe figure out why?

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Autocreate virtual users' home directory?

2024-01-03 Thread Aki Tuomi via dovecot

> On 03/01/2024 23:38 EET John Fawcett  wrote:
> 
>  
> Hi
> 
> I have recently rectified an old configuration error whereby I had 
> virtual users' home and mail directories set to the same value.
> 
> I used option 3 from "ways to set up home directory"
> 
> https://doc.dovecot.org/configuration_manual/home_directories_for_virtual_users/
> 
> so I have:
> 
> home= |/var/vmail/domain/user/home/|
> 
> mail= |/var/vmail/domain/user/|
> 
> |where domain and user are substituted for the real domain and user.|
> 
> For existing users where I created the home directory when migrating the 
> settings, there is no issue. But I am seeing errors like this for new users:
> 
> lmtp(t...@example.com)<125035>: Error: 
> autoexpunge: Couldn't create dovecot.autoexpunge.lock lock: 
> file_create_locked(/var/vmail/example.com/t...@example.com/home//dovecot.autoexpunge.lock)
>  
> failed: 
> safe_mkstemp(/var/vmail/example.com/t...@example.com/home//dovecot.autoexpunge.lock)
>  
> failed: No such file or directory
> 
> Seems that differently to mail directory which is automatically created, 
> the home directory is not created. I couldn't see any config setting 
> that would autocreate home directories (where home directories are 
> subdirectories of mail directories).
> 
> Would it be worthwhile introducing an autocreate option for home 
> directories?
> 
> John
> 
> 
> 
> 
> 
> Hi
> I have recently rectified an old configuration error whereby I had virtual
> users' home and mail directories set to the same value.
> I used option 3 from "ways to set up home directory"
> https://doc.dovecot.org/configuration_manual/
> home_directories_for_virtual_users/
> so I have:
> home= /var/vmail/domain/user/home/ 
> mail= /var/vmail/domain/user/
> where domain and user are substituted for the real domain and user.
> For existing users where I created the home directory when migrating the
> settings, there is no issue. But I am seeing errors like this for new users:
> lmtp(t...@example.com)<125035>: Error: autoexpunge:
> Couldn't create dovecot.autoexpunge.lock lock: file_create_locked(/var/vmail/
> example.com/t...@example.com/home//dovecot.autoexpunge.lock) failed:
> safe_mkstemp(/var/vmail/example.com/t...@example.com/home//
> dovecot.autoexpunge.lock) failed: No such file or directory
> Seems that differently to mail directory which is automatically created, the
> home directory is not created. I couldn't see any config setting that would
> autocreate home directories (where home directories are subdirectories of mail
> directories).
> Would it be worthwhile introducing an autocreate option for home directories?
> John
> 
> 
> 

I don't really understand why you want home to be under mail directory? How 
about swapping them around like 

home= /var/vmail/domain/user/
mail= /var/vmail/domain/user/mail

because this makes more sense in many ways?

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Solr/Tika patches for dovecot 2.3.21

2024-01-03 Thread Aki Tuomi via dovecot


> On 09/12/2023 15:02 EET John Fawcett  wrote:
> 
>  
> Hi
> 
> I've just made updated versions of 3 patches against the latest release 
> 2.3.21 in case they are useful to someone or might get considered for 
> official inclusion.
> 
> John
> 
> *dovecot-2.3.21-tika-http-auth.patch*
> 
> Allows specification of username and password in the fts_tika setting 
> for basic auth against tika server. For example
> 
> fts_tika = https://user:password@tika_server:443/tika
> 
> *dovecot-2.3.21-solr-max-size.patch
> *
> 
> This is a simplified version of my previous patch. Sets a size limit 
> (configuration fts_max_size) on message bodies that are to be indexed. 
> Message bodies for messages larger than fts_max_size are not sent to 
> solr. Defaults to zero which means no limit. For example
> 
> fts_max_size = 10M
> 
> *dovecot-2.3.21-solr-max-rows.patch
> *
> 
> When dovecot sends a search to solr it uses the rows parameter. For 
> multiple mailbox search the value used is SOLR_MAX_MULTI_ROWS , 
> hardcoded to 10. For single mailbox search the value is uidnext. 
> This patch introduces an upper limit for single mailbox search using the 
> same value as SOLR_MAX_MULTI_ROWS, while leaving the existing 
> functionality of sending the uidnext value if it is smaller. This is 
> just to place a more reasonable upper bound since uidnext can get much 
> larger.
> 
> Hi
> I've just made updated versions of 3 patches against the latest release 2.3.21
> in case they are useful to someone or might get considered for official
> inclusion.
> John
> dovecot-2.3.21-tika-http-auth.patch
> Allows specification of username and password in the fts_tika setting for 
> basic
> auth against tika server. For example
> fts_tika = https://user:password@tika_server:443/tika
> dovecot-2.3.21-solr-max-size.patch
> This is a simplified version of my previous patch. Sets a size limit
> (configuration fts_max_size) on message bodies that are to be indexed. Message
> bodies for messages larger than fts_max_size are not sent to solr. Defaults to
> zero which means no limit. For example
> fts_max_size = 10M
> dovecot-2.3.21-solr-max-rows.patch
> When dovecot sends a search to solr it uses the rows parameter. For multiple
> mailbox search the value used is SOLR_MAX_MULTI_ROWS , hardcoded to 10. 
> For
> single mailbox search the value is uidnext. This patch introduces an upper
> limit for single mailbox search using the same value as SOLR_MAX_MULTI_ROWS,
> while leaving the existing functionality of sending the uidnext value if it is
> smaller. This is just to place a more reasonable upper bound since uidnext can
> get much larger.
> 
> ___

Could you please post these into https://github.com/dovecot/core against main 
please?

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Panic: file index-search-result.c: line 132 (index_search_result_update_flags): assertion failed: (result->search_args->args == _arg)

2024-01-03 Thread Aki Tuomi via dovecot


> On 21/12/2023 20:32 EET Markus Doits via dovecot  wrote:
> 
>  
> Hello dovecot community,
> 
> I hope you can help me with the following panic:
> 
> ---
> 
> Panic:
> file index-search-result.c: line 132 (index_search_result_update_flags): 
> assertion failed: (result->search_args->args == _arg)
> 
> Error:



> 
> ---
> 
> I have this virtual mailbox configured:
> 
> namespace {
>prefix = _/
>separator = /
>location = 
> virtual:~/Maildir/virtual:LAYOUT=maildir++:INDEX=~/Maildir/virtual
> }
> 

You should not store virtual folders inside Maildir (assuming this is your mail 
location). Please use
~/virtual/ instead. The INDEX directive is not needed in this case as it points 
to same place anyways.

> When I remove this mailbox, the error goes away - so it seems to be 
> something with the virtual mailbox.
> 
> As the fts provider I use 
> [fts_flatcurve](https://slusarz.github.io/dovecot-fts-flatcurve), maybe 
> this has something to do with it?
> 
> Any help appreciated how to debug this further and maybe fix it. Thanks!

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: how to take mdbox extract of time interval and restore that again?

2024-01-03 Thread Aki Tuomi via dovecot


> On 27/12/2023 11:33 EET lutzn via dovecot  wrote:
> 
>  
> Hi!
> 
> Due to a fatal hardware error we have to extract data of all existing imap 
> accounts and all their boxes/folders etc. from an mdbox store starting with 
> the 5th of december until today.  Then we have to restore the old system and 
> import the data back into it.  Mail before 5th will come from the system 
> backup, newer mail from that export.  After that it may be possible that 
> some/few mails may exist twice in the boxes, but that's ok.
> 
> 1.  What would be the command line for doveadm to extract everything starting 
> the 5th?  I find that the command line for doveadm is pretty complicated.  I 
> tried but I am not sure if I really got all mails exported.  So I would like 
> to ask if someone with much more experience can give me a command line that 
> surely does what we want.  The command will be run from a remote machine.
> 

You can use doveadm import to specify search, using doveadm-search-query(7). Be 
careful though, import is not re-entrant, and will happily import same mails 
again.

> 2.  And what would be the command line to restore all the mails that we have 
> exported back into the system?  (The folder and account structure is the 
> same.)
> 

doveadm sync is probably best tool for this.

> 3.  After that some of the mails may exist twice.  Is that a problem, maybe 
> because of internal IDs?
> 

If duplicates appear, you can try using doveadm deduplicate.

> 4.  Are there any other things we need to be aware of when doing that?
> 
> I thank you very much for your help!
> 
> Cheers!
> -lutzn
> 
> 
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Broken Docs

2024-01-02 Thread Aki Tuomi via dovecot


> On 02/01/2024 14:38 EET Peter  wrote:
> 
>  
> The page:
> 
> https://doc.dovecot.org/configuration_manual/protocols/lmtp_server/
> 
> ... has links to the old dovecot wiki which are now broken, specifically 
> the Postfix and Exim links at the bottom of the page.
> 
> Can someone please port those pages over to the docs and fix the links?
> 
> 
> Peter
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org

Work in progress, see https://github.com/dovecot/documentation/pull/786

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Authentication failure due to address space limit

2023-12-14 Thread Aki Tuomi via dovecot

> On 14/12/2023 12:38 EET Max Nikulin  wrote:
> 
>  
> On 06/12/2023 18:06, Max Nikulin wrote:
> > 
> > dovecot[72165]: auth-worker: Error: fatal error: failed to reserve page 
> > summary memory
> > dovecot[72165]: auth-worker: Error:
> > dovecot[72165]: auth-worker: Error: runtime stack:
> > dovecot[72165]: auth-worker: Error: runtime.throw({0x7f552c418194?, 
> > 0x7f552c1feb10?})
> > dovecot[72165]: auth-worker: Error: runtime/panic.go:1047 +0x5f 
> > fp=0x7f552c1feac0 sp=0x7f552c1fea90 pc=0x7f552c28a53f
> > dovecot[72165]: auth-worker: Error: 
> > runtime.(*pageAlloc).sysInit(0x7f552c5f6fd0)
> 
> For the case that somebody will get this thread in search engine results:
> 
> I have found another thread describing similar errors due to a custom 
> PAM module for 2 factor authentication:
> 
> dovecot: lmtp: Error: fatal error: failed to reserve page summary memory
> https://dovecot.org/pipermail/dovecot/2020-September/119952.html
> Thu Sep 17 12:20:12 EEST 2020
> https://dovecot.org/pipermail/dovecot/2020-October/120108.html
> Thu Oct 8 18:04:26 EEST 2020
> 
> Perhaps Go is not the best language to implement PAM modules if memory 
> footprint is not expected to be large. On the other hand e.g. argon2 
> hashes may be really memory hungry, so vsz_limit must be set to 
> appropriate value.
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org


You can set service auth and service auth-worker vsz_limit to 2G, that is 
usually enough for PAM and Argon2.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: ARM support

2023-12-12 Thread Aki Tuomi via dovecot


> On 11/12/2023 01:26 EET Brad Koehn via dovecot  wrote:
> 
>  
> Thanks for the reply. Is there any chance I can help? Otherwise, where are 
> the scripts for doing the build so I can produce my own packages?
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org

For debian, you should find necessary files at 
http://repo.dovecot.org/ce-2.3-latest/debian/bullseye/pool/main/

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Username used by dovecot to access database certificate and key files

2023-12-08 Thread Aki Tuomi via dovecot

> On 08/12/2023 14:45 EET John Fawcett  wrote:
> 
>  
> Hi
> 
> does anyone happen to know the username under which dovecot accesses the 
> certificate and key files when connecting to a mariadb database with 
> ssl? I can't seem to get dovecot to read the files without a "other" 
> readable bit set.
> 
> I have dovecot users in mysql with the following connect string in 
> dovecot-sql.conf.ext
> 
> connect = host=x.x.x host=y.y.y host=z.z.z dbname=maildb user=mailuser 
> password=xx \
>      ssl_ca=/etc/ssl/mysql/ca-cert.pem \
>      ssl_cert=/etc/ssl/mysql/client-cert.pem \
>      ssl_key=/etc/ssl/mysql/client-key.pem \
>      ssl_verify_server_cert=yes
> 
> The certificate and key files in /etc/ssl/mysql/ are owned by root with 
> group users:
> 
> ls -l /etc/ssl/mysql
> 
> total 12
> -r--r--r--. 1 root root  2041 Jun 22 15:32 ca-cert.pem
> -r--r--r--. 1 root users 1907 Jun 22 15:32 client-cert.pem
> -r--r--r--. 1 root users 3272 Jun 22 15:32 client-key.pem
> 
> For my test dovecot, dovenull and vmail are all members of group users:
> 
> grep users /etc/group
> users:x:100:postfix,dovecot,dovenull,vmail
> 
> If I remove the "other" readable attribute on the certificate and key 
> files, dovecot complains it can't connect to the db server:
> 
> auth: Error: mysql(x.x.x): Connect failed to database (maildb): TLS/SSL 
> error: Permission denied (13) - waiting for 1 seconds before retry
> 
> I realize it only adds marginal security to not have these files world 
> readable, but still it is puzzling why dovecot cannot read them in that 
> case. Can anyone see what I am missing?
> 
> Thanks
> 
> John

The group depends on process, usually dovecot uses four different identities:

root, dovecot:dovecot, dovenull:dovenull and vmail:vmail (or per-user identity).

Any extra groups are removed during execution, but if you want, you can use

https://doc.dovecot.org/configuration_manual/service_configuration/#extra-groups

like

service imap {
  ... 
  extra_groups = users
}

to grant the process users membership during execution.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Compiler error

2023-12-06 Thread Aki Tuomi via dovecot
This happens because timezone is a function that returns something totally 
different in FreeBSD, and it happens in unit test code.

Maybe ports have a patch for this?

Aki

> On 06/12/2023 12:22 EET Goetz Schultz  wrote:
> 
>  
> Thanks, I may have to extrapolate the file in question.
> Today was a clang patch in the pipeline - I wonder if that has caused 
> that fallout?
> 
> 
> Thanks and regards
> 
>Goetz R Schultz
> 
> >8
> Quis custodiet ipsos custodes?
>/"\
>\ /  ASCII Ribbon Campaign
> X   against HTML e-mail
>/ \
> 8<
> 
> On 06/12/2023 10:01, Xavier Humbert wrote:
> > Le 06/12/2023 10:57, Goetz Schultz a écrit :
> >> Hi Xavier,
> >>
> >> tarball, direct downloaded from the dovecot site,
> >> Was not a problem prior to FBSD14 - so I wonder if there is a compiler 
> >> switch to be set.
> >>
> >> Thanks and regards
> >>
> >>   Goetz R Schultz
> >>
> >> >8
> >> Quis custodiet ipsos custodes?
> >>   /"\
> >>   \ /  ASCII Ribbon Campaign
> >>    X   against HTML e-mail
> >>   / \
> >> 8<
> >>
> > In ports, Dovecot is up-to-date, and compiles fine :
> > 
> > [root@numenor ~]# pkg info dovecot
> > dovecot-2.3.21_1
> > Name   : dovecot
> > Version    : 2.3.21_1
> > 
> > 
> >> On 06/12/2023 09:48, Xavier Humbert wrote:
> >>> Le 06/12/2023 10:44, Goetz Schultz a écrit :
>  Hi,
> 
>  I have upgraded my system to FreeBSD14 and tried to recompile 
>  dovecot. The following error is thrown now (It did compile on FBSD13):
> 
>  
>  test-mail-index-transaction-update.c:650:36: error: incompatible 
>  pointer to integer conversion passing 'char *(*)(int, int)' to 
>  parameter of type 'time_t' (aka 'long') [-Wint-conversion]
>      mail_index_update_day_headers(t, tests[i].now + 
>  timezone);
>  ^~~
>  
> 
> 
>  (t, tests[i].now + timezone);
>      ^~~
> 
> 
>  Is there a patch or something like that to compensate?
> 
> >>> Hi Goetz,
> >>>
> >>> Are you installing manually from tarball or from ports (cd 
> >>> /usr/ports/mail/dovecot && make install) ?
> >>>
> >>> Regards,
> >>>
> >>> Xavier
> >>>
> >>
> 
> >8--
> 
>   /"\
>   \ /  ASCII Ribbon Campaign
>X   against HTML e-mail
>   / \ 
> 
>This message is transmitted on 100% recycled electrons.
> 
> >8--
> Unsigned message - no responsibillity that content is not altered
> 
> 
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: doveadm user '*' not working, virtual users only with sqlite

2023-12-02 Thread Aki Tuomi via dovecot
iterate_query only works with

userdb {
  driver = sql
  args = /path/to/auth-sql.conf.ext
}

Aki

> On 02/12/2023 00:02 EET John Stoffel  wrote:
> 
>  
> > "John" == John Stoffel  writes:
> 
> Do I think I'm on the right track here, since I removed the following
> from /etc/dovecot/conf.d/auth-sql.conf.ext
> 
> #userdb {
> #  driver = static
> #  args = uid=mail gid=mail home=/var/mail/%d/%n
> #}
> 
> So now my error is as follows:
> 
> # doveadm user -u '*'
> Error: auth-master: userdb list: User listing returned failure
> Fatal: user listing failed
> 
> Because now when I restart dovecot, I see the following in the log:
> 
> Dec 01 16:55:14 master: Info: Dovecot v2.3.21 (47349e2482) starting up
>   for imap, lmtp, sieve (core dumps disabled)
> Dec 01 16:55:14 auth: Warning: sql: Ignoring changed iterate_query in
>   /etc/dovecot/dovecot-sql.conf.ext, because userdb sql not used. (If
>   this is intentional, set userdb_warning_disable=yes)
> Dec 01 16:55:14 auth: Error: auth-master client: Trying to iterate
>   users, but userdbs don't support it (created 0 msecs ago, handshake 0
>   msecs ago)
> 
> So I commented out my 'iterate_query = ...' (see below) from
> /etc/postfix/dovecot-sql.conf.ext and now I get the error on startup
> which says:
> 
>Dec 01 16:57:42 master: Info: Dovecot v2.3.21 (47349e2482) starting up
>  for imap, lmtp, sieve (core dumps disabled)
>Dec 01 16:57:42 auth: Error: auth-master client: Trying to iterate
>  users, but userdbs don't support it (created 0 msecs ago, handshake 0
>  msecs ago)
>Dec 01 16:57:42 replicator: Error: auth-master: userdb list: User
>  listing returned failure
>Dec 01 16:57:42 replicator: Error: listing users failed, can't
>  replicate existing data
> 
> Which tells me I need the iteracte_users setting, but I've got a bogus
> query in there.  So I think I should be using something like this:
> 
>   iterate_query = SELECT email AS user from virtual_users;
> 
> where 'virtual_users' is the one and only table in my sqlite db file.
> And I'm just returning the 'email' column as 'user', since that's what
> it seems to expect.  
> 
> Hmmm...
> 
> 
> > I've been pounding my head against the sand for a while here trying to
> > figure out why I can't get:
> 
> >doveadm user '*' 
> 
> > working properly.  I've got a Debian 11 VPS runnig dovecot version
> > 2.3.21-1+debian10 and it works great.  But not I'm trying to add in
> > simple replication to a home dovecot instance over a wireguard tunnel
> > so I can do backups and have a little better resiliency.  Maybe.
> 
> > In any case, my sqlite schema looks like this:
> 
> sqlite> .schema virtual_users
> > CREATE TABLE `virtual_users` (
> >   `id` integer NOT NULL PRIMARY KEY AUTOINCREMENT
> > ,  `domain_id` integer NOT NULL
> > ,  `password` varchar(106) NOT NULL
> > ,  `email` varchar(100) NOT NULL
> > ,  UNIQUE (`email`)
> > ,  CONSTRAINT `virtual_users_ibfk_1` FOREIGN KEY (`domain_id`) 
> > REFERENCES `virtual_domains` (`id`) E
> > );
> > CREATE INDEX "idx_virtual_users_domain_id" ON "virtual_users" 
> > (`domain_id`);
> 
> 
> > and I don't have any other tables.  The 'domain_id' was/is a leftover
> > from my thinking I needed it for extra testing of other domains and
> > such.  
> 
> > I can do 'doveadm user j...@stoffel.org' and it works just fine.  When
> > I do "doveadm user '*'" it fails and I get:
> 
> > doveadm user '*'
> > Error: auth-master: userdb list: User listing returned failure
> > Fatal: user listing failed
> 
> 
> > So my config looks like this:
> 
> >root@mail:/etc/dovecot/conf.d# cat auth-sql.conf.ext
> ># Authentication for SQL users. Included from 10-auth.conf.
> >#
> ># 
> 
> >passdb {
> >  driver = sql
> 
> >  # Path for SQL configuration file, see
> >example-config/dovecot-sql.conf.ext
> >  args = /etc/dovecot/dovecot-sql.conf.ext
> >}
> 
> >userdb {
> >  driver = static
> >  args = uid=mail gid=mail home=/var/mail/%d/%n
> >}
> 
> > My /etc/dovecot/dovecot-sql.conf.ext has the following:
> 
> >driver = sqlite
> >connect = /etc/dovecot/private/virtual_users.sqlite3
> 
> >default_pass_scheme = SHA512-CRYPT
> 
> >password_query = SELECT '/var/mail/%d/%u' AS userdb_home, 'mail' AS 
> > userdb_uid, 'mail' AS userdb_gid, email as user, password FROM 
> > virtual_users WHERE email='%u';
> 
> >iterate_query = SELECT email AS user from virtual_users;
> 
> > And my general doveadm config output is this, slightly edited down to
> > remove stuff I don't think I need to show is at the end.  Any hints on
> > what I've done wrong here?  Do I need a more complete sqlite3 schema?
> > I wish I could get more debugging info on what query it's trying to
> > run and the error(s) it's getting.  
> 
> > Thanks,
> > John
> 
> 
> 
> > # 2.3.21 (47349e2482): /etc/dovecot/dovecot.conf

Re: doveadm backup has problems with some accounts

2023-12-01 Thread Aki Tuomi via dovecot

> On 01/12/2023 11:34 EET roger.meier--- via dovecot  
> wrote:
> 
>  
> I try to setup for our mailserver (in a dc) a job backup to a secondary 
> server (in our office) with "doveadm backup" via the -R option. (rsync , 
> rsnapshot and so on tooks too long at the moment)
> 
> For the most user accounts all work as expected, but for three users it 
> always fails 
> 
> First run:
> /usr/bin/doveadm -Dv backup -Ru user1 tcp:mua01.domain.intra:12345
> 
> > Dec 01 08:54:21 doveadm(user1)<70126>: Debug: 
> > Mailbox INBOX: Mailbox opened because: copy caching decisions
> > Dec 01 08:54:22 doveadm(user1)<70126>: Warning: 
> > Deleting mailbox 'Archiv.Allgemein unsortiert': UID=1 
> > GUID=1350559209.P2052Q54.lin-mail1.intra is missing locally
> > Dec 01 08:54:22 doveadm(user1)<70126>: Debug: brain 
> > M: Import Archiv.Allgemein unsortiert: Import change type=save 
> > GUID=1350559209.P2052Q54.mail1.intra UID=1 > hdr_hash= result=Reverting 
> > local change by deleting mailbox - No more local mails found
> > Dec 01 08:54:22 doveadm(70126): Debug: brain M: Import Archiv.Allgemein 
> > unsortiert: Saved UIDs:
> > Dec 01 08:54:22 doveadm(70126): Debug: auth-master: conn 
> > unix:/run/dovecot/auth-userdb (pid=661,uid=0): Disconnected: Connection 
> > closed (fd=9)
> 
> So it aborts on the lines above and a incomplete maildir is on the local 
> server. so the next doveadm try say's that he can't delete INBOX , etc. 
> 
> > Dec 01 09:03:33 doveadm(user1)<70169>: Error: 
> > Mailbox INBOX sync: mailbox_delete failed: INBOX can't be deleted.
> 
> This a very old account on our server which was migrated over different 
> iterations of our dovecot mailserver. The user behind the account uses 
> outlook over years. 
> Is the space here a problem? 
> 
> Another user with a similiar issue has the following error message at the end:
> 
> > Dec 01 09:22:14 doveadm(user2)<70354>: Debug: 
> > Mailbox INBOX: Mailbox opened because: copy caching decisions
> > Dec 01 09:22:56 doveadm(user2)<70354>: Error: 
> > read(mua01.domain.intra) failed: EOF (last sent=mailbox, last recv=mailbox)
> > Dec 01 09:22:56 doveadm(70354): Debug: auth-master: conn 
> > unix:/run/dovecot/auth-userdb (pid=661,uid=0): Disconnected: Connection 
> > closed (fd=9)
> 
> I see that the user has a very big inbox? when i check in the source server 
> in the "cur" folder of the INBOX it count's around 269372 mails.  Is this 
> perhaps the issue for this message?
> 
> And on the last user it looks like:
> 
> Dec 01 09:25:19 doveadm(user3)<70376>: Warning: 
> Deleting mailbox 'Entwürfe': UID=1265 
> GUID=1521832311.M6830P7652.mail-mx1.intra,S=1764,W=1809 is missing locally
> Dec 01 09:25:19 doveadm(user3)<70376>: Debug: brain 
> M: Import Entwürfe: Import change type=save 
> GUID=1521832311.M6830P7652.mail-mx1.intra,S=1764,W=1809 UID=1265 hdr_hash= 
> result=Reverting local change by deleting mailbox - No more local mails found
> Dec 01 09:25:19 doveadm(70376): Debug: brain M: Import Entwürfe: Saved UIDs:
> Dec 01 09:25:19 doveadm(70376): Debug: auth-master: conn 
> unix:/run/dovecot/auth-userdb (pid=661,uid=0): Disconnected: Connection 
> closed (fd=9)
> 
> The "Entwürfe" folder directly cannot be the issue? On the filesystem the 
> folder has the name ".Entw" and also other users has similar folders 
> in their mailboxes.
> 
> The source server has dovecot version 2.2.36 (centos 7.9.2009) and the 
> current destination server dovecot version 2.3.16 (ubuntu 22.04 lts)

Try deleting the target mailbox completely. This usually sorts these kind of 
things out. Also please see 
https://doc.dovecot.org/admin_manual/migrating_mailboxes/

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Couldn't get vsize Issue

2023-11-26 Thread Aki Tuomi via dovecot

> On 26/11/2023 11:34 EET duluxoz  wrote:
> 
>  
> On 26/11/2023 20:32, Aki Tuomi wrote:
> >> On 25/11/2023 09:14 EET duluxoz  wrote:
> >>
> >>   
> >> Hi All,
> >>
> >> Looking for a little help, please.
> >>
> >> We're getting the following showing up in our dovecot logs: `Debug:
> >> Mailbox Junk: Couldn't get vsize from mailbox list index: Record for
> >> vsize`. This is happening for all(?) the different mailboxes
> >>
> >> We're not sure what we're looking at or looking for to even begin the
> >> t/shoot. I dropped the above into google but couldn't *seem* to find
> >> anything relevant.
> >>
> >> Would someone(s) be able to point me in the right direction as to what
> >> the actual issue is (ie some more in-depth detail than just the log
> >> message - yes, it may be obvious to some but not to me) and, more
> >> importantly, what to look at to get it resolved, please.  :-)
> >>
> >> Thanks in advance
> >>
> >> Dulux-Oz
> >>
> > It's a debug message, not an error or warning. It's just saying that the 
> > vsize information wasn't in mailbox list index.
> >
> > Aki
> 
> Thanks Aki,
> 
> OK, cool, so how does the vsize info get there - ie how to get I get rid 
> of the warning messages (as opposed to simply ignoring them)  :-)
> 
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org

Set mail_debug=no.

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


  1   2   3   4   5   6   7   8   >