Re: Sieve generate a lot of hard link copies of mails in mailboxes

2024-06-12 Thread George Asenov via dovecot

No one have idea what is wrong here?

On 07-Jun-24 4:10 PM, George Asenov via dovecot wrote:

Hello,

I have very strange issue. Sieve generate copies of users messages i.e. 
not real copies but hardlinks for the same message. It happens to many 
messages but not every message and not every time, it is not a single 
user issue I have couple users with that issue.


It happens during auto reporting for spam/ham with sieve.
But I'm unable to reproduce it.

At some point the hardlinks copies become so many that the mailbox index 
files become so bug that dovecot start throwing error:


dovecot[3385911]: imap(redac...@domain.tld)<1992901>: 
Error: Mailbox Junk: mmap(size=520636784) failed with file 
/var/lib/dovecot-virtualmin/index/redac...@domain.tld/.Junk/dovecot.index.cache: Cannot allocate memory


other relevant logs are:

dovecot: imap-login: Login: user=, method=PLAIN, 
rip=YYY.YYY.YYY.YYY, lip=XXX.XXX.XXX.XXX, mpid=3393763, TLS, 
session=
dovecot: imap(redacted.user)<3393763>: sieve: DEBUG: 
learn-spam.sieve was triggered on imap.cause=COPY: 
msgid=<87584056G78841203D85243127W62181551P@idomziqnd>
dovecot: imap(redacted.user)<3393763>: sieve: DEBUG: 
learn-spam on imap.cause=COPY: from=redacted.mail, to=redacted2.mail, 
subject=Asseyez-vous confortablement, n'importe où..., 
msgid=<87584056G78841203D85243127W62181551P@idomziqnd>, 
X-Spamd-Result=default: False [4.49 / 15.00]; 
FORGED_RECIPIENTS(2.00)[m:redacted2.mail,s:redacted.user.fr]; 
BAYES_SPAM(1.89)[88.30%]; MID_RHS_NOT_FQDN(0.50)[]; 
BAD_REP_POLICIES(0.10)[]; RCVD_NO_TLS_LAST(0.10)[]; 
MIME_GOOD(-0.10)[multipart/related,multipart/alternative,text/plain]; 
ASN(0.00)[asn:34300, ipnet:62.173.128.0/19, country:RU]; 
RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~,4:~,5:+]; 
RCPT_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; 
RCVD_VIA_SMTP_AUTH(0.00)[]; GREYLIST(0.00)[pass,body]; 
R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; 
R_SPF_ALLOW(0.00)[+mx]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[or.mg]; 
NEURAL_SPAM(0.00)[0.000]
dovecot: imap(redacted.user)<3393763>: sieve: DEBUG: 
learn-spam send to rspamd spam
dovecot: imap(redacted.user)<3393763>: program 
exec:/var/lib/dovecot/sieve/rspamd-learn-spam.sh (3397238): Terminated 
with non-zero exit code 1
dovecot: imap(redacted.user)<3393763>: Error: sieve: 
failed to execute to program `rspamd-learn-spam.sh': refer to server log 
for more information. [2024-06-03 07:36:40]
dovecot: imap(redacted.user)<3393763>: Disconnected: 
Connection closed (UID FETCH finished 32.173 secs ago) in=2914 out=39237 
deleted=1 expunged=1 trashed=0 hdr_count=14 hdr_bytes=10705 body_count=1 
body_bytes=1606


I know that this is because the mail which is reported is too big for 
curl but documentation say that

$
pipe :copy :try "rspamd-learn-spam.sh";
$
this should ignore the error.
I have tested also to change it like that:
$
pipe :copy  "rspamd-learn-spam.sh";
$
but the issue still persists

I can't confirm that the issue is that error because these errors are 
way less than the messages with hardlink copies.

Also sometimes one mail have more than two hardlinks to it.

here is a example:

inode# hardlink_count filename
2430090371 23850 
./Maildir/.Trash/cur/1714190559.M355157P25776.redacted.hostname,S=39259,W=40217:2,S
2430090371 23850 
./Maildir/.Trash/cur/1714190562.M259778P25902.redacted.hostname,S=39259,W=40217:2,S
2430090371 23850 
./Maildir/.Trash/cur/1714190565.M188090P26028.redacted.hostname,S=39259,W=40217:2,S
2430090371 23850 
./Maildir/.Trash/cur/1714190568.M340582P26179.redacted.hostname,S=39259,W=40217:2,S


yes this is "23850" hardlinks to the same Inode
###
The issue is somewhere in the sieve ham/spam reporting to rspamd but 
cant figure out where and why.


Is this a bug or my configuration is wrong?


Here are all related configurations (feel free to ask for more if needed):
##
# doveconf -n
# 2.3.16 (7e2e900c1a): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.16 (09c29328)
# OS: Linux 4.18.0-513.24.1.el8_9.x86_64 x86_64 Rocky Linux release 8.9 
(Green Obsidian)

# Hostname: redacteddomain.tld
auth_mechanisms = plain login
disable_plaintext_auth = no
first_valid_uid = 1000
mail_location = 
maildir:~/Maildir:INDEX=/var/lib/dovecot-virtualmin/index/%u:CONTROL=/var/lib/dovecot-virtualmin/control/%u

managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope 
encoded-character vacation subaddress comparator-i;ascii-numeric 
relational regex imap4flags copy include variables body enotify 
environment mailbox date index ihave duplicate mime

foreverypart extracttext vacation-seconds imapsieve vnd.dovecot.imapsieve
mbox_write_locks = fcntl
namespace inbox {
   inbox = 

Re: Dovecot community repositories

2024-06-12 Thread dovecot--- via dovecot

Just in case you did not know, dovecot has it's own repo you can add to your 
system to get newest updates.
https://repo.dovecot.org/

For example with RHEL flavors:

/etc/yum.repos.d/dovecot.repo
  [dovecot-2.3-latest]
  name=Dovecot 2.3 RHEL $releasever - $basearch
  baseurl=http://repo.dovecot.org/ce-2.3-latest/rhel/$releasever/RPMS/$basearch
  gpgkey=https://repo.dovecot.org/DOVECOT-REPO-GPG
  gpgcheck=1
  enabled=1

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


Re: Dovecot community repositories

2024-06-12 Thread Michael Slusarz via dovecot
> On 06/12/2024 5:37 AM MDT MK via dovecot  wrote:
> 
> just a short question to the dovecot people, maybe Aki or someone else can 
> answer this.
> Will there be an update to the Dovecot community repositories in the near 
> future? 
> The repositories are lagging behind the current distributions. Just as an 
> example: Debian 12 has been released in 06/2023, this is one year ago and 
> there are still no packages for it.
> Same for Ubutun 22.04, RHEL 9...  Is there still any interest from dovecot 
> side to continue to maintain the community repostitorys?

The community repositories continue to be maintained.

Debian 12/Ubuntu 22.04/RHEL 9 are not supported by CE 2.3 so we don't build 
packages for them.  They will be supported in CE 2.4.

Distros may have done their own work to modify Dovecot source to get 2.3 to 
build/package on these systems.

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


Re: [ext] Re: Dovecot community repositories

2024-06-12 Thread Ralf Hildebrandt via dovecot
* Jeff Peng via dovecot :
> 
> 
> I am using ubuntu 22.04, it can have dovecot installed by just run:
>  sudo apt install -y dovecot-core dovecot-imapd dovecot-lmtpd

Yes, 2.3.16 is in the default ubuntu repositories
while the community repos are at 2.3.21

-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netz | Netzwerk-Administration
  Invalidenstraße 120/121 | D-10115 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | https://www.charite.de

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


Re: Dovecot community repositories

2024-06-12 Thread Jeff Peng via dovecot




I am using ubuntu 22.04, it can have dovecot installed by just run:
 sudo apt install -y dovecot-core dovecot-imapd dovecot-lmtpd




Same for Ubutun 22.04, RHEL 9...  Is there still any interest from
dovecot side to continue to maintain the community repostitorys?

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


Dovecot community repositories

2024-06-12 Thread MK via dovecot
Hello,

just a short question to the dovecot people, maybe Aki or someone else can 
answer this.
Will there be an update to the Dovecot community repositories in the near 
future? 
The repositories are lagging behind the current distributions. Just as an 
example: Debian 12 has been released in 06/2023, this is one year ago and there 
are still no packages for it.
Same for Ubutun 22.04, RHEL 9...  Is there still any interest from dovecot side 
to continue to maintain the community repostitorys?

Greetings to Everyone
Oliver

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