Re: [auth] epoll_ctl(add, 13) failed: Operation not permitted (fd doesn't support epoll)

2024-07-05 Thread Entrepreneur AJ via dovecot
I was having this issue today.
Managed to figure enough of SELinux to get this .te file which seems to be 
working for me:

module dovecot-auth 1.0;

require {
type init_t;
type dovecot_t;
type dovecot_auth_t;
class process { noatsecure rlimitinh siginh };
class unix_stream_socket { read write };
class tcp_socket { read write };
}

#= dovecot_auth_t ==
allow dovecot_auth_t dovecot_t:tcp_socket { read write };
allow dovecot_auth_t init_t:unix_stream_socket { read write };

#= dovecot_t ==
allow dovecot_t dovecot_auth_t:process { noatsecure rlimitinh siginh };
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: dsync will be removed in 2.4 - why?

2024-07-05 Thread John Fawcett via dovecot


On 05/07/2024 11:51, Aki Tuomi via dovecot wrote:

On 05/07/2024 12:34 EEST Oliver Krone via dovecot  wrote:

  
Hi there,


I recently learned that dsync (mail replication) functionality will be
removed in the upcoming releases of dovecot. What is the reason and will
there be a replacement? How can I synchronize my e-mails  in the future?

Thanks a lot.

Regards
      Oliver


You have learned slightly wrong. Replicator is going to be removed, not doveadm 
sync (dsync).

You can still synchronize your emails by running doveadm sync periodically.

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


That's good to know (also thanks to the person that wrote me directly to 
say so too), I will look into this. I had completely disabled 
replication in order to get used to the future.


Just a doubt, when scheduling doveadm sync at short intervals. Will 
doveadm sync work ok if more than one job is overlapping (i.e. new cron 
job starts but old one is still running) or should I define some locking 
mechanism to ensure that there is no more than one sync job running?


Thanks

John


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


Re: dsync will be removed in 2.4 - why?

2024-07-05 Thread Aki Tuomi via dovecot

> On 05/07/2024 12:34 EEST Oliver Krone via dovecot  wrote:
> 
>  
> Hi there,
> 
> I recently learned that dsync (mail replication) functionality will be 
> removed in the upcoming releases of dovecot. What is the reason and will 
> there be a replacement? How can I synchronize my e-mails  in the future?
> 
> Thanks a lot.
> 
> Regards
>      Oliver
> 

You have learned slightly wrong. Replicator is going to be removed, not doveadm 
sync (dsync).

You can still synchronize your emails by running doveadm sync periodically.

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


dsync will be removed in 2.4 - why?

2024-07-05 Thread Oliver Krone via dovecot

Hi there,

I recently learned that dsync (mail replication) functionality will be 
removed in the upcoming releases of dovecot. What is the reason and will 
there be a replacement? How can I synchronize my e-mails  in the future?


Thanks a lot.

Regards
    Oliver

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


Is it possible to access cert_username and original_username the same time?

2024-07-05 Thread Csaba Bistey via dovecot
Hello all, 

If i use auth_ssl_username_from_cert dovecot gets its username from 
certificate, but seems like it also becomes %orig_user , if i do not use 
auth_ssl_username_from_cert cert_username completly unaccessable. Is there a 
way to access the original user supplied username when 
auth_ssl_username_from_cert is set or am i missed something and there is a 
variable for cert_username?

What i would like to do is use username from cert to determine which email 
accounts a user with that cert has access to but for that i would both need 
access to cert_username and the username given by the user, but when username 
supplied from cert seems like the username supplied by the user no longer 
accessable, or i cant figure out how to access it.

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


Re: AW: AW: AW: AW: AW: IMAPSieve plugin will not run rspamd script

2024-07-05 Thread John Fawcett via dovecot

Hi Jens

that looks much better, though not yet completely solved. What you're 
now getting is both rules firing when you move a message to Junk, 
whereas you only want the first one firing. I guess you will have no 
rules firing when you move from Junk to elsewhere. My suspicion is that 
for APPEND event the target and destination mailboxes are set to the 
same value.  i.e. APPEND event for moving to Junk will have 
mailbox=INBOX/Junk and from=INBOX/Junk which fires both rules, whereas 
when moving from Junk to INBOX mailbox=INBOX and from=INBOX, leading to 
KO for rule one on "mailbox" and KO on rule 2 for "from".


Static mailbox rule [1]: mailbox=`INBOX/Junk' from=`*' causes=(COPY 
APPEND) => before=`file:/usr/lib/dovecot/sieve/report-spam.sieve' 
after=(none)


Static mailbox rule [2]: mailbox=`*' from=`INBOX/Junk' causes=(COPY APPEND) => 
before=`file:/usr/lib/dovecot/sieve/report-ham.sieve' after=(none)

Whenever I do the move of the message I get a MOVE (which is treated 
like COPY). I don't see these APPEND events. Not sure why your email 
client generates APPEND instead of MOVE. That could be a point to 
investigate. If you're going to have to manage APPEND events you'll 
probably need different rules. If you'll going to manage MOVE/COPY and 
APPEND events then you can probably combine sets of rules (adjusting the 
sequential numbering).


The following work for MOVE/COPY events

  imapsieve_mailbox1_before =file:/usr/lib/dovecot/sieve/report-spam.sieve
  imapsieve_mailbox1_causes = COPY
  imapsieve_mailbox1_name = INBOX/Junk
  imapsieve_mailbox2_before =file:/usr/lib/dovecot/sieve/report-ham.sieve
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_from = INBOX/Junk
  imapsieve_mailbox2_name = *

The following should work for APPEND events, but it won't support 
wildcards fo rule 2 else it will fire when moving to Junk as well as 
from Junk. I'm pretty sure you can't specify negation e.g. 
imapsieve_mailbox2_name = !INBOX/Junk, which is what would be needed to 
make it work for moving from Junk to any mailbox. As written rule 2 
fires for moving from Junk to INBOX


  imapsieve_mailbox1_before =file:/usr/lib/dovecot/sieve/report-spam.sieve
  imapsieve_mailbox1_causes = APPEND
  imapsieve_mailbox1_name = INBOX/Junk
  imapsieve_mailbox2_before =file:/usr/lib/dovecot/sieve/report-ham.sieve
  imapsieve_mailbox2_causes = APPEND
  imapsieve_mailbox2_name = INBOX

John

On 02/07/2024 14:51, postfix_dovecot--- via dovecot wrote:

Gotcha

It looks like you nailed it John! (Log and config attached)

  


The log looks now very different and my log entry is also shown.

Now I can continue working at this point. Adjusting the events i.e.

  


The reason was actually simple - but I spent a few evenings searching and was 
blind. I could have figured it out on my own! Thank you so much John for took 
such care of this issue!

Jens

imap(info@demo.example): Debug: Loading modules from directory: 
/usr/lib/dovecot/modules

imap(info@demo.example): Debug: Module loaded: 
/usr/lib/dovecot/modules/lib95_imap_sieve_plugin.so

imap(info@demo.example): Debug: Effective uid=1, gid=1, 
home=/var/mail/vhosts/demo.example/info

imap(info@demo.example): Debug: open(/proc/self/io) failed: Permission denied

imap(info@demo.example): Debug: Namespace inbox: type=private, prefix=INBOX/, 
sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes 
location=maildir:~/Maildir

imap(info@demo.example): Debug: maildir++: 
root=/var/mail/vhosts/demo.example/info/Maildir, index=, indexpvt=, control=, 
inbox=/var/mail/vhosts/demo.example/info/Maildir, alt=

imap(info@demo.example): Debug: Namespace : type=private, prefix=, sep=, 
inbox=no, hidden=yes, list=no, subscriptions=no location=fail::LAYOUT=none

imap(info@demo.example): Debug: none: root=, index=, indexpvt=, control=, 
inbox=, alt=

imap(info@demo.example): Debug: Mailbox INBOX/Junk: Mailbox opened

imap(info@demo.example): Debug: imapsieve: mailbox INBOX/Junk: APPEND event

imap(info@demo.example): Debug: duplicate db: Initialize

imap(info@demo.example): Debug: sieve: Pigeonhole version 0.5.19 (4eae2f79) 
initializing

imap(info@demo.example): Debug: sieve: include: sieve_global is not set; it is 
currently not possible to include `:global' scripts.

imap(info@demo.example): Debug: sieve: Sieve imapsieve plugin for Pigeonhole 
version 0.5.19 (4eae2f79) loaded

imap(info@demo.example): Debug: sieve: Sieve Extprograms plugin for Pigeonhole 
version 0.5.19 (4eae2f79) loaded

imap(info@demo.example): Debug: imapsieve: Static mailbox rule [1]: 
mailbox=`INBOX/Junk' from=`*' causes=(COPY APPEND) => 
before=`file:/usr/lib/dovecot/sieve/report-spam.sieve' after=(none)

imap(info@demo.example): Debug: imapsieve: Static mailbox rule [2]: mailbox=`*' 
from=`INBOX/Junk' causes=(COPY APPEND) => 
before=`file:/usr/lib/dovecot/sieve/report-ham.sieve' after=(none)

imap(info@demo.example): Debug: imapsieve: Matched static mailbox rule [2]

imap(info@demo.example):