Re: Failing to archive many messages

2024-05-18 Thread Francis Augusto Medeiros-Logeay via dovecot

Thanks a lot Marc.

I actually found something that works for me:

I replaced `sa-learn -u xx --ham`
with
`spamc -u xx -L ham`

Archiving wasn't as fast as simply moving messages, but was considerably 
faster - fast enough that no errors on Roundcube are reported.


Best,
Francis

---
Francis Augusto Medeiros-Logeay
Oslo, Norway

On 2024-05-18 12:06, Marc wrote:
Today I realized that it was indeed the sa-learn that is slowing down 
my

Archiving.

I added an «&» on the end of the line that calls the sa-learn (called 
by

the report-ham.sieve script):

exec /usr/bin/sa-learn -u ${1} --ham  &

Does anyone thing this is a bad idea? I noticed that archiving got way
faster this way…


You fork/spawn a new process. So depending on how many messages are 
moved, that many processes are created. I am not using sa-learn, but I 
think this could be a memory consuming task. So manybe check for OOM 
crashes or your swap space slowing everything down.

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


Re: Failing to archive many messages

2024-05-18 Thread Francis Augusto Medeiros-Logeay via dovecot
Today I realized that it was indeed the sa-learn that is slowing down my 
Archiving.

I added an «&» on the end of the line that calls the sa-learn (called by the 
report-ham.sieve script):

exec /usr/bin/sa-learn -u ${1} --ham  &

Does anyone thing this is a bad idea? I noticed that archiving got way faster 
this way…

Best,

Francis


> On 9 May 2024, at 23:09, dovecot-requ...@dovecot.org wrote:
> 
>> On 9 May 2024, at 19:45, dovecot-requ...@dovecot.org 
>> <mailto:dovecot-requ...@dovecot.org> wrote:
>> 
>> Francis Augusto Medeiros-Logeay via dovecot skrev den 2024-05-09 12:29:
>> 
>>>> If you want to analyze emails, why not do it with scheduled crons 
>>>> after they are archived?
>> 
>> maybe ask for skip older then one day in here 
>> https://github.com/isbg/isbg/tree/master
>> 
>> while roundcube just set the needed flag for retest ?
>> 
>>> wouldn't it reanalyze all archived messages anyway?
>> 
>> sometimes email is ham at recpt stage, while its spam later on test, 
>> this is why isbg is made imho :)
> 
> 
> I see.
> 
> But I wonder if there is something wrong with what I already have. It worked 
> fine for years, and it works fine for most of my users. I tested with a few 
> accounts, and Archving (with its sa-learn script) works blazingly fast. But 
> with one user - happens to be mine - it is super slow when archiving, most 
> likely due the sa-learn.
> 
> Best,
> 
> Francis

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


Re: Failing to archive many messages

2024-05-09 Thread Francis Augusto Medeiros-Logeay via dovecot



> On 9 May 2024, at 19:45, dovecot-requ...@dovecot.org wrote:
> 
> Francis Augusto Medeiros-Logeay via dovecot skrev den 2024-05-09 12:29:
> 
>>> If you want to analyze emails, why not do it with scheduled crons 
>>> after they are archived?
> 
> maybe ask for skip older then one day in here 
> https://github.com/isbg/isbg/tree/master
> 
> while roundcube just set the needed flag for retest ?
> 
>> wouldn't it reanalyze all archived messages anyway?
> 
> sometimes email is ham at recpt stage, while its spam later on test, 
> this is why isbg is made imho :)


I see.

But I wonder if there is something wrong with what I already have. It worked 
fine for years, and it works fine for most of my users. I tested with a few 
accounts, and Archving (with its sa-learn script) works blazingly fast. But 
with one user - happens to be mine - it is super slow when archiving, most 
likely due the sa-learn.

Best,

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


Re: Authentication questions

2024-05-09 Thread Francis Augusto Medeiros-Logeay via dovecot


> On 9 May 2024, at 19:45, Aki Tuomi  wrote:
> 
>  
>> On 09/05/2024 20:15 EEST Francis Augusto Medeiros-Logeay via dovecot 
>> mailto:dovecot@dovecot.org>> wrote:
>>  
>>  
>> Hi,
>>  
>> I was wondering:
>>  
>> 1 - Is it possible to configure authentication methods per user? For 
>> example, oauth2 for most users, but plain for others?
>> 2 - I had a feeling that when oauth2 authentication fails, dovecot tries to 
>> authenticate via plain with the received token. Doesn’t seem logical, but I 
>> get my user blocked on my directory server (freeipa) after a few failed oath 
>> authentications. If so, can this be prevented?
>>  
>> Best,
>>  
>> Francis
>> ___
>> dovecot mailing list -- dovecot@dovecot.org <mailto:dovecot@dovecot.org>
>> To unsubscribe send an email to dovecot-le...@dovecot.org 
>> <mailto:dovecot-le...@dovecot.org> 
> Yep. See 
> https://doc.dovecot.org/configuration_manual/authentication/password_databases_passdb/#passdb-setting
>  
> you can filter by mechanism.
>  
> Aki

The weird thing is that I get this still: 

May 09 21:45:47 auth: Error: oauth2(myu...@mydomain.com,48.237.124.127): oauth2 
failed: Introspection failed: No username returned
May 09 21:45:47 auth: Error: ldap(myu...@mydomain.com,48.237.124.127): 
ldap_bind() failed: Constraint violation

Even when I have my configuration like this:

auth_mechanisms = $auth_mechanisms xoauth2 oauthbearer


passdb {
  driver = oauth2
  mechanisms = xoauth2 oauthbearer
  args = /etc/dovecot/dovecot-oauth2.conf.ext
  result_failure=return-fail
}

What could be the cause? 

Best,
Francis 


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


Re: Authentication questions

2024-05-09 Thread Francis Augusto Medeiros-Logeay via dovecot


> On 9 May 2024, at 19:45, Aki Tuomi  wrote:
> 
>  
>> On 09/05/2024 20:15 EEST Francis Augusto Medeiros-Logeay via dovecot 
>> mailto:dovecot@dovecot.org>> wrote:
>>  
>>  
>> Hi,
>>  
>> I was wondering:
>>  
>> 1 - Is it possible to configure authentication methods per user? For 
>> example, oauth2 for most users, but plain for others?
>> 2 - I had a feeling that when oauth2 authentication fails, dovecot tries to 
>> authenticate via plain with the received token. Doesn’t seem logical, but I 
>> get my user blocked on my directory server (freeipa) after a few failed oath 
>> authentications. If so, can this be prevented?
>>  
>> Best,
>>  
>> Francis
>> ___
>> dovecot mailing list -- dovecot@dovecot.org <mailto:dovecot@dovecot.org>
>> To unsubscribe send an email to dovecot-le...@dovecot.org 
>> <mailto:dovecot-le...@dovecot.org> 
> Yep. See 
> https://doc.dovecot.org/configuration_manual/authentication/password_databases_passdb/#passdb-setting
>  
> you can filter by mechanism.
>  
> Aki

Thanks, this is great!

Best,
Francis

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


Re: Failing to archive many messages

2024-05-09 Thread Francis Augusto Medeiros-Logeay via dovecot


> On 9 May 2024, at 12:55, dovecot-requ...@dovecot.org wrote:
> 
> Francis Augusto Medeiros-Logeay via dovecot skrev den 2024-05-09 11:28:
> 
>> Actually, I don’t know here if that’s the sieve that’s slowing down the 
>> process, or if it is something else.
>> I see that yeah, sa-learn takes a little while to execute. But maybe 
>> the issue is that Dovecot doesn’t seem to
>> release the IMAP connection until each message went through sieve. This 
>> gives me some timeout on
>> Roundcube (it says just «server error»). All the messages are indeed 
>> archived.
>> 
>> Is that something here I could do better?
> 
> use tmpfs to store tmp content, or try solve it without pipe with imho 
> creates tmp files
> 
> https://doc.dovecot.org/configuration_manual/howto/antispam_with_sieve/
> 
> try spamc

Thanks Benny. Using spamc and sa-learn isn’t a bit the same? But I’ll check the 
docs.

Bestm

Francis 

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


Authentication questions

2024-05-09 Thread Francis Augusto Medeiros-Logeay via dovecot
Hi,

I was wondering:

1 - Is it possible to configure authentication methods per user? For example, 
oauth2 for most users, but plain for others?
2 - I had a feeling that when oauth2 authentication fails, dovecot tries to 
authenticate via plain with the received token. Doesn’t seem logical, but I get 
my user blocked on my directory server (freeipa) after a few failed oath 
authentications. If so, can this be prevented?

Best,

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


Re: Failing to archive many messages

2024-05-09 Thread Francis Augusto Medeiros-Logeay via dovecot




=

On 2024-05-09 12:03, Marc wrote:
I see report-ham, instead of archiving? I am not entirely sure if this 
is an efficient approach to archiving. My users can only set a flag for 
'auto archiving' via sieve and then 3 months after every year messages 
are being moved by cron jobs, and modification logs are put into their 
accounts. This all is only happening in 'dead hours'.


If you want to analyze emails, why not do it with scheduled crons after 
they are archived?




wouldn't it reanalyze all archived messages anyway?
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Failing to archive many messages

2024-05-09 Thread Francis Augusto Medeiros-Logeay via dovecot
> I noticed that my sieve rules are taking a very long time when archiving 
> messages. I can see on my logs that every message takes about two-three 
> seconds to be evaluated.
> 
> I also noticed this happens for a few accounts. Do you know what could be 
> causing this?
> 
> Best,
> Francis
> 

Actually, I don’t know here if that’s the sieve that’s slowing down the 
process, or if it is something else.
I see that yeah, sa-learn takes a little while to execute. But maybe the issue 
is that Dovecot doesn’t seem to release the IMAP connection until each message 
went through sieve. This gives me some timeout on Roundcube (it says just 
«server error»). All the messages are indeed archived.

Is that something here I could do better?

Best,
Francis 
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: OAUTH2 problem when migrating to Ubuntu 24.04

2024-05-09 Thread Francis Augusto Medeiros-Logeay via dovecot




---
Francis Augusto Medeiros-Logeay
Oslo, Norway

On 2024-05-09 10:11, Aki Tuomi wrote:
On 09/05/2024 10:46 EEST Francis Augusto Medeiros-Logeay via dovecot 
 wrote:



Hi,

I have a Dovecot server on Ubuntu 22.04, which works fine with Oauth2. 
I am building a new container based on Ubuntu 24.04. IMAP seems to 
work fine with plain authentication, but oauth2 fails (Dovecot 
v2.3.21). Same configuration as before.


However, I got this message:

May 09 09:41:57 auth: Error: 
oauth2(f...@mydomain.eu,10.110.41.32,): oauth2 
failed: Introspection failed: No username returned


Weird, as it does indeed seems to get the username (as seen on the 
log).


Any clue on why this fails?

Best,

Francis


It means that introspection did not return username for the token. This 
is important, because if the token is not validated to belong to the 
user attempting to log in, anyone could login as anyone with any token.


Aki


Actually, the problem was not that. It was some change on Dovecot where 
suddenly I need to add "clientid:client_secret@" on the url (googled it, 
and saw that you advised that before). Now it works.




Best,
Francis
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


OAUTH2 problem when migrating to Ubuntu 24.04

2024-05-09 Thread Francis Augusto Medeiros-Logeay via dovecot
Hi,

I have a Dovecot server on Ubuntu 22.04, which works fine with Oauth2. I am 
building a new container based on Ubuntu 24.04. IMAP seems to work fine with 
plain authentication, but oauth2 fails (Dovecot v2.3.21). Same configuration as 
before.

However, I got this message:

May 09 09:41:57 auth: Error: 
oauth2(f...@mydomain.eu,10.110.41.32,): oauth2 failed: 
Introspection failed: No username returned

Weird, as it does indeed seems to get the username (as seen on the log). 

Any clue on why this fails? 

Best,

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


Re: Failing to archive many messages

2024-05-09 Thread Francis Augusto Medeiros-Logeay via dovecot
I noticed that my sieve rules are taking a very long time when archiving 
messages. I can see on my logs that every message takes about two-three seconds 
to be evaluated. 

My sieve for the Archive is this:

cat /var/mail/vmail/mail/sieve/global/report-ham.sieve
require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"];

if environment :matches "imap.mailbox" "*" {
  set "mailbox" "${1}";
}

if string "${mailbox}" "Trash" {
  stop;
}

if environment :matches "imap.user" "*" {
  set "username" "${1}";
}

pipe :copy "sa-learn-ham.sh" [ "${username}" ];

And my sa-learn-ham.sh is this:

#!/bin/sh
export PATH="/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin:$PATH"
exec /usr/bin/sa-learn -u ${1} —ham




May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
multi-script: Start execute sequence
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
Executing script from `/var/mail/vmail/mail/sieve/global/report-ham.svbin'
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
multi-script: Run script `/var/mail/vmail/mail/sieve/global/report-ham.svbin'
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
Started running script `/var/mail/vmail/mail/sieve/global/report-ham.svbin'
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
Finished running script `ok' 
(status=/var/mail/vmail/mail/sieve/global/report-ham.svbin, resource usage: no 
usage recorded)
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
multi-script: Execute result
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Executing result (status=ok, commit=no)
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Starting execution of actions
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Executing actions
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Executing pipe action
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
action pipe: running program: sa-learn-ham.sh
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: program 
exec:/var/mail/vmail/mail/sieve/global/scripts/sa-learn-ham.sh: Created
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: program 
exec:/var/mail/vmail/mail/sieve/global/scripts/sa-learn-ham.sh: Pass 
environment: USER=fran...@med-lo.eu
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: program 
exec:/var/mail/vmail/mail/sieve/global/scripts/sa-learn-ham.sh: Pass 
environment: HOME=/var/mail/vmail/med-lo.eu/francis
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: program 
exec:/var/mail/vmail/mail/sieve/global/scripts/sa-learn-ham.sh: Pass 
environment: HOST=fb58607074fd
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: Mailbox 
Archive: UID 191458: Opened mail because: mail stream
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Finished executing pipe action (status=ok, keep=implicit)
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Finished executing actions (status=ok, keep=implicit)
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Finished executing result (no commit, status=ok, keep=yes)
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
multi-script: Sequence active
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
multi-script: Finishing sequence (status=ok)
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Executing result (status=ok, commit=yes)
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Starting execution of actions
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Executing actions
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Finished executing actions (status=ok, keep=implicit)
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Execute implicit keep (failure=no)
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Start storing into mailbox Archive
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Executing implicit keep action
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Execute storing into mailbox 'Archive'
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: Debug: sieve: 
uid=191458: Updated existing mail in mailbox 'Archive'
May 09 09:17:10 imap(fran...@med-lo.eu)<9349><4gm6NAAYsagKCige>: 

Re: Failing to archive many messages

2024-05-01 Thread Francis Augusto Medeiros-Logeay via dovecot


It is weird. At first, it seems that the logs are going fine. It goes 
like this for many minutes:


May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: Mailbox Archive: UID 25719: Looked up field hdr.IN-REPLY-TO from 
mail cache
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: Mailbox Archive: UID 25719: Looked up field hdr.MESSAGE-ID from 
mail cache
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: Mailbox Archive: UID 25719: Looked up field hdr.SUBJECT from mail 
cache
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: Mailbox Archive: UID 25719: Looked up field hdr.TO from mail 
cache
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: Mailbox Archive: UID 25719: Looked up field hdr.X-PRIORITY from 
mail cache
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: Mailbox Archive: UID 25719: Looked up field hdr.BCC from mail 
cache
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: Mailbox Archive: UID 25719: Looked up field hdr.REPLY-TO from 
mail cache
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: Mailbox Archive: UID 25719: Looked up field 
hdr.DISPOSITION-NOTIFICATION-TO from mail cache
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: Mailbox Archive: UID 25719: Looked up field hdr.LIST-POST from 
mail cache
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: multi-script: Start execute sequence
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: Executing script from 
`/var/mail/vmail/mail/sieve/global/report-ham.svbin'
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: multi-script: Run script 
`/var/mail/vmail/mail/sieve/global/report-ham.svbin'
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: Started running script 
`/var/mail/vmail/mail/sieve/global/report-ham.svbin'
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: Finished running script `ok' 
(status=/var/mail/vmail/mail/sieve/global/report-ham.svbin, resource 
usage: no usage recorded)
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: multi-script: Execute result
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Executing result (status=ok, commit=no)
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Starting execution of actions
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Executing actions
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Executing pipe action
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: action pipe: running program: sa-learn-ham.sh
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: program 
exec:/var/mail/vmail/mail/sieve/global/scripts/sa-learn-ham.sh: Created
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: program 
exec:/var/mail/vmail/mail/sieve/global/scripts/sa-learn-ham.sh: Pass 
environment: USER=fran...@mydomain.com
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: program 
exec:/var/mail/vmail/mail/sieve/global/scripts/sa-learn-ham.sh: Pass 
environment: HOME=/var/mail/vmail/med-lo.eu/francis
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: program 
exec:/var/mail/vmail/mail/sieve/global/scripts/sa-learn-ham.sh: Pass 
environment: HOST=fb58607074fd
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: Mailbox Archive: UID 25719: Opened mail because: mail stream
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Finished executing pipe action (status=ok, 
keep=implicit)
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Finished executing actions (status=ok, 
keep=implicit)
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Finished executing result (no commit, 
status=ok, keep=yes)
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: multi-script: Sequence active
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: multi-script: Finishing sequence (status=ok)
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Executing result (status=ok, commit=yes)
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Starting execution of actions
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Executing actions
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Finished executing actions (status=ok, 
keep=implicit)
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Execute implicit keep (failure=no)
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Start storing into mailbox Archive
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Executing implicit keep action
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Execute storing into mailbox 'Archive'
May 01 14:20:04 imap(fran...@mydomain.com)<226>: 
Debug: sieve: uid=25719: Updated existing mail in 

Re: ENV{"PATH"}. errors on my log

2024-05-01 Thread Francis Augusto Medeiros-Logeay via dovecot

Thanks!

I actually had a bash script that calls sa-learn, so I added `export 
PATH ...` there, and it worked.


Best,

Francis

---
Francis Augusto Medeiros-Logeay
Oslo, Norway

On 2024-05-01 13:23, Aki Tuomi wrote:

On 01/05/2024 13:59 EEST Francis Augusto Medeiros-Logeay via dovecot 
 wrote:


Hi,

I'm getting this error a lot on my logs:

May 01 12:57:03 imap: Error: Use of uninitialized value $ENV{"PATH"} 
in
split at /usr/lib/x86_64-linux-gnu/perl-base/File/Spec/Unix.pm line 
136.


I googled a bit and the only reference I found was related to the
possibility of imapsieve scripts that could be generating this. I
haven't found any perl script on my install, but I momentarily turned
off spamassassin, but the logs continued.

Any hint on how I can debug this? Turning the debug logs on dovecot
didn't bring me any extra information of what the source of this could
be.

Best,
Francis

--
Francis Augusto Medeiros-Logeay
Oslo, Norway
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Try adding `import_environment = $import_environment PATH` to your 
config.


Aki

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


Failing to archive many messages

2024-05-01 Thread Francis Augusto Medeiros-Logeay via dovecot
Hi,

When I archive one or two messages, the messages are correctly moved to the 
Archive.

However, when I archive more messages - like 50 or more, dovecot seems to fail. 
The error I get is this one:

 Warning: Failed to do incremental sync for mailbox Archive, retry with a full 
sync (Modseq 17277 no longer in transaction log (highest=17323, 
last_common_uid=12216, nextuid=15767))

No messages end up being moved to the Archive folder. I tried to do this both 
from a mail client and from roundcube.

What could be the problem here? 
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


ENV{"PATH"}. errors on my log

2024-05-01 Thread Francis Augusto Medeiros-Logeay via dovecot

Hi,

I'm getting this error a lot on my logs:

May 01 12:57:03 imap: Error: Use of uninitialized value $ENV{"PATH"} in 
split at /usr/lib/x86_64-linux-gnu/perl-base/File/Spec/Unix.pm line 136.


I googled a bit and the only reference I found was related to the 
possibility of imapsieve scripts that could be generating this. I 
haven't found any perl script on my install, but I momentarily turned 
off spamassassin, but the logs continued.


Any hint on how I can debug this? Turning the debug logs on dovecot 
didn't bring me any extra information of what the source of this could 
be.


Best,
Francis

--
Francis Augusto Medeiros-Logeay
Oslo, Norway
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Ouath2 compatible mail clients

2023-11-23 Thread Francis Augusto Medeiros-Logeay via dovecot
Hi,

Are there any oauth2 compatible mail clients out there? For Mac/iOS?

I see that Mail for Mac supports it, but just for Exchange. 
__
Francis Augusto Medeiros-Logeay
Oslo, Norway
Sent from a mobile device / Enviado a partir de dispositivo móvel
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: [EXT] Re: dovecot and oauth2 (with keycloak) not working

2023-11-20 Thread Francis Augusto Medeiros-Logeay via dovecot



It seems that it works on the dovecot side. When Roundcube sends the 
token, I get the user authenticated via IMAP/oauth2 in dovecot.


What worked for me was:

- adding client_id and client_secret
- removing the tokeninfo_url, using just the introspect_url and 
introspect_mode=token.


Now gotta fix Roundcube...

Best,
Francis

On 2023-11-20 13:48, Francis Augusto Medeiros-Logeay wrote:

---
Francis Augusto Medeiros-Logeay
Oslo, Norway

On 2023-11-20 09:04, Aki Tuomi wrote:
On 20/11/2023 10:03 EET Francis Augusto Medeiros-Logeay 
 wrote:



> Try adding /?token= to tokeninfo_url. Dovecot 2.3.7.2 will simply
> concatenate tokeninfo_url and token, so you need to provide the URL in
> that fashion.
>
> Aki

Thanks Aki.

Still no go:


Nov 20 08:59:19 auth: Debug: http-client: host auth.mydomain.com: 
Host

created




oauth2(fran...@mydomain.com,10.10.40.30,<4Gv83JAKyOcKCige>): oauth2
failed: Token validation failed: connect(10.10.200.10:443) failed:
Connection refused




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


Re: [EXT] Re: dovecot and oauth2 (with keycloak) not working

2023-11-20 Thread Francis Augusto Medeiros-Logeay via dovecot




---
Francis Augusto Medeiros-Logeay
Oslo, Norway

On 2023-11-20 09:04, Aki Tuomi wrote:
On 20/11/2023 10:03 EET Francis Augusto Medeiros-Logeay 
 wrote:



> Try adding /?token= to tokeninfo_url. Dovecot 2.3.7.2 will simply
> concatenate tokeninfo_url and token, so you need to provide the URL in
> that fashion.
>
> Aki

Thanks Aki.

Still no go:


Nov 20 08:59:19 auth: Debug: http-client: host auth.mydomain.com: Host
created




oauth2(fran...@mydomain.com,10.10.40.30,<4Gv83JAKyOcKCige>): oauth2
failed: Token validation failed: connect(10.10.200.10:443) failed:
Connection refused


It still doesn't work after I fixed that "connection refused" problem. I 
had a NAT reflector problem. But with that out of the way, I still don't 
get it to work:


Nov 20 13:43:03 auth: Error: 
ldap(fran...@mydomain.com,10.10.40.30,): ldap_bind() 
failed: Constraint violation
Nov 20 13:43:03 auth: Debug: http-client: host auth.mydomain.com: Host 
created
Nov 20 13:43:03 auth: Debug: http-client: host auth.mydomain.com: Host 
session created
Nov 20 13:43:03 auth: Debug: http-client: host auth.mydomain.com: Need 
to perform DNS lookup
Nov 20 13:43:03 auth: Debug: http-client: host auth.mydomain.com: 
Performing asynchronous DNS lookup
Nov 20 13:43:03 auth: Debug: http-client: host auth.mydomain.com: conn 
unix:dns-client: dns(auth.mydomain.com): Lookup started
Nov 20 13:43:03 auth: Debug: http-client: host auth.mydomain.com: conn 
unix:dns-client: Connecting
Nov 20 13:43:03 auth: Debug: http-client: host auth.mydomain.com: conn 
unix:dns-client (pid=2800,uid=0): Client connected (fd=23)
Nov 20 13:43:03 auth: Debug: http-client: host auth.mydomain.com: conn 
unix:dns-client (pid=2800,uid=0): Sending version handshake
Nov 20 13:43:03 auth: Debug: http-client[1]: request [Req1: GET 
https://auth.mydomain.com/realms/myrealm/protocol/openid-connect/userinfo?token=eyJhbGciOi..redacted...3MDA0ODQ0ODMsImlhdCI6MTcwMDQ4NDE4MywiYXV0aF...: 
Submitted (requests left=1)
Nov 20 13:43:03 auth: Debug: http-client: host auth.mydomain.com: conn 
unix:dns-client (pid=2800,uid=0): dns(auth.mydomain.com): Lookup 
successful after 5 msecs
Nov 20 13:43:03 auth: Debug: http-client: host auth.mydomain.com: DNS 
lookup successful; got 1 IPs
Nov 20 13:43:03 auth: Debug: http-client: peer 10.10.20.100:443 
(shared): Peer created
Nov 20 13:43:03 auth: Debug: http-client: peer 10.10.20.100:443: Peer 
pool created
Nov 20 13:43:03 auth: Debug: http-client[1]: peer 10.10.20.100:443: Peer 
created
Nov 20 13:43:03 auth: Debug: http-client[1]: queue 
https://auth.mydomain.com:443: Setting up connection to 10.10.20.100:443 
(SSL=auth.mydomain.com) (1 requests pending)
Nov 20 13:43:03 auth: Debug: http-client[1]: peer 10.10.20.100:443: 
Linked queue https://auth.mydomain.com:443 (1 queues linked)
Nov 20 13:43:03 auth: Debug: http-client[1]: queue 
https://auth.mydomain.com:443: Started new connection to 
10.10.20.100:443 (SSL=auth.mydomain.com)
Nov 20 13:43:03 auth: Debug: http-client: host auth.mydomain.com: conn 
unix:dns-client (pid=2800,uid=0): Disconnected: Connection closed 
(fd=23)
Nov 20 13:43:03 auth: Debug: http-client: host auth.mydomain.com: conn 
unix:dns-client (pid=2800,uid=0): Disconnect: deinit
Nov 20 13:43:03 auth: Debug: http-client[1]: peer 10.10.20.100:443: 
Creating 1 new connections to handle requests (already 0 usable, 
connecting to 0, closing 0)
Nov 20 13:43:03 auth: Debug: http-client[1]: peer 10.10.20.100:443: 
Making new connection 1 of 1 (0 connections exist, 0 pending)
Nov 20 13:43:03 auth: Debug: http-client: conn 10.10.20.100:443 [1]: 
Connecting
Nov 20 13:43:03 auth: Debug: http-client: conn 10.10.20.100:443 [1]: 
Waiting for connect (fd=23) to finish for max 0 msecs
Nov 20 13:43:03 auth: Debug: http-client: conn 10.10.20.100:443 [1]: 
HTTPS connection created (1 parallel connections exist)
Nov 20 13:43:03 auth: Debug: http-client: conn 10.10.20.100:443 [1]: 
Client connected (fd=23)
Nov 20 13:43:03 auth: Debug: http-client: conn 10.10.20.100:443 [1]: 
Connected
Nov 20 13:43:03 auth: Debug: http-client: conn 10.10.20.100:443 [1]: 
Starting SSL handshake
Nov 20 13:43:03 auth: Debug: auth.mydomain.com: SSL: where=0x10, ret=1: 
before SSL initialization
Nov 20 13:43:03 auth: Debug: auth.mydomain.com: SSL: where=0x1001, 
ret=1: before SSL initialization
Nov 20 13:43:03 auth: Debug: auth.mydomain.com: SSL: where=0x1001, 
ret=1: SSLv3/TLS write client hello
Nov 20 13:43:03 auth: Debug: auth.mydomain.com: SSL: where=0x1002, 
ret=-1: SSLv3/TLS write client hello
Nov 20 13:43:03 auth: Debug: auth.mydomain.com: SSL: where=0x1002, 
ret=-1: SSLv3/TLS write client hello
Nov 20 13:43:03 auth: Debug: auth.mydomain.com: SSL: where=0x1002, 
ret=-1: SSLv3/TLS write client hello
Nov 20 13:43:03 auth: Debug: auth.mydomain.com: SSL: where=0x1001, 
ret=1: SSLv3/TLS write client hello
Nov 20 13:43:03 auth: Debug: auth.mydomain.com: SSL: where=0x1001, 
ret=1: SSLv3/TLS read server hello
Nov 20 13:43:03 auth: Debug: auth.mydomain.com: SSL: where=0x1002, 

Re: dovecot and oauth2 (with keycloak) not working

2023-11-20 Thread Francis Augusto Medeiros-Logeay via dovecot



Try adding /?token= to tokeninfo_url. Dovecot 2.3.7.2 will simply 
concatenate tokeninfo_url and token, so you need to provide the URL in 
that fashion.


Aki


Thanks Aki.

Still no go:


Nov 20 08:59:19 auth: Debug: http-client: host auth.mydomain.com: Host 
created
Nov 20 08:59:19 auth: Debug: http-client: host auth.mydomain.com: Host 
session created
Nov 20 08:59:19 auth: Debug: http-client: host auth.mydomain.com: Need 
to perform DNS lookup
Nov 20 08:59:19 auth: Debug: http-client: host auth.mydomain.com: 
Performing asynchronous DNS lookup
Nov 20 08:59:19 auth: Debug: http-client: host auth.mydomain.com: conn 
unix:dns-client: dns(auth.mydomain.com): Lookup started
Nov 20 08:59:19 auth: Debug: http-client: host auth.mydomain.com: conn 
unix:dns-client: Connecting
Nov 20 08:59:19 auth: Debug: http-client: host auth.mydomain.com: conn 
unix:dns-client (pid=506,uid=0): Client connected (fd=24)
Nov 20 08:59:19 auth: Debug: http-client: host auth.mydomain.com: conn 
unix:dns-client (pid=506,uid=0): Sending version handshake
Nov 20 08:59:19 auth: Debug: http-client[1]: request [Req1: GET 
https://auth.mydomain.com/realms/myrealm/protocol/openid-connect/userinfo/token=eyJhbGci...redacted...TcwMDQ2NzE1OSwiYXV0aF...: 
Submitted (requests left=1)
Nov 20 08:59:19 auth: Debug: http-client: host auth.mydomain.com: conn 
unix:dns-client (pid=506,uid=0): dns(auth.mydomain.com): Lookup 
successful after 4 msecs
Nov 20 08:59:19 auth: Debug: http-client: host auth.mydomain.com: DNS 
lookup successful; got 1 IPs
Nov 20 08:59:19 auth: Debug: http-client: peer 10.10.200.10:443 
(shared): Peer created
Nov 20 08:59:19 auth: Debug: http-client: peer 10.10.200.10:443: Peer 
pool created
Nov 20 08:59:19 auth: Debug: http-client[1]: peer 10.10.200.10:443: Peer 
created
Nov 20 08:59:19 auth: Debug: http-client[1]: queue 
https://auth.mydomain.com:443: Setting up connection to 10.10.200.10:443 
(SSL=auth.mydomain.com) (1 requests pending)
Nov 20 08:59:19 auth: Debug: http-client[1]: peer 10.10.200.10:443: 
Linked queue https://auth.mydomain.com:443 (1 queues linked)
Nov 20 08:59:19 auth: Debug: http-client[1]: queue 
https://auth.mydomain.com:443: Started new connection to 
10.10.200.10:443 (SSL=auth.mydomain.com)
Nov 20 08:59:19 auth: Debug: http-client: host auth.mydomain.com: conn 
unix:dns-client (pid=506,uid=0): Disconnected: Connection closed (fd=24)
Nov 20 08:59:19 auth: Debug: http-client: host auth.mydomain.com: conn 
unix:dns-client (pid=506,uid=0): Disconnect: deinit
Nov 20 08:59:19 auth: Debug: http-client[1]: peer 10.10.200.10:443: 
Creating 1 new connections to handle requests (already 0 usable, 
connecting to 0, closing 0)
Nov 20 08:59:19 auth: Debug: http-client[1]: peer 10.10.200.10:443: 
Making new connection 1 of 1 (0 connections exist, 0 pending)
Nov 20 08:59:19 auth: Debug: http-client: conn 10.10.200.10:443 [1]: 
Connecting
Nov 20 08:59:19 auth: Debug: http-client: conn 10.10.200.10:443 [1]: 
Waiting for connect (fd=24) to finish for max 0 msecs
Nov 20 08:59:19 auth: Debug: http-client: conn 10.10.200.10:443 [1]: 
HTTPS connection created (1 parallel connections exist)
Nov 20 08:59:19 auth: Debug: http-client: conn 10.10.200.10:443 [1]: 
Client connection failed (fd=24)
Nov 20 08:59:19 auth: Debug: http-client[1]: peer 10.10.200.10:443: 
Connection failed (1 connections exist, 0 pending)
Nov 20 08:59:19 auth: Debug: http-client: peer 10.10.200.10:443: Failed 
to make connection (1 connections exist, 0 pending)
Nov 20 08:59:19 auth: Debug: http-client[1]: peer 10.10.200.10:443: 
Failed to establish any connection within our peer pool: 
connect(10.10.200.10:443) failed: Connection refused (1 connections 
exist, 0 pending)
Nov 20 08:59:19 auth: Debug: http-client[1]: queue 
https://auth.mydomain.com:443: Failed to set up connection to 
10.10.200.10:443 (SSL=auth.mydomain.com): connect(10.10.200.10:443) 
failed: Connection refused (1 peers pending, 1 requests pending)
Nov 20 08:59:19 auth: Debug: http-client[1]: peer 10.10.200.10:443: 
Unlinked queue https://auth.mydomain.com:443 (0 queues linked)
Nov 20 08:59:19 auth: Debug: http-client[1]: queue 
https://auth.mydomain.com:443: Failed to set up any connection; failing 
all queued requests
Nov 20 08:59:19 auth: Debug: http-client[1]: request [Req1: GET 
https://auth.mydomain.com/realms/myrealm/protocol/openid-connect/userinfo/token=eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJaYTFXcXhxb0RULXBSc2o1WXZFdUJfLUxBVUtGNk5SeFFrUS1mNmdTUGs4In0.eyJleHAiOjE3MDA0Njc0NTksImlhdCI6MTcwMDQ2NzE1OSwiYXV0aF...: 
Error: 9003 connect(10.10.200.10:443) failed: Connection refused
Nov 20 08:59:19 auth: Debug: http-client[1]: queue 
https://auth.mydomain.com:443: Dropping request [Req1: GET 

dovecot and oauth2 (with keycloak) not working

2023-11-19 Thread Francis Augusto Medeiros-Logeay via dovecot
Hi,

I successfully configured Roundcube to use keycloak for oauth2.

However, I am having trouble to make it work with dovecot. My configuration is 
this:

cat dovecot-oauth2.conf.ext
tokeninfo_url = 
https://auth.mydomain.com/realms/myrealm/protocol/openid-connect/userinfo
introspection_url = 
https://auth.mydomain.com/realms/myrealm/protocol/openid-connect/token/introspect
introspection_mode = post
username_attribute = postfixMailAddress
debug = yes
scope = openid Roundcube_email

This is what I am getting from the logs:


Nov 20 08:20:30 auth: Error: 
ldap(fran...@mydomain.com,10.10.40.30,): ldap_bind() failed: 
Constraint violation
Nov 20 08:20:30 auth: Debug: http-client: host auth.mydomain.com: Host created
Nov 20 08:20:30 auth: Debug: http-client: host auth.mydomain.com: Host session 
created
Nov 20 08:20:30 auth: Debug: http-client: host auth.mydomain.com: IPs have 
expired; need to refresh DNS lookup
Nov 20 08:20:30 auth: Debug: http-client: host auth.mydomain.com: Performing 
asynchronous DNS lookup
Nov 20 08:20:30 auth: Debug: http-client[1]: request [Req1: GET 
https://auth.mydomain.com/realms/med-lo/protocol/openid-connect/userinfoeyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJaYTFXcXhxb0RULXBSc2o1WXZFdUJfLUxBVUtGNk5SeFFrUS1mNmdTUGs4In0.eyJleHAiOjE3MDA0NjUxMzAsImlhdCI6MTcwMDQ2NDgzMCwiYXV0aF90aW1lIjoxNzAwNDY0Njg5LCJqdGkiOiIzZTk5YWI4Yi0xZTkyLTRlMDYtYjg0NC1kODc4ZDZjODZjOWMiLCJpc3MiOiJodHRwczovL2F1dGgubWVkLWxvLmV1L3JlYWxtcy9tZWQtbG8iLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiZGE5MDk4NDQtNjlmOS00ZjkzLWI1NjctMGZjOWQ3YzA3MTZmIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoicm91bmRjdWJlIiwic2Vzc2lvbl9zdGF0ZSI6ImZkY2I2YTczLTNjNjgtNDlhNS1hOTlkLTdkYmE4ODNlNjg4NiIsImFjciI6IjAiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cHM6Ly9tYWlsLm1lZC1sby5ldSJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiIsImRlZmF1bHQtcm9sZXMtbWVkLWxvIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgUm91bmRjdWJlX2VtYWlsIHByb2ZpbGUgZW1haWwgb3BlbmVkIiwic2lkIjoiZmRjYjZhNzMtM2M2OC00OWE1LWE5OWQtN2RiYTg4M2U2ODg2IiwiZW1haWxfdmVyaWZpZWQiOnRydWUsInBvc3RmaXhNYWlsQWRkcmVzcyI6ImZyYW5jaXNAbWVkLWxvLmV1IiwicG9zdGZpeE1haWxib3giOiJmcmFuY2lzQG1lZC1sby5ldSIsIm5hbWUiOiJGcmFuY2lzIEF1Z3VzdG8gTWVkZWlyb3MtTG9nZWF5IiwicHJlZmVycmVkX3VzZXJuYW1lIjoiZnJhbmNpcyIsImdpdmVuX25hbWUiOiJGcmFuY2lzIEF1Z3VzdG8iLCJmYW1pbHlfbmFtZSI6Ik1lZGVpcm9zLUxvZ2VheSIsImVtYWlsIjoiZnJhbmNpc0BtZWQtbG8uZXUifQ.Cehd8sbCTihfq1SKQitLTPfZZAWHx31sy8I6YydY_3eZvyHRellhQz1F9NxFt0uHaFk3KeddHV6U9z14qT7fStDp18ECJodSdcDt4k6J7geNjSbO3jSXOfk5JTbNPv0agi9e767E54g2ZkStPEezrAYY83msx7JSVpEmwKItSrDyyAWH44jp0OsnaLVCOZP1gBklTgiDt7uVsFwL9kpGamsMt62jNADnIAt6qLapHofiXi7GuIKdQP8-IG_7cCcpY6bEvcHiSgqhIpk5UHgMsljNQOkCKDpQ5rrTmRxloVF1y1zE7LYPNcugC_ZF_5TzxhVTEdEOLL9Q5epdlJvtvQ]:
 Submitted (requests left=1)
Nov 20 08:20:30 auth: Debug: http-client: host auth.mydomain.com: DNS lookup 
successful; got 1 IPs
Nov 20 08:20:30 auth: Debug: http-client: peer 10.10.100.10:443 (shared): Peer 
created
Nov 20 08:20:30 auth: Debug: http-client: peer 10.10.100.10:443: Peer pool 
created
Nov 20 08:20:30 auth: Debug: http-client[1]: peer 10.10.100.10:443: Peer created
Nov 20 08:20:30 auth: Debug: http-client[1]: queue 
https://auth.mydomain.com:443: Setting up connection to 10.10.100.10:443 
(SSL=auth.mydomain.com) (1 requests pending)
Nov 20 08:20:30 auth: Debug: http-client[1]: peer 10.10.100.10:443: Linked 
queue https://auth.mydomain.com:443 (1 queues linked)
Nov 20 08:20:30 auth: Debug: http-client[1]: queue 
https://auth.mydomain.com:443: Started new connection to 10.10.100.10:443 
(SSL=auth.mydomain.com)
Nov 20 08:20:30 auth: Debug: http-client[1]: peer 10.10.100.10:443: Creating 1 
new connections to handle requests (already 0 usable, connecting to 0, closing 
0)
Nov 20 08:20:30 auth: Debug: http-client[1]: peer 10.10.100.10:443: Making new 
connection 1 of 1 (0 connections exist, 0 pending)
Nov 20 08:20:30 auth: Debug: http-client: conn 10.10.100.10:443 [1]: Connecting
Nov 20 08:20:30 auth: Debug: http-client: conn 10.10.100.10:443 [1]: Waiting 
for connect (fd=23) to finish for max 0 msecs
Nov 20 08:20:30 auth: Debug: http-client: conn 10.10.100.10:443 [1]: HTTPS 
connection created (1 parallel connections exist)
Nov 20 08:20:30 auth: Debug: http-client: conn 10.10.100.10:443 [1]: Client 
connection failed (fd=23)
Nov 20 08:20:30 auth: Debug: http-client[1]: peer 10.10.100.10:443: Connection 
failed (1 connections exist, 0 pending)
Nov 20 08:20:30 auth: Debug: http-client: peer 10.10.100.10:443: Failed to make 
connection (1 connections exist, 0 pending)
Nov 20 08:20:30 auth: Debug: http-client[1]: peer 10.10.100.10:443: Failed to 
establish any connection within our peer pool: connect(10.10.100.10:443) 
failed: Connection refused (1 connections exist, 0 pending)
Nov 20 08:20:30 auth: Debug: http-client[1]: queue 
https://auth.mydomain.com:443: Failed to set up connection to 10.10.100.10:443 
(SSL=auth.mydomain.com): 

Shared mailboxes and indexes

2023-10-06 Thread Francis Augusto Medeiros-Logeay via dovecot
Hi,

I googled a bit to see if I understand it, but no, I haven’t got anything that 
explains this:

What’s exactly the difference between INDEX and INDEXPVT for shared mailboxes? 
Why are they pointing to the same folder on Dovecot example 
(https://doc.dovecot.org/configuration_manual/shared_mailboxes/shared_mailboxes/#user-shared-mailboxes)?

Best,

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


Re: Changed separator, sub folders not showing new e-mail

2023-10-02 Thread Francis Augusto Medeiros-Logeay via dovecot
I found the answer here: 
https://apple.stackexchange.com/questions/441313/no-mailbox-doesnt-exist-separator-woes-in-mail-app-dovecot-interaction/441341#441341

Apparently on Mac one needs to update the separator on a file, since it doesn’t 
seem that the Mail.app does it for itself.

On the iPhone it happened automatically.

Best,

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


Changed separator, sub folders not showing new e-mail

2023-10-02 Thread Francis Augusto Medeiros-Logeay via dovecot

Hi,

I recently changed the mailbox separator from '.' to '/' so that I could 
have shared mailboxes working.


However, while the mailboxes show fine on Roundcube and on other 
web-based e-mail clients, on the Mail.app on my Mac I don't get newer 
messages on those sub folders.


For example, I have a subfolder Test. Mails filtered to be dropped 
there, show fine.
But I have one called Lists, with a sub folder called "Dovecot". I can't 
read mails that are under "Lists/Dovecot".


Can anyone help?

Best,

Francis

--
Francis Augusto Medeiros-Logeay
Oslo, Norway
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Separators and shared namespaces

2023-09-28 Thread Francis Augusto Medeiros-Logeay via dovecot
Hi Martin,

I had a similar problem:

https://dovecot.org/mailman3/archives/list/dovecot@dovecot.org/thread/DNHM3OOV3SZUC2SIS7FMWL7MMT64F73T/


It seemed to me that using ‘.’ truncated the domain name when that was used in 
the paths, such as when using %d.

Best,

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


Re: Dovecot lda-dupes

2023-09-28 Thread Francis Augusto Medeiros-Logeay via dovecot
Hi,

I have read elsewhere that the Maildir shouldn’t be at the home. But that’s how 
it worked for me since the start.

I wonder if I could either change the location of these .dovecot.lda-dupes, or 
if I could change home without having to move the mailboxes of all the users.

Today I have this:

On my dovecot-sql.conf.ext:

iterate_query = SELECT username AS user FROM mailbox
user_query = SELECT CONCAT('/var/mail/vmail/',maildir) AS home, \
  
CONCAT('maildir:/var/mail/vmail/',maildir,':INDEX=/var/vmail-index/index/%d/%n:CONTROL=/var/vmail-index/control/%d/%n')
 AS mail, \
  5000 AS uid, 5000 AS gid, CONCAT('*:bytes=',quota) AS quota_rule \
  FROM mailbox WHERE username = '%u' AND active = 1
password_query = SELECT username AS user,password FROM mailbox \
  WHERE username = '%u' AND active=‘1'

On my 10-mail.conf

mail_location = 
maildir:/var/mail/vmail/%d/%n:INDEX=/var/vmail-index/index/%d/%n:CONTROL=/var/vmail-index/control/%d/%n

If I add `Maildir` to the mail_location and to the mail user_query, will I have 
to move mailboxes, or the only thing I have to do is to add “Maildir” when I 
use %h/%%h? 

Best,

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


Re: Dovecot lda-dupes

2023-09-28 Thread Francis Augusto Medeiros-Logeay via dovecot
Never mind, I found it. I had to add 

`replication_dsync_parameters`, with the default values, but with `-x shared` 
to exclude the namespace.

Best,

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


Dovecot lda-dupes

2023-09-27 Thread Francis Augusto Medeiros-Logeay via dovecot

Hi,

Since I enabled shared mailboxes I'm having these errors:

Sep 27 21:22:41 doveadm(fran...@med-lo.eu): Error: Failed to access 
mailbox dovecot/lda-dupes: 
stat(/var/mail/vmail/med-lo.eu/francis/.dovecot.lda-dupes/tmp) failed: 
Not a directory


And replication stopped.

How can I fix this?

Best,
Francis
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Separators and shared namespaces

2023-09-27 Thread Francis Augusto Medeiros-Logeay via dovecot
Hi,

When I used a ‘.’  as a separator, it seemed to truncate paths with the domain 
name, such as those with %%d. That happened only to shared namespaces.

Best,

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


Exclude shared mailboxes from replication

2023-09-27 Thread Francis Augusto Medeiros-Logeay via dovecot
Hi,

I was wondering if it is possible to exclude shared mailboxes from replication.

I have us...@mydomain.com sharing mailboxes to us...@mydomain.com. 

However, since both mailboxes already replicate to a backup server, I wonder if 
it is possible to exclude the replicated mailboxes  from syncing.

Best,

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


Re: All list=yes namespaces must use the same separator - don't they?

2023-09-25 Thread Francis Augusto Medeiros-Logeay via dovecot
It works everywhere now. I guess it just needed its sweet time.

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


Re: All list=yes namespaces must use the same separator - don't they?

2023-09-25 Thread Francis Augusto Medeiros-Logeay via dovecot
I found what the problem was. It seems that using ‘.’ as a separator worked. 
But somehow folders and domain names with dots got messed up:

maildir++: root=/var/mail/vmail/francisaugusto/francis, 
index=/var/mail/vmail/med-lo.eu/francis/shared/index/francis@francisaugusto, 
indexpvt=/var/mail/vmail/med-lo.eu/francis/shared/francis@francisaugusto, 
control=, inbox=/var/mail/vmail/francisaugusto/francis, alt=
Sep 25 19:10:57 imap(fran...@med-lo.eu)<58061>: Debug: Namespace 
shared.francis@francisaugusto.: Creating storage despite: Root mail directory 
doesn't exist: /var/mail/vmail/francisaugusto/francis

You see, my domain is francisaugusto.com , but it 
got truncated. 

I changed the separator to ‘/‘ on the Inbox namespace and on the shared one, 
and voila, it worked.

I can see my shared mailboxes everywhere. But on Apple Mail (both on the Mac 
and on the iPhone), the shared mailboxes show no message. 

Any clue why? 
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


All list=yes namespaces must use the same separator - don't they?

2023-09-25 Thread Francis Augusto Medeiros-Logeay via dovecot

Hi,

I am trying to configure shared mailboxes, so I enabled the acl and the 
imap_acl plugins.


But I got the "All list=yes namespaces must use the same separator" 
error when I added this:


namespace {
  type = shared
   #separator =

  # Mailboxes are visible under "shared/user@domain/"
  # %%n, %%d and %%u are expanded to the destination user.
   prefix = shared/%%u/

  # Mail location for other users' mailboxes. Note that %variables and 
~/
  # expands to the logged in user's data. %%n, %%d, %%u and %%h expand 
to the

  # destination user's data.
  location = 
maildir:/var/mail/vmail/%%d/%%n:INDEX=/var/mail/vmail-index/index/%%d/%%n:INDEXPVT=/var/mail/vmail-index/index/%%d/%%n


  # Use the default namespace for saving subscriptions.
  subscriptions = no

  # List the shared/ namespace only if there are visible shared 
mailboxes.

  list = children
}

I don't have any separator configured explicitly, and when I see the 
config, the value is empty. So I don't really know what is the problem 
here.


Any hints?

Best,
Francis

--
Francis Augusto Medeiros-Logeay
Oslo, Norway
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org