Re: Message Age Deletion Query

2024-04-11 Thread Steve Hadachek via dovecot
Thanks Lucas!  I'll give these a try. 

On Wednesday, April 10, 2024 at 11:31:42 PM PDT, Lucas Rolff
 wrote:


https://doc.dovecot.org/3.0/man/doveadm-search-query.7/

Probably something like savedbefore 4weeks
Or even sentbefore 4weeks

Sent from Outlook_for_iOS
===
From: Steve Hadachek via dovecot 
Sent: Thursday, April 11, 2024 10:03:22 AM
To: dovecot@dovecot.org 
Subject: Message Age Deletion Query
 
Hello.  Using Mochahost and want to delete mailbox items older than 1 month
(approx) from receipt . Reading DoveCot documentation, not finding age query. 
Can you please specify this for me and provide an example?

Thank you and Kind Regards,

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


Re: Dovecot somehow creating new local e-mails from a compromised account

2024-04-11 Thread Joseph Tam via dovecot
Greg Earle  writes:

> Obviously I've changed the account password but I would really like to
> know how they were able to create e-mails on my system when ostensibly I
> would have assumed they could only read the account's e-mails via IMAP.

The INBOX is not read-only.  There's nothing really special about this mailbox
versus other mailboxes.  IMAP is used to create messages all the time.
For example, if you have an outgoing "Sent" folder, once your mail reader
gives it to your mail server, it then puts a copy into the outgoing folder via
IMAP.  Once someone gain controls over your IMAP account, they can
create messages with a format totally different than what your mail server
can make.

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


Variable expansion on %w

2024-04-11 Thread Gandalf Corvotempesta via dovecot
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


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-11 Thread Peter via dovecot

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
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


imap/pop proxy

2024-04-11 Thread Gandalf Corvotempesta via dovecot
Hi all
first time user as dovecot imap/pop3 proxy.

As i'm migrating some mailboxes to a new server, i would like to move
a couple at once, not everything (more than 10k).

The quickest way would be to setup the current (and old) dovecot
server as pop3/imap server AND proxy.

I'm thinking to start returning proxy_maybe in the password DB query,
pointing to the mailbox server.
If the mailbox server is migrated to the new one, proxy_maybe will
point to the remote server, if the mailbox is still on the old server,
proxy_maybe will point to localhost.

Is this enough ? Password auth should be done on the "remote" server
and not by the proxy itself.

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


Re: Strange problem with sieve

2024-04-11 Thread Peter via dovecot

I could solve the strange problem using a strange approach.

I don't try to read the data through stdin in my binary anymore, but I 
save the stdin into a temporary file (in script, using dd) and then I 
start my binary with this file as an argument to read data from. Now the 
binary sees the whole data with headers, multipart correctly encoded in 
base64, and it can decode it. Probably, stdin data was not correctly 
sent to binary from script in case of base64 encoded data. I would like 
to understand - why? But the problem is solved now.


Peter


On 09/04/2024 20:47, Doug via dovecot wrote:

That looks like base64 encoding to me. Possibly your sieve script is parsing
the output and truncating the data before handing it off to base64.

Doug


-Original Message-
From: Peter via dovecot 
Sent: Tuesday, April 9, 2024 2:03 PM
To: dovecot@dovecot.org
Subject: Re: Strange problem with sieve

Thanks for the advise.

Yes, the mails are automatically created. Unfortunately, the software
that generates them are out of our control.

I supposed that it is a base64 code, but if I try to manually pass the
text into 'base64 -d' - nothing usable goes out (you can try yourself
with the first part of the mail I've posted). Maybe it is salted, but I
don't see how to decode it...

Peter


On 09/04/2024 16:15, Doug via dovecot wrote:

-Original Message-
From: Peter via dovecot 
Sent: Tuesday, April 9, 2024 5:18 AM
To: dovecot@dovecot.org
Subject: Strange problem with sieve

Hello,

I use Dovecot 2.3.20 on FreeBSD 13.2 (in jail) as a part of iRedMail
installation.

Some mailboxes are configured for automatic mails processing using

sieve

(execute :pipe) and a custom binary (started by script). The system was
configured and was working correctly during several weeks.

Since ~10 days the system starts to work strangely. _*/Some/*_ mails
cannot be decoded anymore. No changes at our side, no updates etc.

I dumped the content received by my binary, and it looks really

strange:

pOUc9Z33O0GbfzbW5Mrmi


3L4tTlvKfsD8wP+hc6vN1v1bv+Vx827kW+YX5n/Zxtl240erH4t+nNyeuL1zh92

O0p24nYKd


vbtcd1UVyBdkFwztDtrdsIexJ2/Pu71L914vnFdYto+0T7JvoCiwqGm/7v6d+78
U

Jxf3lHiU


1B9QO7D1wIeD3IO3S91K68rUy/LLPv/E/6m/3Le8oUK/ovAQ7lDWoaeHow6

3/8z8ubpStTK/

This is a start of one mail. No headers, no readable data.

I removed "discard;" from sieve script to put such mails in the

mailbox,

and the mails look normally:

Mime-Version:1.0
Content-Type:multipart/mixed; boundary="=-

/3n/zeVGlN5thgeL28RKiw=="

--=-/3n/zeVGlN5thgeL28RKiw==
Content-Type: multipart/alternative; boundary="=-
sE/MdvfJZlakBmrKkcdzCg=="

--=-sE/MdvfJZlakBmrKkcdzCg==
Content-Type: multipart/related; boundary="=-

cgJVnLNlzX5YuD6yaI5USQ=="

--=-cgJVnLNlzX5YuD6yaI5USQ==
Content-Transfer-Encoding: base64
Content-Type: text/html; charset=utf-8

etc.

Really, I have no idea about any direction to explore. The server is
totally under my control, I can do anything, but I have no idea how to
debug this situation.

I tried to redirect such mails to another mailbox and process them
there, but I get the same strange data. If I connect Thunderbird to the
mailbox - I can read the mails correctly. So, the problem arrives at

the

moment when the sieve system is invoked - the mail data is corrupted
somehow.

Any advise will be really appreciated.

Peter

RE:
--=-cgJVnLNlzX5YuD6yaI5USQ==
Content-Transfer-Encoding: base64

What has changed is the body content of incoming emails is now base64

encoded. Because you are trying to process these messages with a script,

I'm

going to guess that the emails in question are automatically generated
somewhere. Go back to the process that is creating these emails and

disable

base64 encoding. Or, add a base64 decode step to the sieve execute script.

Doug

___
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: Message Age Deletion Query

2024-04-11 Thread Marc via dovecot
> Hello.  Using Mochahost and want to delete mailbox items older than 1
> month (approx) from receipt . Reading DoveCot documentation, not finding
> age query.  Can you please specify this for me and provide an example?
> 

doveadm move -u $account Archive/$year mailbox "$mbox" SENTBEFORE $nyear-01-01 
SENTSINCE $year-01-01
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org