Dovecot core-2.3.11.3 compile error on macOS with src/lib/ioloop-notify-kqueue.c

2020-09-18 Thread Steven Smith
I’ve hit this compile error on macOS 10.15 with the file 
src/lib/ioloop-notify-kqueue.c:

> error: implicit declaration of function 'i_gettimeofday' is invalid in C99

The fix is to #include "time-util.h"

> --- ./src/lib/ioloop-notify-kqueue.c  2020-09-18 19:56:38.0 -0400
> +++ ./src/lib/ioloop-notify-kqueue.c  2020-09-18 20:54:36.0 -0400
> @@ -11,6 +11,7 @@
>  
>  #include "ioloop-private.h"
>  #include "llist.h"
> +#include "time-util.h"
>  #include 
>  #include 
>  #include 




smime.p7s
Description: S/MIME cryptographic signature


sieve-extdata plugin breaks on pigeonhole 0.5 ish

2020-09-18 Thread Ed W
Hi, I wonder if someone could give me a little help bringing the 
sieve-extdata plugin up to date to be usable with latest Dovecot/pigeonhole


Trying to use both together at present I get an error:

  managesieve: Fatal: Couldn't load required plugin 
/usr/lib/dovecot/sieve/lib90_sieve_extdata_plugin.so: dlopen() failed: 
/usr/lib/dovecot/sieve/lib90_sieve_extdata_plugin.so: undefined symbol: 
sieve_sys_error



This appears to be due to the change in error handling in pigeonhole 0.5 
which appears to have removes the "sieve_sys_error()" and 
"sieve_sys_warning()" functions


I'm unclear how this code should be change (I've commented it out for 
now - eek).



I find this extension useful to pass in user specific parameters to my 
sieve scripts that are stored elsewhere in an sql database, eg spam 
score, size threshold for attachments, perhaps there is some other way 
to achieve this?



Any hints on how to fixing this would be appreciated

Thanks

Ed W




lmtp multiple mailboxes

2020-09-18 Thread Janis

Hello,

What would be the best way to implement "deliver mail to multiple 
maildirs" through LMTP in Dovecot? Like in Postfix virtual_maps.


Thank you!

Best wishes,
Janis


Re: Default sieve mark seen?

2020-09-18 Thread @lbutlr
Any ideas on this?

> On 05 Sep 2020, at 11:47, @lbutlr  wrote:
> 
> I have the following in my default.sieve file:
> 
> require "fileinto";
> if header :contains "X-spam-flag" "YES" {
> require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables", 
> "imap4flags"];
>setflag "\\Seen";
>fileinto "Junk";
> }
> 
> This is largely unchanged, except that I added imap4flags and set flag 
> "\\Seen"; recently.
> 
> The messages still get filed into the user's Junk folder, but they are still 
> marked as unread.
> 
> I also have
> 
>  imapsieve_mailbox3_name = Archive
>  imapsieve_mailbox3_causes = COPY
>  imapsieve_mailbox3_before = file:/usr/lib/dovecot/sieve/mark-read.sieve
> 
> # cat /usr/lib/dovecot/sieve/mark-read.sieve
> require ["imap4flags"];
> setflag "\\seen";
> 
> Which works fine.
> 
> How do I fix this?

-- 
'I thought dwarfs didn't believe in devils and demons and stuff like that.'
'That's true, but... we're not sure if they know.'



FTS Index based on UserDB preference

2020-09-18 Thread Scott Q.
Does anyone know if it's possible to do FTS Index based on a
userdb preference ? Basically if the preference is 'on' , dovecot goes
ahead with the fts indexing for that particular user.

I'm guessing right now it's not possible but is there anyone that
could envision writing such a patch ? If so, can you contact me
off-list ?


Re: How to use dovecot only as POP3 server / prevent it from creating .imap directories?

2020-09-18 Thread Binarus



On 19.06.2020 00:27, Joseph Tam wrote:
> On Wed, 17 Jun 2020, Josef 'Jeff' Sipek wrote:
> 
>> On Tue, Jun 09, 2020 at 12:32:18 +0200, Binarus wrote:
>> ...
>>> ./mail/inbox
>>> ./mail/.imap
>>> ./mail/.imap/dovecot-uidvalidity
>>> ./mail/.imap/dovecot.list.index.log
>>> ./mail/.imap/dovecot-uidvalidity.5edce848
>>> ./mail/.imap/INBOX
>>> ./mail/.imap/INBOX/dovecot.index.log
>>> ./mail/.imap/INBOX/dovecot.index
>>> ./mail/.imap/INBOX/dovecot.index.log.2
>>> ./mail/.imap/INBOX/dovecot.index.cache
>>
>> The .imap directory isn't really about IMAP.  It is sort of a generic
>> directory that just happens to have "imap" in the name.  The index
>> files you
>> see are required for various features inside dovecot to work
>> properly.  Many
>> of them are related to performance rather than a specific protocol.
> 
> Spot on.
> 
>> If you don't want the index files to live inside the users' home
>> directories, take a look at the INDEX and CONTROL keys in the
>> mail_location
>> docs:
>>
>> https://doc.dovecot.org/configuration_manual/mail_location/#format
>>
>> While that still creates the files, you can move them off to a
>> location that
>> the users do not see.
> 
> Or you can create in-memory indices, but that is a solution to the wrong
> problem.
> 
> By specifically stating in mail_location that ~user holds mailboxes,
> you are telling Dovecot an untruth.  It's better to tell Dovecot user
> mailboxes (other than INBOX) don't exist, rather than to push all the
> indices under the carpet.
> 

I just noticed that I haven't said thank you yet.

However, the solution I have implemented works very nice since several
months now, so I currently don't plan to change or improve anything.

Thanks again, and best regards,

Binarus



Re: How to use dovecot only as POP3 server / prevent it from creating .imap directories?

2020-09-18 Thread Binarus



On 17.06.2020 17:41, Josef 'Jeff' Sipek wrote:
> On Tue, Jun 09, 2020 at 12:32:18 +0200, Binarus wrote:
> ...
>> ./mail/inbox
>> ./mail/.imap
>> ./mail/.imap/dovecot-uidvalidity
>> ./mail/.imap/dovecot.list.index.log
>> ./mail/.imap/dovecot-uidvalidity.5edce848
>> ./mail/.imap/INBOX
>> ./mail/.imap/INBOX/dovecot.index.log
>> ./mail/.imap/INBOX/dovecot.index
>> ./mail/.imap/INBOX/dovecot.index.log.2
>> ./mail/.imap/INBOX/dovecot.index.cache
>>
>> While there are no .imap subdirectories in other parts of the home
>> directories any more (which was the main goal), there are still at least
>> three unnecessary files plus one unnecessary directory with four
>> unnecessary files left. This is an ugly waste of resources, but it won't
>> keep me from going that way.
>>
>> Obviously, dovecot is not meant to serve only POP3 any more
> 
> The .imap directory isn't really about IMAP.  It is sort of a generic
> directory that just happens to have "imap" in the name.  The index files you
> see are required for various features inside dovecot to work properly.  Many
> of them are related to performance rather than a specific protocol.
> Granted, POP3 is such a simple protocol that most of the features don't
> apply to a POP3-only server.
> 
> If you don't want the index files to live inside the users' home
> directories, take a look at the INDEX and CONTROL keys in the mail_location
> docs:
> 
> https://doc.dovecot.org/configuration_manual/mail_location/#format
> 
> While that still creates the files, you can move them off to a location that
> the users do not see.
> 
> Jeff.
> 

A little bit late, but just wanted to thank you for your explanation.

By the way, that solution is playing very well in practice - no reason
to change or improve something.

Thanks again, and best regards,

Binarus