Re: lda or lmtp for sieve?

2024-01-21 Thread Patrick Domack via dovecot

If postfix is adding it, your not using lmtp.

Only virtual and local adds it in postfix, lmtp is a symlink to smtp  
and does not add that header.
If your somehow delivering the mail through local, then forwarding it  
again via lmtp, that would be a bad thing.
Maybe look how you have spam/virus/... configured? Are they configured  
in some kind of loopback config using a lda that it shouldn't be  
using? I do know in older postfix versions (I haven't tested it in  
3.x) if an email came into my postfix server with a return-path  
header, postfix would strip it out before delivering it via lmtp/smtp




Quoting Michael Peddemors :


On 2024-01-21 04:43, Patrick Domack via dovecot wrote:


Quoting Benny Pedersen :


Christian Kivalo skrev den 2024-01-21 02:08:


Just wish LMTP would not end up with duplicate Return-Path headers..
Duplicate return path headers? I don't see them on my system. All  
mail is sent from postfix to dovecot with lmtp


it simply works better with lda ? :)

return-path is std postfix envelope sender pseudo header, bugs ?


it's not a pseudo header, it is defined starting in rfc-822, as to  
be added at time of delievery.


The LDA should add it, postfix lda add it (virtual/local) and  
dovecots do also (lda/lmtp)


I have used most postfix versions from 2.1 to 3.8 and dovecot lda  
and lmtp and haven't have never seen duplicate headers


Maybe it is just a Zimbra thing.. but we definitely see this  
occurring in the wild..   Maybe just poor configuration, but of  
course as per RFC, to be clear, is only supposed to be added by the  
'final' delivery mechanism.


So, the logic that implies duplicate Return-Path either indicates a  
broken system, looping issue, or email replay fails in those  
situations.


Postfix adds...

Return-path: 
Envelope-to: 
Delivery-date: Fri, 06 Oct 2023 08:56:07 -0300


After which it get handled by lmtp, which adds the following..

Return-Path: 
Delivered-To: 
Received: from 
by  with LMTP
id CMvDLNf1H2UcHQAAJRWI5g
(envelope-from )
for ; Fri, 06 Oct 2023 08:56:07 -0300

I guess this is a double issue, postfix should know that in this  
case, it is not the final delivery, lmtp is.. and lmtp should  
probably either remove the previous Return-Path, or copy that to a  
new header.. since it was not supposed to be there (but that has  
ramifications too.



--
"Catch the Magic of Linux..."

Michael Peddemors, President/CEO LinuxMagic Inc.
Visit us at http://www.linuxmagic.com @linuxmagic
A Wizard IT Company - For More Info http://www.wizard.ca
"LinuxMagic" a Reg. TradeMark of Wizard Tower TechnoServices Ltd.

604-682-0300 Beautiful British Columbia, Canada

___
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: lda or lmtp for sieve?

2024-01-21 Thread Patrick Domack via dovecot



Quoting Benny Pedersen :


Christian Kivalo skrev den 2024-01-21 02:08:


Just wish LMTP would not end up with duplicate Return-Path headers..
Duplicate return path headers? I don't see them on my system. All  
mail is sent from postfix to dovecot with lmtp


it simply works better with lda ? :)

return-path is std postfix envelope sender pseudo header, bugs ?


it's not a pseudo header, it is defined starting in rfc-822, as to be  
added at time of delievery.


The LDA should add it, postfix lda add it (virtual/local) and dovecots  
do also (lda/lmtp)


I have used most postfix versions from 2.1 to 3.8 and dovecot lda and  
lmtp and haven't have never seen duplicate headers



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


Re: Uncompress compressed messages in Maildir mailbox?

2024-01-20 Thread Patrick Domack via dovecot
Is it possible that those mails are missing the S= and/or W= size  
flags in the filename?
I remember that being a requirement (the S= part, not sure if W= was  
required).


I have stopped using maildir many years ago, and my script made sure  
S= was added to every email, where the script you linked to does not,  
it assumes it already exists.



Quoting Alexander Chekalin :


Thank you!

Here is the whole problem I see:

as I saw how good it is to have messages compressed I used  
https://github.com/George-NG/dovecot-maildir-compress script to  
compress whole mailboxes and thus save more space on disk. Looks  
like lock won't worked well so now I can see lines like that in  
Dovecot logs:


Error: Mailbox ... : Deleting corrupted cache record uid=61: UID 61:  
Broken virtual size in mailbox ... :  
read(compress(/data/vmail/...)): FETCH BODY[] got too little data:  
38910 vs 70020"


I tried to recover these messages by uncompress files with your  
command, and I can say it was possible to uncompress some files  
while others (the one that were reffered by these errors lines)  
seems can't be recovered.


Seems like I have data lost in some messages and this is not  
something I got used with dovecot which I use since pre-1.0 version.


P.S. I also tried gzip-ing messages so how have to ask you for the  
command to un-gzip messages, as "doveadm fs get compress  
gzip:6:posix:prefix=$PWD/ filename" seems not working for me.




On 17/01/2024 18:08 eetacheka...@lazurit.com  wrote:

 Some time ago I enabled compression on incoming messages, so LMTP  
delivered messages were compressed. Good idea in terms of disk  
space, but now I cannot uncompress any of these messages even when  
I need to!


I was using this setting:

plugins {
  zlib_save = lz4
}

and now I can see this string at the beginning of each message  
file - "Dovecot-LZ4", so no other software can uncompress them for  
me.


Please advise, how can I uncompress message file in Maildir  
mailbox when I need to access its contents directly?


One simple way:

doveadm fs get compress lz4:6:posix:prefix=$PWD/ filename

Aki




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


Re: Uncompress compressed messages in Maildir mailbox?

2024-01-17 Thread Patrick Domack via dovecot
Not really recommended editing the mailstorage directly once you start  
using dovecot custom stuff.


If you need to fetch a specific email, I use:
doveadm fetch -u u...@example.com text mailbox-guid $guid uid $uid

Quoting acheka...@lazurit.com:

Some time ago I enabled compression on incoming messages, so LMTP  
delivered messages were compressed. Good idea in terms of disk  
space, but now I cannot uncompress any of these messages even when I  
need to!


I was using this setting:

plugins {
  zlib_save = lz4
}

and now I can see this string at the beginning of each message file  
- "Dovecot-LZ4", so no other software can uncompress them for me.


Please advise, how can I uncompress message file in Maildir mailbox  
when I need to access its contents directly?

___
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