Question about imap (expunge response)

2017-12-15 Thread Kamil Jońca

(This is not neccesarily about dovecot, but rather IMAP protocol)

At https://drive.google.com/open?id=1j3oa5jYeSdiPbgaihq02K-u_vHbZLJZQ
is fetchmail log from my sessinon with polish email provider "Wirtualna
Polska"
As you can se fetchmail logged "* 1 EXPUNGE" as a response to "STORE"
command.
According to https://tools.ietf.org/html/rfc3501#section-7.4.1
EXPUNGE must not be sent as response to STORE command.
Am I right that their imap server is erroneous or am I missing
something?
KJ


-- 
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html
Lonely men seek companionship.  Lonely women sit at home and wait.
They never meet.


Re: Question about imap (expunge response)

2017-12-27 Thread Kamil Jońca
Bron Gondwana  writes:

> Yeah, that smells bogus.  You can't send the EXPUNGE right away, even if
[...]

Thank for confirmation 

> Having said that, fetchmail is also wrong here:
>
> fetchmail: IMAP> A0008 STORE 1 +FLAGS.SILENT (\Seen \Deleted) fetchmail:
> IMAP< * 1 EXPUNGE fetchmail: IMAP< A0008 OK Store completed fetchmail:
> IMAP> A0009 EXPUNGE fetchmail: IMAP< A0009 OK EXPUNGE completed
> fetchmail: mail expunge mismatch (0 actual != 1 expected)

> There is no guarantee that you would get exactly 1 from the EXPUNGE

Agreed, but with fetchmail I have (theoretically at least) possiblity to
modify it's behavior.
KJ



-- 
http://wolnelektury.pl/wesprzyj/teraz/
Totally illogical, there was no chance.
-- Spock, "The Galileo Seven", stardate 2822.3


Ask for little change :)

2018-10-11 Thread Kamil Jońca


Is it possible, that dovecot-lmtp, has in inserted "Received:" header
something about its version ie.
instead:
--8<---cut here---start->8---
Received: from alfa.kjonca by alfa.kjonca with LMTP id
   n1O7D5Q3v1toSQAApvcrCQ (envelope-from )
   for ; Thu, 11 Oct 2018 13:44:20 +0200
--8<---cut here---end--->8---

would be:
--8<---cut here---start->8---
Received: from alfa.kjonca (Dovecot version) by alfa.kjonca with LMTP
   id n1O7D5Q3v1toSQAApvcrCQ (envelope-from )
   for ; Thu, 11 Oct 2018 13:44:20 +0200
--8<---cut here---end--->8---

KJ

-- 
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html
można nie mieć nawet żadnego sensownego argumentu, a dzięki odpowiedniej
gestykulacji stworzyć poczucie wiarygodności.
Puls Biznesu


Ability to put dovecot version in received header

2021-03-17 Thread Kamil Jońca


I know that some time ago there was a discussion and this is conscious
decision to remove dovecot version from headers during lmtp
delievery. But is it possible to restore it as an option?
-- 
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html


Re: Ability to put dovecot version in received header

2021-03-17 Thread Kamil Jońca
Aki Tuomi  writes:

>> On 17/03/2021 11:19 Kamil Jońca  wrote:
>> 
>>  
>> I know that some time ago there was a discussion and this is conscious
>> decision to remove dovecot version from headers during lmtp
>> delievery. But is it possible to restore it as an option?
>> -- 
>> http://stopstopnop.pl/stop_stopnop.pl_o_nas.html
>
> It would be easier to consider this is you'd tell why?
>

1. other programs (Postfix,exim,fetchmmail,opensmtp, sendmail) - do
this, at least program name.

2. sometimes I would to know when new version really started to deliver
messages.

I understand privacy and security (by obscurity) concerns, so I do not
insist it should be fixed string, but rather option.
KJ


-- 
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html


A lot of duplicate GUIDS.

2016-11-08 Thread Kamil Jońca

Recently I have in logs a LOT of messages like this:
[]
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13511 in m.1530:845670 (size=2622) and m.1371:1831730 (size=916)
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13512 in m.1530:847414 (size=2274) and m.1371:1832476 (size=1069)
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13513 in m.1530:848971 (size=2339) and m.1371:180 (size=1202)
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13514 in m.1530:850496 (size=2723) and m.1371:1834276 (size=1036)
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13515 in m.1530:852219 (size=2187) and m.1371:1835108 (size=1638)
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13516 in m.1530:853684 (size=2614) and m.1371:1836275 (size=942)
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13517 in m.1530:855355 (size=1990) and m.1371:1837035 (size=1241)
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13518 in m.1530:856738 (size=2724) and m.1371:1837913 (size=1772)
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13519 in m.1530:858491 (size=2810) and m.1371:1839151 (size=1090)
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13520 in m.1530:860313 (size=3775) and m.1371:1839988 (size=1206)
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13521 in m.1530:862569 (size=2253) and m.1371:1840884 (size=1491)
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13522 in m.1530:864044 (size=6491) and m.1371:1841937 (size=1335)
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13523 in m.1530:867783 (size=1824) and m.1371:1842892 (size=1342)
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13524 in m.1530:869032 (size=2387) and m.1371:1843849 (size=1941)
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13526 in m.1530:872105 (size=2607) and m.1371:1845147 (size=1496)
Nov 06 19:39:36 IMAP(kjonca): Error: mdbox /home/kjonca/Mail/1/storage: 
Duplicate GUID 13528 in m.1530:875255 (size=1967) and m.1371:1846195 (size=1214)
[...]

# 2.2.devel (42f5200): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.devel (623ae77)
# OS: Linux 4.4.0-1-amd64 x86_64 Debian stretch/sid 

Only "suspected operation" was this sequence:

1. $doveadm mailbox rename RSS RSS-old
2. $doveadm mailbox create RSS
3.   -
 copy mails from RSS-old to RSS, and expunge from RSS-old - this
 operation fails and in dovecot logs were a lot of messages about
 duplicated guids
 --
4. $doveadm mailbox delete RSS-old

Initially in RSS mailbox were a lot of deleted and expunged  mails, but
I did not "doveadm purge"

I looks like "doveadm force-resync" helps, but I'm not sure if I lost
some mails?
KJ


-- 
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html
Due to circumstances beyond your control, you are master of your fate
and captain of your soul.


Question about line length limit in lmtp.

2022-12-08 Thread Kamil Jońca


I have postfix + dovecot server.
Mail for local users are saved by dovecot lmtp.
Recently I got some messages from postfix:

--8<---cut here---start->8---
4NQ07L4h4LztXXr: breaking line > 998 bytes with SPAC
--8<---cut here---end--->8---

This is because postfix has configured with default value
lmtp_line_length_limit (990).
I can turn off this limit (set to 0) but I am curious if dovecot lmtp
will accept so lengthty lines?
Does dovecot lmtp has any line limits?

KJ

-- 
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html


Re: Question about line length limit in lmtp.

2022-12-15 Thread Kamil Jońca
Aki Tuomi  writes:

>> On 08/12/2022 11:39 EET Gedalya  wrote:
>> 
>>  
>> On 12/8/22 17:29, Aki Tuomi wrote:
>> > Dovecot LMTP and Submission enforce the RFC line length, which is 1000, 
>> > including \r\n.
>> 
>> Can you elaborate on this?
>> 
>> I often get mail coming in from the wild with long lines and I find the most 
>> practical approach is to pass it on to dovecot LMTP as is, and it just 
>> works, and the message is stored with long lines, not folded.
>> 
>> I haven't tried dovecot's submission yet.
>> 
>> What exactly can you tell me about line length limits in LMTP and submission 
>> and can it be configured?
>
> This is something that is usually handled automatically and does not affect 
> the mails you see in your MUA. The folding is done within the protocol.

Hm. Confused  by some post in thread I make test
I tested with
1. dovecot with lmtp and maildir as storage.
2. postfix configured to pass messages with line folding turned off.

then I issued:

$for ((i=1;i<=1100;i++)); do echo -n "." ; done|mail kjonca

mail was delivered and in maildir file line was stored "as is" - without
any breaking newline.
So I believe dovecot-lmtp does not break the lines. And please do not
change this :)

KJ


-- 
http://wolnelektury.pl/wesprzyj/teraz/


dovecot lmtp and smtputf8

2023-10-23 Thread Kamil Jońca


Does dovecot handle smtputf8?
Last articles regarding this are several years old.
Anything changed?
KJ
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: dovecot lmtp and smtputf8

2023-10-24 Thread Kamil Jońca
"k v"  writes:

> Using the changes described in this pull request 
> https://github.com/dovecot/core/pull/190, you can add SMTPUTF8 capability to 
> the Dovecot LMTP server. Work on the patch is still in progress, and UTF8 
> support is not complete. However, you can use the following trick:
>
> Enable SMTPUTF8 support in Postfix, but make emails with UTF8
> characters as aliases so that the final recipient doesn't have UTF8
> characters. Even in this case, on the LMTP side, you need to announce
> the UTF8 capability, which will be possible if you apply the changes
> from the pull request.

So in short: no, dovecot lmtp does not handle smtputf8.
Thanks for confirmation.
KJ
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: sieve-filter crashes

2015-12-28 Thread Kamil Jońca

I tried to post earlier, but something goes wrong.

KJ

kjo...@o2.pl (Kamil Jońca) writes:

> I want to refilter my mails in inbox so I tried to use:
>
> sieve-filter -e -W -D -C -v ~/.dovecot.sieve INBOX
>
> on three messages I got:
>
> info: filtering: [Fri, 28 Dec 2012 15:40:33 -0500; 14399 bytes] `[SPAM] Keep 
> Defective by Design fight...'.
> sieve-filter(kjonca): Panic: file str.c: line 22 (str_new_const): assertion 
> failed: (str[len] == '\0')
> sieve-filter(kjonca): Error: Raw backtrace: 
> /usr/lib/dovecot/libdovecot.so.0(+0x82462) [0x7f2012002462] -> 
> /usr/lib/dovecot/libdovecot.so.0(+0x824d9) [0x7f20120024d9] -> 
> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f2011fa9a01] -> 
> /usr/lib/dovecot/libdovecot.so.0(+0xa9098) [0x7f2012029098] -> 
> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x5f1dc) [0x7f20128211dc] -> 
> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_match+0xf1) [0x7f2012807721] -> 
> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x5fa85) [0x7f2012821a85] -> 
> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_interpreter_continue+0xe7) 
> [0x7f20127fe657] -> 
> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_interpreter_run+0x2b) 
> [0x7f20127fe7db] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x4faca) 
> [0x7f2012811aca] -> 
> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_execute+0x47) [0x7f2012812637] 
> -> /usr/bin/sieve-filter(main+0x754) [0x7f2012c96d24] -> 
> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f20119f4b45] -> 
> /usr/bin/sieve-filter(+0x43ca) [0x7f2012c973ca]
>
>
> # 2.2.19 (a9c75e48cf8c): /etc/dovecot/dovecot.conf
> # Pigeonhole version 0.4.9
> # OS: Linux 3.16.0-4-amd64 x86_64 Debian stretch/sid 
>
> KJ

-- 
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html
A stitch in time saves nine.


How to debug lmtpd?

2016-01-01 Thread Kamil Jońca

1. I have dovecot installation with lmtp
2. there are some sieve filter which call mailpost to put mails in my
news server.
3. SOME mails are not mailposted :( I do not know why. Moreover these
mails filtered by dovecot-lda ARE mailposted whit the same sieve filter.
4. How can I debug lmtp and it's descendant processes? strace -ff  only?
KJ

-- 
http://wolnelektury.pl/wesprzyj/teraz/
Boys, you have ALL been selected to LEAVE th' PLANET in 15 minutes!!


Re: [Dovecot] compressed mboxes very slow

2011-09-14 Thread Kamil Jońca
Timo Sirainen  writes:

> On 10.5.2011, at 23.32, Kamil Jońca wrote:
>
>> Timo Sirainen  writes:
>> 
>>> Here are some fixes:
>>> 
>>> http://hg.dovecot.org/dovecot-2.0/rev/15a0687ec9d0
>>> http://hg.dovecot.org/dovecot-2.0/rev/66ec075a49d3
>> 
>> Hard to say, but I can't see any significant improvement after applying
>> them :|
>
> Get strace -tt output of such slowness and send them to me.

Some time ago I complained about very slow mbox. In the meantime I have
no time to check it. But recently I have to use them (compressed
mboxes) again. And no progress :(
Under http://strony.aster.pl/kjonca/mbox.log.gz (WARN: ~170MB)
 is file with output of strace -tt when dovecot try to open
rather huge bzipped mbox. And it took about four hours. 

Second open is a lot faster (about minute), but sometimes message
fetching take  about 30-60s 
KJ



-- 
http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewskiej-wprowadzenie/
Zanim wlaczysz komputer, zastanow sie: Czy jestes absolutnie pewien(na), ze nie
jest podlaczany do wyrzutni rakiet?



Re: [Dovecot] compressed mboxes very slow

2012-01-12 Thread Kamil Jońca
kjo...@o2.pl (Kamil Jońca) writes:

> I have some archive mails in gzipped mboxes. I could use them with
> dovecot 1.x without problems.
> But recently I have installed dovecot 2.0.12, and they are slow. very
> slow.


Recently I have to read some compressed mboxes again, and no progress :(
I took 2.0.17 sources and   put some 
i_debug ("#kjonca["__FILE__",%d,%s] %d",  __LINE__,__func__,...some 
parameters ...);

lines into istream-bzlib.c, istream-raw-mbox.c and istream-limit.c 
and found that:

in istream-limit.c in function around lines 40-45:
--8<---cut here---start->8---
 i_stream_seek(stream->parent, lstream->istream.parent_start_offset +
   stream->istream.v_offset);
 stream->pos -= stream->skip;
 stream->skip = 0;
--8<---cut here---end--->8---
seeks stream, (calling i_stream_raw_mbox_seek in file istream-raw-mbox.c )  

and then (line 50 )
--8<---cut here---start->8---
if ((ret = i_stream_read(stream->parent)) == -2)
return -2;
--8<---cut here---end--->8---

tries to read some data earlier in stream, and with compressed mboxes it
cause reread file from the beginning. 

Then I commented out (just for testing) lines 40-45 from istream-limit.c
and bzipped mbox can be opened in reasonable time. (MOreover I can read
some randomly picked mails without problems)


Unfortunately, meanig of fields in istream* structures is very unclear
for me (especially skip,pos and offset) to write proper code by myself.

KJ
 
-- 
http://sporothrix.wordpress.com/2011/01/16/usa-sie-krztusza-kto-nastepny/
Jak ktoś ma pecha, to złamie ząb podczas seksu oralnego (S.Sokół)



[Dovecot] dovecot 2.0.15 - purge errors

2012-01-12 Thread Kamil Jońca

Dovecot 2.0.15, debian package, am I lost some mails? How can I check
what is in *.broken file?

--8<---cut here---start->8---
$doveadm -v purge
doveadm(kjonca): Error: Corrupted dbox file /home/kjonca/Mail/0/storage/m.6469 
(around offset=291530): purging found mismatched offsets (291500 vs 299692, 
60/215)
doveadm(kjonca): Warning: mdbox /home/kjonca/Mail/0/storage: rebuilding indexes
doveadm(kjonca): Error: Corrupted dbox file /home/kjonca/Mail/0/storage/m.6469 
(around offset=599914): metadata header has bad magic value
doveadm(kjonca): Warning: dbox: Copy of the broken file saved to 
/home/kjonca/Mail/0/storage/m.6469.broken
doveadm(kjonca): Warning: Transaction log file 
/home/kjonca/Mail/0/storage/dovecot.map.index.log was locked for 211 seconds
doveadm(kjonca): Error: Purging namespace '' failed: Internal error occurred. 
Refer to server log for more information. [2012-01-13 06:45:07]
--8<---cut here---end--->8---



doveconf -n 
--8<---cut here---start->8---
# 2.0.15: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.38+3-64 x86_64 Debian wheezy/sid 
auth_debug = yes
auth_mechanisms = digest-md5 cram-md5 login plain
auth_verbose = yes
listen = alfa
log_path = /var/log/dovecot
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_debug = yes
mail_location = mdbox:~/Mail/0
mail_log_prefix = "%Us(%u): "
mail_plugins = zlib notify acl
mail_privileged_group = mail
namespace {
  hidden = no
  inbox = yes
  list = yes
  location = 
  prefix = 
  separator = /
  subscriptions = yes
  type = private
}
namespace {
  hidden = no
  inbox = no
  list = yes
  location = 
mbox:~/Mail/Old:CONTROL=~/Mail/.dovecot/control/Old:INDEX=~/Mail/.dovecot/index/Old
  prefix = "#Old/"
  separator = /
  subscriptions = yes
  type = private
}
passdb {
  args = scheme=PLAIN /etc/security/dovecot.pwd
  driver = passwd-file
}
plugin {
  acl = vfile
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
  mail_log_fields = uid box msgid size
  zlib_save = bz2
  zlib_save_level = 9
}
protocols = imap
service auth {
  user = root
}
service imap-login {
  process_limit = 2
  process_min_avail = 1
}
service imap {
  vsz_limit = 512 M
}
service pop3-login {
  process_limit = 2
  process_min_avail = 1
}
service pop3 {
  vsz_limit = 512 M
}
ssl = no
userdb {
  driver = passwd
}
verbose_proctitle = yes
protocol imap {
  mail_max_userip_connections = 20
  mail_plugins = zlib imap_zlib  mail_log notify acl
}
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
  deliver_log_format = msgid=%m: %$
  log_path = ~/log/deliver.log
  postmaster_address = root@localhost
}
--8<---cut here---end--->8---



-- 
Gdyby ktoś miał zbędny Toshiba G450 - to chętnie przejmę ;)

Biologia poucza, ze jeśli cię coś ugryzło, to niemal pewne, ze była to samica.



[Dovecot] Compressed mbox - patch

2012-04-14 Thread Kamil Jońca

Some time ago I complained about very slow access to compressed mboxes.
Unfortunately it looks like that it is very little interest in it, so I
have to investigate some things by myself.

Firstly: some rationale.
Why do I prefer use mbox/maildir over mdbox. Short answer "bus factor"
for support mdbox (not only dovecot)
Longer answer: if something goes wrong withm maildir/mbox i can use
other tools (mutt, or formail or even text editor) and with mdbox ...

I am not ISP, I use dovecot as a "gateway" to my (rather huge) mail
archive. Most of these mails are rather valuable for me, so I prefer use
something "well-known-and-tested".
(I can't do like most ISP's do: write in "Terms of Service" that mail
can be lost or damaged and we give no warranty :) )

So then:

Below my patch. 
It contains 2 changes:
1. when buffer is compressed, we try to save last marked offset. 
2. Increase temporary buffer for decompression.

without these changes 1.5 GB of bzip compressed mbox with ~20K messages 
can't be open in 1.5 day
After applying 1. change it can be open in ~1.5 h 
With both changes it was a few minutes.

Maybe it is a good idea to add config parameter to specify size of
decompress buffer?


Patch is against v2.0.18


diff -x '*.o' -x '*.lo' -x '*.la' -u -r ../dovecot-2.0.18/src/lib/istream.c ./src/lib/istream.c
--- ../dovecot-2.0.18/src/lib/istream.c	2011-12-13 12:38:27.0 +0100
+++ ./src/lib/istream.c	2012-04-14 10:27:23.790724625 +0200
@@ -452,6 +452,22 @@
 	stream->pos -= stream->skip;
 
 	stream->skip = 0;
+
+}
+
+void i_stream_compress1(struct istream_private *stream, size_t bytes )
+{
+
+size_t lskip ;
+
+	lskip = (stream->skip > bytes ? bytes : stream->skip );
+
+	memmove(stream->w_buffer, stream->w_buffer + lskip ,
+		stream->pos - lskip);
+	stream->pos -= lskip;
+	stream->skip -= lskip;
+
+
 }
 
 void i_stream_grow_buffer(struct istream_private *stream, size_t bytes)
diff -x '*.o' -x '*.lo' -x '*.la' -u -r ../dovecot-2.0.18/src/lib/istream-internal.h ./src/lib/istream-internal.h
--- ../dovecot-2.0.18/src/lib/istream-internal.h	2011-12-13 12:38:27.0 +0100
+++ ./src/lib/istream-internal.h	2012-04-13 00:06:27.700298378 +0200
@@ -51,6 +51,7 @@
 i_stream_create(struct istream_private *stream, struct istream *parent, int fd);
 
 void i_stream_compress(struct istream_private *stream);
+void i_stream_compress1(struct istream_private *stream, size_t bytes );
 void i_stream_grow_buffer(struct istream_private *stream, size_t bytes);
 bool i_stream_get_buffer_space(struct istream_private *stream,
 			   size_t wanted_size, size_t *size_r);
 
diff -x '*.o' -x '*.lo' -x '*.la' -u -r ../dovecot-2.0.18/src/plugins/zlib/istream-bzlib.c ./src/plugins/zlib/istream-bzlib.c
--- ../dovecot-2.0.18/src/plugins/zlib/istream-bzlib.c	2012-02-09 18:32:48.0 +0100
+++ ./src/plugins/zlib/istream-bzlib.c	2012-04-14 10:35:04.349800777 +0200
@@ -9,12 +9,14 @@
 #include 
 
 #define CHUNK_SIZE (1024*64)
+#define BUFF_SIZE (1024*1024*16)
 
 struct bzlib_istream {
 	struct istream_private istream;
-
+	
 	bz_stream zs;
 	uoff_t eof_offset, stream_size;
+	uoff_t marked_offset;
 	size_t prev_size, high_pos;
 	struct stat last_parent_statbuf;
 
@@ -48,7 +50,6 @@
 	uoff_t high_offset;
 	size_t size;
 	int ret;
-
 	high_offset = stream->istream.v_offset + (stream->pos - stream->skip);
 	if (zstream->eof_offset == high_offset) {
 		i_assert(zstream->high_pos == 0 ||
@@ -87,7 +88,14 @@
 		if (stream->pos == stream->buffer_size) {
 			if (stream->skip > 0) {
 /* lose our buffer cache */
-i_stream_compress(stream);
+/* try to save our buffer cache as much as possible */
+
+if (zstream->marked && (stream-> skip - (stream->istream.v_offset - zstream->marked_offset)) >0 ){
+	
+	i_stream_compress1(stream, stream-> skip - (stream->istream.v_offset - zstream->marked_offset));
+} else {
+	i_stream_compress(stream);
+}
 			}
 
 			if (stream->pos == stream->buffer_size)
@@ -215,8 +223,12 @@
 	struct bzlib_istream *zstream = (struct bzlib_istream *) stream;
 	uoff_t start_offset = stream->istream.v_offset - stream->skip;
 
+	if (mark) 
+		zstream->marked_offset = v_offset;		
 	if (v_offset < start_offset) {
 		/* have to seek backwards */
+
+	
 		i_stream_bzlib_reset(zstream);
 		start_offset = 0;
 	} else if (zstream->high_pos != 0) {
@@ -243,6 +255,7 @@
 			}
 
 			i_stream_skip(&stream->istream, avail);
+
 		} while (i_stream_read(&stream->istream) >= 0);
 
 		if (stream->istream.v_offset != v_offset) {
@@ -260,8 +273,11 @@
 		}
 	}
 
-	if (mark)
+	if (mark){
 		zstream->marked = TRUE;
+		zstream->marked_offset = v_offset;
+	}
+
 }
 
 static const struct stat *
@@ -329,7 +345,9 @@
 	i_stream_bzlib_init(zstream);
 
 	zstream->istream.iostream.close = i_stream_bzlib_close;
-	zstream->istream.max_buffer_size = input->real_stream->max_buffer_size;
+	//	zstream->istream.max_buffer_size = (input->real_stream->max_buffer_size);
+	zstream->istream.max_buffer_size = BUFF_SIZE;
+
 	zstream->istream.re

[Dovecot] Sieve pipe extension - can it retur something?

2012-04-14 Thread Kamil Jońca


I have a question about sieve pipe: can it return something to further
processing?
For example in procmail I can do:
--8<---cut here---start->8---
:0
VIRUS=`$CLAMSCAN --mbox --disable-summary --stdout -`
--8<---cut here---end--->8---
and then test VIRUS variable.

Maybe I missing something, when read
http://hg.rename-it.nl/pigeonhole-0.2-sieve-pipe/raw-file/tip/doc/rfc/spec-bosch-sieve-pipe.txt

KJ

-- 
http://sporothrix.wordpress.com/2011/01/16/usa-sie-krztusza-kto-nastepny/
Gloffing is a state of mine.



[Dovecot] inetd config - dovecot doesn't exits

2011-03-17 Thread Kamil Jońca

Is there any option for dovecot to exit when is unneded?

I mostly use dovecot via shell process (ie. something like
/usr/sbin/dovecot --exec-mail imap)

But sometimes I want to use it remotely via tcp and I run dovecot via
inetd.


--8<---cut here---start->8---
localhost:imap   stream  tcp nowait  root/usr/sbin/tcpd 
/usr/lib/dovecot/imap-login
--8<---cut here---end--->8---

in inetd.conf works good, but dovecot stays, even if all clients ended
their connections. How can I make dovecot to exit after last client
disconnects?
KJ

-- 
Http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewskiej-wprowadzenie/
Wiesz, tryb tekstowy w Linuksie ma się tak do DOSu
jak F-117A do paralotni. (c) Dawid Kuroczko



[Dovecot] compressed mboxes very slow

2011-05-06 Thread Kamil Jońca

I have some archive mails in gzipped mboxes. I could use them with
dovecot 1.x without problems.
But recently I have installed dovecot 2.0.12, and they are slow. very
slow.

Creating index files takes about 10 minutes for ~20M file with 560
messages for bzipped mbox, for gzipped is little better but still
unusable :(

Stracing dovecot process shows that every ~ 20 messages it rereads
complete mbox file.

Am I doing something wrong?
KJ

-- 
http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewskiej-wprowadzenie/



Re: [Dovecot] compressed mboxes very slow

2011-05-08 Thread Kamil Jońca
Stan Hoeppner  writes:

> On 5/6/2011 3:07 PM, Kamil Jońca wrote:
>>
>> I have some archive mails in gzipped mboxes. I could use them with
>> dovecot 1.x without problems.
>> But recently I have installed dovecot 2.0.12, and they are slow. very
>> slow.
>>
>> Creating index files takes about 10 minutes for ~20M file with 560
>> messages for bzipped mbox, for gzipped is little better but still
>> unusable :(
>
> What other software, if any, was also upgraded/changed when you
> upgraded to Dovecot 2.0.12?  Libraries?  Filesystem?  Daemons?  What

IIRC only dovecot - I simply upgrade debian package via aptitude.

> they have been mildly corrupted along the way?  Did this bad behavior
> start directly after the upgrade or did 2.0.12 run the zipped mbox
Yes, immediately after upgrade.

> files at acceptable speed for a while?  Did you add/enable any new
> Dovecot plugins that you weren't running in 1.2.x?
>
No, the only thing was converting old config to dovecot-2 config.

>> Stracing dovecot process shows that every ~ 20 messages it rereads
>> complete mbox file.
>
> Can you be a bit more specific here?  What do you mean by "rereads
> complete mbox file"?  I'm not a dev, but that sounds suspiciously like

Sorry, my fault, more correctly is to say: "regularly".

> an error handling mechanism.  I.e. an error occurred while processing,
> or the file may have changed while processing, so we start over.

I'm almost sure that file is not changed.


> Could you have a buggy inotify/dnotify or something along those lines?
How to check it?

> Do you now have something else running say, at the filesystem level,
> that that is making Dovecot think the file has changed even though it
> hasn't?  Are you zipping these mbox files via a cron job that is
> running every few seconds instead of every few hours or days?
No.  These files were compressed once by mutt, and then only read as
archive via dovecot.

>
> Something is apparently causing Dovecot to reread these files
> regularly, and I'd guess it's probably not a Dovecot bug.  Did you run
> strace when accessing a non-compressed mbox file for comparison?

http://strony.aster.pl/kjonca/dovecot.log.gz <- uncompressed mbox
http://strony.aster.pl/kjonca/dovecot.gz.log.gz <- gzipped mbox

KJ


-- 
http://blogdebart.pl/2009/12/22/mamy-chorych-dzieci/
KRETYNIZM - ułomność predysponująca często do wampiryzmu
(J.Collin de Plancy "Słownik wiedzy tajemnej")



Re: [Dovecot] compressed mboxes very slow

2011-05-09 Thread Kamil Jońca
Stan Hoeppner  writes:

> On 5/8/2011 5:21 AM, Kamil Jońca wrote:
>> Stan Hoeppner  writes:
>>
>>> On 5/6/2011 3:07 PM, Kamil Jońca wrote:
>>>>
>>>> I have some archive mails in gzipped mboxes. I could use them with
>>>> dovecot 1.x without problems.
>>>> But recently I have installed dovecot 2.0.12, and they are slow. very
>>>> slow.
>>>>
>>>> Creating index files takes about 10 minutes for ~20M file with 560
>>>> messages for bzipped mbox, for gzipped is little better but still
>>>> unusable :(
>>>
>>> What other software, if any, was also upgraded/changed when you
>>> upgraded to Dovecot 2.0.12?  Libraries?  Filesystem?  Daemons?  What
>>
>> IIRC only dovecot - I simply upgrade debian package via aptitude.
>
> The latest Debian stable dovecot package is 1.2.15-4.  If 'aptitude
> upgrade' pulled 2.0.12 then you are running either testing or

Yes, its testing (sid) dist.

[...]

>
> If you're running testing/unstable you should already know how to
> check this.  Inotify is a kernel API.  For Debian Dovecot to use

I know what is inotify, but I haven't to test it so far. :|

> inotify it must be compiled with the build option 'notify=inotify'.
> You'll need to see the package maintainer's  build script.  You'll
> also need to look at the kernel .config used to build your kernel as
> inotify must be built into your kernel.
>

1. I have uninstalled debian's package 
2. got http://www.dovecot.org/nightly/dovecot-20110506.tar.gz,
3. configure with --notify=inotify, and it looks that inotify exists and
is used[1], make make install 
4. then run with 
--8<---cut here---start->8---
#strace -o ~/tmp/dovecot/log -ff dovecot -c /etc/dovecot/dovecot.conf 
--8<---cut here---end--->8---

5. connect with mutt and select one of gzipped folders
6. connect with fetchmail and select another gzipped folder (with the
same contents as in 5)

grepping strace logs shows that in both cases mboxes are reread
regularly :( moreover there's no inotify_init (...) call by any dovecot
process.

Any ideas?

[1] moreover inotifywatch  works as expected.

KJ

-- 
http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewskiej-wprowadzenie/
"Sęk w tym, że człowiek rozumny jest statystycznie głupi" - Stanisław Lem.



Re: [Dovecot] compressed mboxes very slow

2011-05-09 Thread Kamil Jońca
Stan Hoeppner  writes:

> On 5/9/2011 6:20 PM, Kamil Jońca wrote:
>
>> 5. connect with mutt and select one of gzipped folders
>> 6. connect with fetchmail and select another gzipped folder (with the
>> same contents as in 5)
>
> Does the problem occur with only one client, or are two or more
> clients required to reproduce the problem?  If the former, you're
> simply unnecessarily confusing things by mentioning two clients in the
> problem reproduction case here.

>From one of your mail:
--8<---cut here---start->8---
Have you tested any other IMAP client such as Thunderbird to eliminate
mutt as the cause of the problem?
--8<---cut here---end--->8---
So now I can say, this problem is not only with mutt



> If you go back to 1.2.15 and strace Dovecot, do you see the same
> re-reading of the mbox files after each 20 or so messages?  This
> behavior may be normal.  I'm not familiar with the code or I'd have

I will try.
KJ


-- 
http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewskiej-wprowadzenie/
Zuzanka najwyraźniej pełni obowiązki Albina Siwaka w tej ekipie...
(C) Slawek Kotynski w dyskusj nt. pl.whatewer.SETI@home...



Re: [Dovecot] compressed mboxes very slow

2011-05-10 Thread Kamil Jońca
Timo Sirainen  writes:

> Here are some fixes:
>
> http://hg.dovecot.org/dovecot-2.0/rev/15a0687ec9d0
> http://hg.dovecot.org/dovecot-2.0/rev/66ec075a49d3

Hard to say, but I can't see any significant improvement after applying
them :|

KJ


-- 
http://blogdebart.pl/2010/03/17/dalsze-przygody-swinki-w-new-jersey/



Re: [Dovecot] integrating procmail

2011-05-18 Thread Kamil Jońca
Jerry  writes:

>> Below, I've provide the relevant snippets of my current functional
>> configuration; how best to integrate procmail into the mix?
>
> Why procmail? Use sieve instead. It is fully supported in Dovecot and
> IMHO far easier to use.

Well, how can I call external program from sieve? (For example for
decoding some data, and put them to database?) Is any extension for
this?
KJ

-- 
http://sporothrix.wordpress.com/2011/01/16/usa-sie-krztusza-kto-nastepny/
GNU is Not Unix



[Dovecot] Crash test :)

2011-05-20 Thread Kamil Jońca


I'm considering to move my mails from maildir/mbox to mdbox. One of my
doubts is: how can I restore my mails when something terrribly wrong
happens. 

I understand that I should use doveadm import "backup_location"
"mailbox" all.

So I try to import with:
 
doveadm -v import "sdbox:~/Mail/dbox-temp/spamcop/reports/" 
"#Dbox/spamcop/reports" all

#Dbox namespace were defined as:

--8<---cut here---start->8---
namespace {
  hidden = no
  inbox = no
  list = yes
  location = mdbox:~/Mail/Dbox
  prefix = "#Dbox/"
  separator = /
  subscriptions = yes
  type = private
}
--8<---cut here---end--->8---

dbox-temp were defined earlier as 
--8<---cut here---start->8---
namespace {
  hidden = no
  inbox = no
  list = yes
  location = sdbox:~/Mail/dbox-temp
  separator = /
  subscriptions = yes
  type = private
}
--8<---cut here---end--->8---

1. when I specified for example sdbox:~/Mail/dbox-temp/spamcop/reports/ doveadm
search mails under ~/Mail/dbox-temp/spamcop/reports/mailboxes/INBOX/dbox-Mails/
- am I missing something from documentation?  
(I expected rather ~/Mail/dbox-temp/mailboxes/spamcop/reports/dbox-Mails)


2. when I move dbox-Mails to proper place I got:

doveadm(kjonca): Error: sdbox 
/home/kjonca/Mail/dbox-temp/spamcop/reports/mailboxes/INBOX/dbox-Mails: Invalid 
dbox header size
doveadm(kjonca): Error: sdbox 
/home/kjonca/Mail/dbox-temp/spamcop/reports/mailboxes/INBOX/dbox-Mails: Invalid 
dbox header size

And nothing were imported.

Notices:

a) there were only u.* files, no indexes.
b) u.* files were created on i386 system, and import test on amd64.


KJ


-- 
http://blogdebart.pl/2010/03/17/dalsze-przygody-swinki-w-new-jersey/



Re: [Dovecot] Crash test :)

2011-05-20 Thread Kamil Jońca
Timo Sirainen  writes:

> On 20.5.2011, at 22.35, Kamil Jońca wrote:
>
>> So I try to import with:
>> 
>> doveadm -v import "sdbox:~/Mail/dbox-temp/spamcop/reports/" 
>> "#Dbox/spamcop/reports" all
>
> You probably want something more like:
>
> doveadm import sdbox:~/Mail/dbox-temp "#Dbox" mailbox spamcop/reports

Thanks.

>
>> 2. when I move dbox-Mails to proper place I got:
>> 
>> doveadm(kjonca): Error: sdbox 
>> /home/kjonca/Mail/dbox-temp/spamcop/reports/mailboxes/INBOX/dbox-Mails: 
>> Invalid dbox header size
>
> What Dovecot version? I think this is fixed already.

Um. :(  Files were created about 2 months ago. It was certainly 1.x, but
now it is hard to say, what exactly version it was.

KJ


-- 
http://sporothrix.wordpress.com/2011/01/16/usa-sie-krztusza-kto-nastepny/
Zuzanka najwyraźniej pełni obowiązki Albina Siwaka w tej ekipie...
(C) Slawek Kotynski w dyskusj nt. pl.whatewer.SETI@home...



Re: [Dovecot] Crash test :)

2011-05-20 Thread Kamil Jońca
kjo...@o2.pl (Kamil Jońca) writes:

[...]

>>> 2. when I move dbox-Mails to proper place I got:
>>> 
>>> doveadm(kjonca): Error: sdbox 
>>> /home/kjonca/Mail/dbox-temp/spamcop/reports/mailboxes/INBOX/dbox-Mails: 
>>> Invalid dbox header size
>>
>> What Dovecot version? I think this is fixed already.
>
> Um. :(  Files were created about 2 months ago. It was certainly 1.x, but
> now it is hard to say, what exactly version it was.


But question is open: Can I (and how) restore mails from so old backup?

KJ


-- 
http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewskiej-wprowadzenie/
Suma inteligencji na planecie jest stala, liczba ludzi powieksza sie.



Re: [Dovecot] Crash test :)

2011-05-21 Thread Kamil Jońca
Timo Sirainen  writes:

> On 21.5.2011, at 1.21, Kamil Jońca wrote:
>
>>>>> 2. when I move dbox-Mails to proper place I got:
>>>>> 
>>>>> doveadm(kjonca): Error: sdbox 
>>>>> /home/kjonca/Mail/dbox-temp/spamcop/reports/mailboxes/INBOX/dbox-Mails: 
>>>>> Invalid dbox header size
>>>> 
>>>> What Dovecot version? I think this is fixed already.
>>> 
>>> Um. :(  Files were created about 2 months ago. It was certainly 1.x, but
>>> now it is hard to say, what exactly version it was.
>> 
>> But question is open: Can I (and how) restore mails from so old backup?
>
> Dovecot v2.0 should be able to read v1.x's dbox files. If it can, it can 
> restore the backups. The only difference I can think of is that in some 
> version I changed the default to have dbox save everything under "mailboxes/" 
> directory. If your backups don't use that directory, you can use something 
> like:
>
> doveadm import sdbox:~/Mail/dbox-temp:MAILBOXDIR= "#Dbox" mailbox 
> spamcop/reports


Unfortunately neither debian 2.0.12 nor 2.0.13 version can import
these. Strange thing is that message "Invalid dbox header size" is
printed after  creating "dovecot-uidvalidity" and dovecot-index* files
for source dbox, u.* files are  not read at all.

KJ


-- 
http://blogdebart.pl/2010/03/17/dalsze-przygody-swinki-w-new-jersey/
"Nie można wlecieć w trzecie tysiaclecie
  na drzwiach od stodoły" - biskup polowy WP Sławoj Leszek Głódź.



[Dovecot] [sieve] - counting headers

2012-10-12 Thread Kamil Jońca

In some of my maildrop filters I have rules with weighted scoring[1],
but only to count headers (for example to count "Received:" header) 
ie. all these rules are of form "/pattern/:h,1" 

Can dovecot sieve do this?

KJ
[1] http://www.courier-mta.org/maildrop/maildropfilter.html
-- 
http://blogdebart.pl/2012/06/24/hiena/
Wiesz, tryb tekstowy w Linuksie ma się tak do DOSu
jak F-117A do paralotni. (c) Dawid Kuroczko



[Dovecot] [vnd.dovecot.pipe] - timeout settings

2012-12-10 Thread Kamil Jońca

In install file we can read that:
sieve__exec_timeout = 10s
set timeout for executing program.


But regardless of setting this value (say sieve_pipe_exec_timeout=86000)
I got:

--8<---cut here---start->8---
2012-12-10 20:55:33 LDA(kjonca): Debug: sieve: action pipe: running program: 
maildrop.sh
2012-12-10 20:55:43 LDA(kjonca): Debug: program 
`/home/kjonca/sieve/bin/maildrop.sh' execution timed out: sending TERM signal
--8<---cut here---end--->8---

What am I doing wrong?
KJ
-- 
http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewskiej-wprowadzenie/
When does summertime come to Minnesota, you ask?  Well, last year, I
think it was a Tuesday.



[Dovecot] doveadm-lda - segfault

2012-12-11 Thread Kamil Jońca

I have simple old message: 
--8<---cut here---start->8---
X-Mozilla-Status: 0011
X-Mozilla-Status2: 
Date: Wed, 26 Jan 2000 13:38:41 +0100
From: Kamil Jonca 
To: Somebody X  
Subject: Re: Opisy 
Message-ID: <2126133839.B2888@localhost.localdomain>
References: 
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 8bit
X-Mailer: Mutt 0.95.5us
In-Reply-To: ; from 
Somebody X on Wed, Jan 26, 2000 at 01:37:52PM +
X-Operating-System: 'Linux localhost.localdomain 2.2.9-27mdk #1 Mon Jan 24 
15:49:34 CET 2000 i686 unknown'
X-Geek: GIT d s+:- a-- C++ UL P+ L++ E W N+ w- PS+ PE++ PGP t-- X-- R- tv- b+ 
D+ G e h-- r- z?
Lines: 30
X-KJONCA-Clamav-Status: No

jd;fladflsd;lc
dfgn;sdhgfad
abffhahgl
fadn;al
sdfnad;hfa
fna;lhfla
-- 
shfkah
--8<---cut here---end--->8---
 When I try to 

dovecot-lda < message.txt

(for sieve refiltering) I got segmentation fault.
Does it is bug in lda, or message does not keep standards?
KJ

-- 
http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewskiej-wprowadzenie/
Sanity and insanity overlap a fine grey line.



Re: [Dovecot] doveadm-lda - segfault

2012-12-11 Thread Kamil Jońca
Pascal Volk  writes:

> On 12/11/2012 11:18 AM Kamil Jońca wrote:
>>  When I try to 
>> 
>> dovecot-lda < message.txt
>> 
>> (for sieve refiltering) I got segmentation fault.
>> Does it is bug in lda, or message does not keep standards?
>> KJ
>
> I've saved your example message and delivered it twice (Dovecot 2.1.11
> and 2.0.21). I'm unable to reproduce the crash.
>
> Please read http://dovecot.org/bugreport.html and provide the necessary
> details.

dovecot -n
--8<---cut here---start->8---
# 2.1.12 (f13f2725882e): /etc/dovecot/dovecot.conf
# OS: Linux 3.6.7+1 x86_64 Debian wheezy/sid 
auth_debug = yes
auth_mechanisms = plain digest-md5 cram-md5 login
auth_username_format = %n
auth_verbose = yes
log_path = /var/log/dovecot
namespace {
  hidden = no
  inbox = yes
  list = yes
  location = maildir:~/Mail/0:LAYOUT=fs:INBOX=~/Mail/0/INBOX
  prefix = 
  separator = /
  subscriptions = yes
  type = private
}
passdb {
  args = scheme=PLAIN /etc/security/dovecot.pwd
  driver = passwd-file
}
plugin {
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename 
flag_change save
  mail_log_fields = uid box msgid size from flags
  sieve = ~/.dovecot.sieve
  sieve_execute_bin_dir = %h/sieve/bin
  sieve_execute_exec_timeout = 86400s
  sieve_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute +vnd.dovecot.filter
  sieve_filter_bin_dir = %h/sieve/bin
  sieve_filter_exec_timeout = 86400s
  sieve_pipe_bin_dir = %h/sieve/bin
  sieve_pipe_exec_timeout = 86400s
  sieve_plugins = sieve_extprograms
}
protocols = " imap lmtp"
service auth {
  user = root
}
ssl_cert = 8---

Dovecot taken from deb http://xi.rename-it.nl/debian/ testing-auto/dovecot-2.1 
main
+ manually compiled sieve exptrograms plugin.

Maybe its worth noticing that 
adding line 

--8<---cut here---start->8---
Return-path: 
--8<---cut here---end--->8---
to example message makes dovecot-lda working.

-- 
http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewskiej-wprowadzenie/
You can no more win a war than you can win an earthquake.
-- Jeannette Rankin



Re: [Dovecot] doveadm-lda - segfault

2012-12-11 Thread Kamil Jońca
Ben Morrow  writes:

> At 10PM +0100 on 11/12/12 Kamil Jońca wrote:
>>
>> Dovecot taken from deb http://xi.rename-it.nl/debian/ 
>> testing-auto/dovecot-2.1 main
>> + manually compiled sieve exptrograms plugin.
>> 
>> Maybe its worth noticing that 
>> adding line 
>> 
>> --8<---cut here---start->8---
>> Return-path: 
>> --8<---cut here---end--->8---
>> to example message makes dovecot-lda working.
>
> Which revision of the extprograms plugin are you using? As of changeset
> 47 the Return-Path manipulation has been removed, so if there was a bug
> in that code rebuilding with the latest version may make it go away.

I think that is most recent which can I get with 
--8<---cut here---start->8---
hg clone http://hg.rename-it.nl/pigeonhole-0.3-sieve-extprograms/
--8<---cut here---end--->8---

If I understand hg commands "hg branches -v"   gives me: 
--8<---cut here---start->8---
default   47:3bd6ed27ae26
--8<---cut here---end--->8---
>
> Otherwise, can you get a backtrace? It would be more use if you can
> rebuild with debug symbols, but even without it should give some useful
> information.

I don't know if I did it properly  (how to compile it with debug
symbols?)


--8<---cut here---start->8---
gdb -c ~/core /usr/lib/dovecot/dovecot-lda
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/lib/dovecot/dovecot-lda...(no debugging symbols 
found)...done.
[New LWP 25303]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/dovecot//dovecot-lda'.
Program terminated with signal 11, Segmentation fault.
#0  0x7f99d591fe6f in mail_storage_copy () from 
/usr/lib/dovecot/libdovecot-storage.so.0
(gdb) bt full
#0  0x7f99d591fe6f in mail_storage_copy () from 
/usr/lib/dovecot/libdovecot-storage.so.0
No symbol table info available.
#1  0x7f99d58f1561 in maildir_copy () from 
/usr/lib/dovecot/libdovecot-storage.so.0
No symbol table info available.
#2  0x7f99d592723b in mailbox_copy () from 
/usr/lib/dovecot/libdovecot-storage.so.0
No symbol table info available.
#3  0x7f99d377c0c1 in ?? () from /usr/lib/dovecot/libdovecot-sieve.so.0
No symbol table info available.
#4  0x7f99d37724bb in ?? () from /usr/lib/dovecot/libdovecot-sieve.so.0
No symbol table info available.
#5  0x7f99d377385f in sieve_result_execute () from 
/usr/lib/dovecot/libdovecot-sieve.so.0
No symbol table info available.
#6  0x7f99d3782f65 in sieve_execute () from 
/usr/lib/dovecot/libdovecot-sieve.so.0
No symbol table info available.
#7  0x7f99d39c4112 in ?? () from 
/usr/lib/dovecot/modules/lib90_sieve_plugin.so
No symbol table info available.
#8  0x7f99d5bb98d5 in mail_deliver () from 
/usr/lib/dovecot/libdovecot-lda.so.0
No symbol table info available.
#9  0x0040295a in main ()
No symbol table info available.
--8<---cut here---end--->8---

-- 
http://blogdebart.pl/2009/12/22/mamy-chorych-dzieci/
They have been at a great feast of languages, and stolen the scraps.
-- William Shakespeare, "Love's Labour's Lost"



Re: [Dovecot] doveadm-lda - segfault

2012-12-11 Thread Kamil Jońca
kjo...@o2.pl (Kamil Jońca) writes:


> I don't know if I did it properly  (how to compile it with debug
> symbols?)

After sending previous post I realized that debug symbols should be in
dovecot-dbg package.
Below backtrace:

gdb -c ~/core /usr/lib/dovecot/dovecot-lda
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/lib/dovecot/dovecot-lda...Reading symbols from 
/usr/lib/debug/usr/lib/dovecot/dovecot-lda...done.
done.
[New LWP 25303]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/dovecot//dovecot-lda'.
Program terminated with signal 11, Segmentation fault.
#0  0x7f99d591fe6f in mail_storage_try_copy (mail=0x198dbb0, 
_ctx=0x7fff8914fc28) at mail-copy.c:56
56  mail-copy.c: No such file or directory.
(gdb) bt full
#0  0x7f99d591fe6f in mail_storage_try_copy (mail=0x198dbb0, 
_ctx=0x7fff8914fc28) at mail-copy.c:56
ctx = 0x19a6610
pmail = 0x198dbb0
from_envelope = 0x0
input = 
guid = 
received_date = -1
#1  mail_storage_copy (ctx=ctx@entry=0x19a6610, mail=mail@entry=0x198dbb0) at 
mail-copy.c:93
No locals.
#2  0x7f99d58f1561 in maildir_copy (ctx=0x19a6610, mail=0x198dbb0) at 
maildir-copy.c:148
_t = 
mbox = 
__FUNCTION__ = "maildir_copy"
#3  0x7f99d592723b in mailbox_copy (_ctx=_ctx@entry=0x7fff8914fd30, 
mail=mail@entry=0x198dbb0) at mail-storage.c:1721
ctx = 0x19a6610
box = 0x19942c0
keywords = 0x0
ret = 
#4  0x7f99d377c0c1 in act_store_execute (action=, 
aenv=0x1980960, tr_context=0x1980a88) at sieve-actions.c:551
trans = 0x1980a88
mail = 0x198dbb0
real_mail = 
save_ctx = 0x0
keywords = 0x0
result = true
#5  0x7f99d37724bb in _sieve_result_implicit_keep 
(result=result@entry=0x1980930, rollback=) at sieve-result.c:996
rac = 
success = true
rsef = 
rsef_first = 0x0
tr_context = 0x1980a88
act_keep = {def = 0x7f99d39b9500, ext = 0x0, location = 0x0, context = 
0x0, mail = 0x198dbb0, executed = false}
#6  0x7f99d377385f in sieve_result_execute (result=0x1980930, 
keep=keep@entry=0x0) at sieve-result.c:1230
implicit_keep = true
success = true
commit_ok = true
rac = 0x0
first_action = 0x1
#7  0x7f99d3782f65 in sieve_execute (sbin=, 
msgdata=, senv=, 
ehandler=ehandler@entry=0x1975140, 
flags=flags@entry=SIEVE_RUNTIME_FLAG_NOGLOBAL, 
keep=keep@entry=0x0) at sieve.c:508
result = 0x1980930
ret = 1
#8  0x7f99d39c4112 in lda_sieve_singlescript_execute (srctx=0x7fff8914ffa0) 
at lda-sieve-plugin.c:436
sbin = 0x19782a0
rtflags = SIEVE_RUNTIME_FLAG_NOGLOBAL
debug = false
svinst = 0x1971440
script = 0x1974d30
user_script = 
cpflags = SIEVE_COMPILE_FLAG_NOGLOBAL
ret = 
ehandler = 0x1975140
error = 
#9  lda_sieve_deliver_mail (mdctx=0x7fff891501b0, storage_r=0x7fff89150140) at 
lda-sieve-plugin.c:812
count = 
i = 
_data_stack_cur_id = 2
srctx = {svinst = 0x1971440, mdctx = 0x7fff891501b0, scripts = 
0x1944ff0, script_count = 1, user_script = 0x1974d30, main_script = 0x1974d30, 
msgdata = 0x7fff8914ff70, scriptenv = 0x7fff8915, 
  user_ehandler = 0x1975140, master_ehandler = 0x1974c20, userlog = 
0x1945070 "/home/kjonca/.dovecot.sieve.log"}
svenv = {hostname = 0x194f2e0 "alfa.kjonca", base_dir = 0x195be78 
"/var/run/dovecot", username = 0x195b440 "kjonca", home_dir = 0x195c4a8 
"/home/kjonca", flags = SIEVE_FLAG_HOME_RELATIVE}
svinst = 0x1971440
msgdata = {mail = 0x196b010, return_path = 0x0, orig_envelope_to = 
0x1944c90 "kjonca@alfa.kjonca", final_envelope_to = 0x1944c90 
"kjonca@alfa.kjonca", auth_user = 0x195b440 "kjonca", 
  id = 0x196d660 "<2126133839.B2888@localhost.localdomain>"}
scriptenv = {action_log_format = 0x194f358 "msgid=%m: %$", user = 
0x195b380, default_mailbox = 0x403583 "INBOX", postmaster_address = 0x194f2d0 
"root@localhost", mailbox_autocreate = false, 
  mailbox_autosubscribe = false, script_context = 0x7fff891501b0, 
smt

Re: [Dovecot] Possible bug not sure on which end

2012-12-17 Thread Kamil Jońca
"joshua.tr...@hostrocket.com"  writes:

> Hello
>
>Serveral of our clients are running into a problem relating to
> Gmails change in their "Check mail from other accounts (using
> POP3):". It seems related to the response dovecot sends back on a
> connection.

Here you said, that you check mail with pop3
>
> Gmail is checking for a +OK in the header, however dovecot is sending
> OK without a prefix of +.
>
> Here is the response from Gmail webmail
>   "Missing +OK response upon connecting to the server: * OK
> [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE
> AUTH=PLAIN] Dovecot ready."
>
> Here is dovecot header on a pop3-ssl connection
> * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID
> ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
And here is imap response. Are you sure you connect to pop3?
KJ


-- 
http://blogdebart.pl/2012/06/24/hiena/
This universe shipped by weight, not by volume.  Some expansion of the
contents may have occurred during shipment.



Re: [Dovecot] doveadm-lda - segfault

2012-12-20 Thread Kamil Jońca
Timo Sirainen  writes:

> On Tue, 2012-12-11 at 23:15 +0100, Kamil Jońca wrote:
>> #0  0x7f99d591fe6f in mail_storage_try_copy (mail=0x198dbb0, 
>> _ctx=0x7fff8914fc28) at mail-copy.c:56
>> 56   mail-copy.c: No such file or directory.
>
> raw-storage's envelope_sender is NULL. Fixed Dovecot to make sure NULL
> isn't returned: http://hg.dovecot.org/dovecot-2.1/rev/579984fdb6e5
>
> But I think Pigeonhole also shouldn't set it to NULL.
> sieve-message.c:sieve_message_get_sender() apparently returns NULL if it
> can't find anything. Elsewhere this is used when nothing else is there:
>
> #define DEFAULT_ENVELOPE_SENDER "MAILER-DAEMON"
>
>
>
LDA from dovecot 2:2.1.12-0~auto+10 does not segfaults. Thanks.

KJ

-- 
http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewskiej-wprowadzenie/
"Remember, extremism in the nondefense of moderation is not a virtue."
-- Peter Neumann, about usenet



[Dovecot] lda crash?

2012-12-29 Thread Kamil Jońca
When I try to refilter some messages lda crash:
Dec 29 16:07:34 LDA(kjonca): Info: sieve: 
msgid=<003a01bf6d8f$c9d69f20$9c2dc...@tiger.com.pl>: stored mail into mailbox 
'scott/Sent'
Dec 29 16:08:02 lda: Debug: Loading modules from directory: 
/usr/lib/dovecot/modules
Dec 29 16:08:02 lda: Debug: Module loaded: 
/usr/lib/dovecot/modules/lib90_sieve_plugin.so
Dec 29 16:08:02 LDA(kjonca): Debug: Effective uid=1000, gid=1000, 
home=/home/kjonca
Dec 29 16:08:02 LDA(kjonca): Debug: Namespace : type=private, prefix=, sep=/, 
inbox=yes, hidden=no, list=yes, subscriptions=yes 
location=maildir:~/Mail/0:LAYOUT=fs:INBOX=~/Mail/0/INBOX
Dec 29 16:08:02 LDA(kjonca): Debug: fs: root=/home/kjonca/Mail/0, index=, 
control=, inbox=/home/kjonca/Mail/0/INBOX, alt=
Dec 29 16:08:02 LDA(kjonca): Debug: userdb lookup skipped, username taken from 
USER environment
Dec 29 16:08:02 LDA(kjonca): Debug: none: root=, index=, control=, inbox=, alt=
Dec 29 16:08:02 LDA(kjonca): Debug: Destination address: kjonca@alfa.kjonca 
(source: user@hostname)
Dec 29 16:08:02 LDA(kjonca): Debug: sieve: include: sieve_global_dir is not 
set; it is currently not possible to include `:global' scripts.
Dec 29 16:08:02 LDA(kjonca): Debug: sieve: Pigeonhole Sieve Extprograms plugin 
version 0.1.0 loaded
Dec 29 16:08:02 LDA(kjonca): Debug: sieve: using the following location for 
user's Sieve script: /home/kjonca/.dovecot.sieve
Dec 29 16:08:02 LDA(kjonca): Debug: sieve: opening script 
/home/kjonca/.dovecot.sieve
Dec 29 16:08:02 LDA(kjonca): Debug: sieve: script binary 
/home/kjonca/.dovecot.svbin successfully loaded
Dec 29 16:08:02 LDA(kjonca): Debug: sieve: binary save: not saving binary 
/home/kjonca/.dovecot.svbin, because it is already stored
Dec 29 16:08:02 LDA(kjonca): Debug: sieve: executing script from 
/home/kjonca/.dovecot.svbin
Dec 29 16:08:02 LDA(kjonca): Info: sieve: 
msgid=<001b01bf7227$18649840$9c2dc...@tiger.com.pl>: stored mail into mailbox 
'scott/Sent'
doveconf -n output


dovecot.confn
Description: Binary data
KJ

-- 
http://sporothrix.wordpress.com/2011/01/16/usa-sie-krztusza-kto-nastepny/
Little known fact about Middle Earth: The Hobbits had a very sophisticated
computer network!  It was a Tolkien Ring...


Re: [Dovecot] lda crash?

2012-12-29 Thread Kamil Jońca
kjo...@o2.pl (Kamil Jońca) writes:

> When I try to refilter some messages lda crash:
> KJ
Sorry for wrong attachment in previoous post.
Dec 29 16:28:15 lda: Debug: Loading modules from directory: 
/usr/lib/dovecot/modules
Dec 29 16:28:15 lda: Debug: Module loaded: 
/usr/lib/dovecot/modules/lib90_sieve_plugin.so
Dec 29 16:28:15 LDA(kjonca): Debug: Effective uid=1000, gid=1000, 
home=/home/kjonca
Dec 29 16:28:15 LDA(kjonca): Debug: Namespace : type=private, prefix=, sep=/, 
inbox=yes, hidden=no, list=yes, subscriptions=yes 
location=maildir:~/Mail/0:LAYOUT=fs:INBOX=~/Mail/0/INBOX
Dec 29 16:28:15 LDA(kjonca): Debug: fs: root=/home/kjonca/Mail/0, index=, 
control=, inbox=/home/kjonca/Mail/0/INBOX, alt=
Dec 29 16:28:15 LDA(kjonca): Debug: userdb lookup skipped, username taken from 
USER environment
Dec 29 16:28:15 LDA(kjonca): Debug: none: root=, index=, control=, inbox=, alt=
Dec 29 16:28:15 LDA(kjonca): Debug: Destination address: kjonca@alfa.kjonca 
(source: user@hostname)
Dec 29 16:28:15 LDA(kjonca): Debug: sieve: include: sieve_global_dir is not 
set; it is currently not possible to include `:global' scripts.
Dec 29 16:28:15 LDA(kjonca): Debug: sieve: Pigeonhole Sieve Extprograms plugin 
version 0.1.0 loaded
Dec 29 16:28:15 LDA(kjonca): Debug: sieve: using the following location for 
user's Sieve script: /home/kjonca/.dovecot.sieve
Dec 29 16:28:15 LDA(kjonca): Debug: sieve: opening script 
/home/kjonca/.dovecot.sieve
Dec 29 16:28:15 LDA(kjonca): Debug: sieve: script binary 
/home/kjonca/.dovecot.svbin successfully loaded
Dec 29 16:28:15 LDA(kjonca): Debug: sieve: binary save: not saving binary 
/home/kjonca/.dovecot.svbin, because it is already stored
Dec 29 16:28:15 LDA(kjonca): Debug: sieve: executing script from 
/home/kjonca/.dovecot.svbin
Dec 29 16:28:15 LDA(kjonca): Panic: pool_data_stack_realloc(): stack frame 
changed
Dec 29 16:28:15 LDA(kjonca): Error: Raw backtrace: 
/usr/lib/dovecot/libdovecot.so.0(+0x47f1a) [0x7fcf2ccc9f1a] -> 
/usr/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x2a) [0x7fcf2ccc9fda] 
-> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7fcf2cc9e1b3] -> 
/usr/lib/dovecot/libdovecot.so.0(+0x58cae) [0x7fcf2ccdacae] -> 
/usr/lib/dovecot/libdovecot.so.0(+0x44435) [0x7fcf2ccc6435] -> 
/usr/lib/dovecot/libdovecot.so.0(buffer_write+0x7f) [0x7fcf2ccc679f] -> 
/usr/lib/dovecot/libdovecot.so.0(+0x63504) [0x7fcf2cce5504] -> 
/usr/lib/dovecot/libdovecot.so.0(str_c+0x9) [0x7fcf2cce5569] -> 
/usr/lib/dovecot/libdovecot-sieve.so.0(+0x4a6af) [0x7fcf2adf36af] -> 
/usr/lib/dovecot/libdovecot-sieve.so.0(sieve_match_value+0x86) [0x7fcf2ade5c86] 
-> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_match+0xb2) [0x7fcf2ade5f52] -> 
/usr/lib/dovecot/libdovecot-sieve.so.0(+0x43057) [0x7fcf2adec057] -> 
/usr/lib/dovecot/libdovecot-sieve.so.0(sieve_interpreter_continue+0xc5) 
[0x7fcf2addda35] -> 
/usr/lib/dovecot/libdovecot-sieve.so.0(sieve_interpreter_run+0x2b) 
[0x7fcf2adddbbb] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x46642) 
[0x7fcf2adef642] -> /usr/lib/dovecot/libdovecot-sieve.so.0(sieve_execute+0x31) 
[0x7fcf2adeff91] -> /usr/lib/dovecot/modules/lib90_sieve_plugin.so(+0x3112) 
[0x7fcf2b031112] -> /usr/lib/dovecot/libdovecot-lda.so.0(mail_deliver+0x45) 
[0x7fcf2d2278d5] -> /usr/lib/dovecot//dovecot-lda(main+0x38a) [0x40295a] -> 
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7fcf2c8ffead] -> 
/usr/lib/dovecot//dovecot-lda() [0x4031e1]

-- 
http://sporothrix.wordpress.com/2011/01/16/usa-sie-krztusza-kto-nastepny/
Ditat Deus.
[God enriches]


Re: [Dovecot] lda crash?

2012-12-29 Thread Kamil Jońca
Robert Schetterer  writes:

> Am 29.12.2012 16:17, schrieb Kamil Jońca:
>> include: sieve_global_dir is not set;
>  have a look on this
>
No change after setting this parameter, lda crashes.

KJ
-- 
http://blogdebart.pl/2009/12/22/mamy-chorych-dzieci/
What we do not understand we do not possess.
-- Goethe



Re: [Dovecot] lda crash?

2013-01-08 Thread Kamil Jońca
Timo Sirainen  writes:

[...]
>
> I think the attached patch fixes this. Stephan can figure out a
> non-kludgy fix. :)
>
Does that patch is applied to packages available at 

deb http://xi.rename-it.nl/debian/ testing-auto/dovecot-2.1 main

?
Or is the only way to compile the source with patch?
After upgrade to 2:2.1.13-0~auto+3 lda still crashes.
KJ

-- 
http://blogdebart.pl/2010/03/17/dalsze-przygody-swinki-w-new-jersey/
A child of five could understand this!  Fetch me a child of five.



Re: [Dovecot] Error : File too large

2013-04-03 Thread Kamil Jońca
Kavish Karkera  writes:

> Hi ,
>
>
> When accessing mails through webmail(roundcube), we were getting below 
> error's in huge
>
> Please help to know .. what this error is related to..
>
> dovecot version , we are using is 2.1.15
>
>
> Mar 28 15:37:47 imapserver dovecot: imap(cel_default): Error:
> rename(/mail/mailstore/linoquery.com/lino_default/Maildir/new/1364463180.M563166P30867.imapserver,S=3263,W=3309,
> /mail/mailstore/linoquery.com/lino_default/Maildir/cur/1364463180.M563166P30867.imapserver,S=3263,W=3309:2,)
> failed: File too large

What filesystem? And how many files in
/mail/mailstore/linoquery.com/lino_default/Maildir/cur/ so far?
It sounds than you reached files-per-dir limit (~32K for ext3, 64K for
ext4, for example)


-- 
http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewskiej-wprowadzenie/
Made with real ingredients.



Re: [Dovecot] Error : File too large

2013-04-03 Thread Kamil Jońca

kjo...@o2.pl (Kamil Jońca) writes:

[...]

>
> What filesystem? And how many files in
> /mail/mailstore/linoquery.com/lino_default/Maildir/cur/ so far?
> It sounds than you reached files-per-dir limit (~32K for ext3, 64K for
> ext4, for example)

Sorry for that noise. These limits in ext3/4 are for subdir count.

KJ

-- 
http://sporothrix.wordpress.com/2011/01/16/usa-sie-krztusza-kto-nastepny/
Keyboard error press F1 continue



[Dovecot] mbox + bzip2 +dovecot = crash?

2010-03-22 Thread Kamil Jońca

I have some archived  mails in compressed (by bzip2) mboxes and I would
like to read them via imap  Unfortunately it looks like dovecot 
crashes when tries to read them :(


#v+
kjo...@alfa:~/Mail/Old/Junk%sudo /usr/sbin/dovecot -n 
[sudo] password for kjonca:
# 1.2.11: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32.7+2 i686 Debian squeeze/sid 
log_path: /var/log/dovecot
log_timestamp: %Y-%m-%d %H:%M:%S 
protocols: imap
listen: alfa.kjonca localhost
ssl: no
login_dir: /var/run/dovecot/login
login_executable: /usr/lib/dovecot/imap-login
login_processes_count: 1
verbose_proctitle: yes
mail_privileged_group: mail
mail_debug: yes
mbox_write_locks: fcntl dotlock
mail_plugins: mail_log zlib
mail_log_max_lines_per_sec: 0
namespace:
  type: private
  separator: /
  location: maildir:~/Mail/def:LAYOUT=fs:INBOX=~/Mail/def
  inbox: yes
  list: yes
  subscriptions: yes
namespace:
  type: private
  separator: /
  prefix: #Old/
  location: mbox:~/Mail/Old
  list: yes
  subscriptions: yes
lda:
  postmaster_address: r...@localhost
  log_path: ~/log/dovecot.log
  info_log_path: ~/log/deliver.log
  mail_plugins: sieve
  deliver_log_format: msgid=%m : Subject=%s : From=%f :%$
auth default:
  mechanisms: digest-md5 cram-md5
  passdb:
driver: pam
args: dovecot
  passdb:
driver: passwd-file
args: scheme=plain-md5 /etc/security/dovecot.pwd
  userdb:
driver: passwd
#v-

Then I try to read mailbox:

#v+
kjo...@alfa:~/Mail/Old/Junk%mutt -f \=\#Old/Junk/2008.bz2
#v-

In logs is:
#v+
2010-03-22 17:03:05 imap-login: Info: Login: user=, method=DIGEST-MD5, 
rip=127.0.0.1, lip=127.0.0.1, secured
2010-03-22 17:03:05 IMAP(kjonca): Info: Loading modules from directory: 
/usr/lib/dovecot/modules/imap
2010-03-22 17:03:06 IMAP(kjonca): Info: Module loaded: 
/usr/lib/dovecot/modules/imap/lib20_mail_log_plugin.so
2010-03-22 17:03:06 IMAP(kjonca): Info: Module loaded: 
/usr/lib/dovecot/modules/imap/lib20_zlib_plugin.so
2010-03-22 17:03:06 IMAP(kjonca): Info: Effective uid=1000, gid=1000, 
home=/home/kjonca
2010-03-22 17:03:06 IMAP(kjonca): Info: Namespace: type=private, prefix=, 
sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes
2010-03-22 17:03:06 IMAP(kjonca): Info: maildir: 
data=~/Mail/def:LAYOUT=fs:INBOX=~/Mail/def
2010-03-22 17:03:06 IMAP(kjonca): Info: fs: root=/home/kjonca/Mail/def, index=, 
control=, inbox=/home/kjonca/Mail/def
2010-03-22 17:03:06 IMAP(kjonca): Info: Namespace: type=private, prefix=#Old/, 
sep=/, inbox=no, hidden=no, list=yes, subscriptions=yes
2010-03-22 17:03:06 IMAP(kjonca): Info: mbox: data=~/Mail/Old
2010-03-22 17:03:06 IMAP(kjonca): Info: mbox: INBOX defaulted to 
/home/kjonca/Mail/Old/inbox
2010-03-22 17:03:06 IMAP(kjonca): Info: fs: root=/home/kjonca/Mail/Old, index=, 
control=, inbox=/home/kjonca/Mail/Old/inbox
2010-03-22 17:03:06 IMAP(kjonca): Info: Namespace #Old/: Using permissions from 
/home/kjonca/Mail/Old: mode=0700 gid=-1
2010-03-22 17:03:50 dovecot: Error: child 27392 (imap) killed with signal 11 
(core dumped)
#v-

core stack:
#v+
kjo...@alfa:~/Mail/Old/Junk%gdb -c ~/core /usr/lib/dovecot/imap
[..cut...]
Core was generated by `imap [kjonca 127.0.0.1]'.
Program terminated with signal 11, Segmentation fault.
[New process 27392]
#0  memmove () at ../sysdeps/i386/i686/memmove.S:97
97  ../sysdeps/i386/i686/memmove.S: No such file or directory.
in ../sysdeps/i386/i686/memmove.S
(gdb) bt
#0  memmove () at ../sysdeps/i386/i686/memmove.S:97
#1  0x080f60c1 in i_stream_compress (stream=0x824ca48) at istream.c:393
#2  0xb77ce68a in ?? () from /usr/lib/dovecot/modules/imap/lib20_zlib_plugin.so
#3  0x0824ca48 in ?? ()
#4  0x0001 in ?? ()
#5  0xbf8efe78 in ?? ()
#6  0x080dc007 in mail_cache_decision_state_update (view=0x10ef4c52, seq=0, 
field=136628808) at mail-cache-decisions.c:83
#7  0x080f59bd in i_stream_seek_mark (stream=0x10ef4c51, v_offset=0) at 
istream.c:209
#8  0x080930fb in istream_raw_mbox_seek (stream=0x8268290, offset=0) at 
istream-raw-mbox.c:736
#9  0x080935b5 in mbox_file_seek (mbox=0x8261f30, view=0x8264390, seq=1, 
deleted_r=0xbf8eff8f) at mbox-file.c:177
#10 0x080956a2 in mbox_mail_seek (mail=) at mbox-mail.c:85
#11 0x08095d7f in mbox_mail_get_received_date (_mail=0x826aa10, 
date_r=0xbf8efffc) at mbox-mail.c:117
#12 0x08069c18 in fetch_internaldate (ctx=0x824a360, mail=0x826aa10, 
context=0x0) at imap-fetch.c:719
#13 0x0806a39d in imap_fetch_more (ctx=0x824a360) at imap-fetch.c:473
#14 0x08062461 in cmd_fetch (cmd=0x824a210) at cmd-fetch.c:228
#15 0x08067b7c in client_command_input (cmd=0x824a210) at client.c:612
#16 0x08067c52 in client_command_input (cmd=0x824a210) at client.c:661
#17 0x08067ed5 in client_handle_input (client=0x8249f80) at client.c:702
#18 0x080686ff in client_input (client=0x8249f80) at client.c:753
#19 0x080f96a6 in io_loop_handler_run (ioloop=0x8247e18) at ioloop-epoll.c:208
#20 0x080f8b20 in io_loop_run (ioloop=0x8247e18) at ioloop.c:335
#21 0x08070ee4 in main (argc=3, argv=0xbf8f0374, envp=0xbf8f0384) at main.c

[Dovecot] passing parameters to deliver

2010-02-12 Thread Kamil Jońca

Is any posibility to pass parameters/environment variables to deliver
with sieve plugin?

I have some procmail rules to decide where mail should go, which
can't be migrated to sieve (uses external programs). So far I write it
to maildirs, but I wonder to migrate to mdbox, and procmail can't
handle it. Any ideas?

KJ

-- 
http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewskiej-wprowadzenie/
można nie mieć nawet żadnego sensownego argumentu, a dzięki odpowiedniej
gestykulacji stworzyć poczucie wiarygodności.
Puls Biznesu



Re: [Dovecot] passing parameters to deliver

2010-02-20 Thread Kamil Jońca
Steffen Kaiser  writes:

> On Fri, 12 Feb 2010, Kamil Jońca wrote:
>
>> Is any posibility to pass parameters/environment variables to deliver
>> with sieve plugin?
>
> No. But you could check the "extdata" extension posted by Stephan Bosch 
> lately.

But, if I understand, this plugin can store only global parameters, not
'per message'?

KJ

-- 
http://blogdebart.pl/2009/12/22/mamy-chorych-dzieci/
Uwolnić słonia !!!



Re: [Dovecot] passing parameters to deliver

2010-02-20 Thread Kamil Jońca
Timo Sirainen  writes:

> On Fri, 2010-02-12 at 14:42 +0100, Kamil Jońca wrote:
>> Is any posibility to pass parameters/environment variables to deliver
>> with sieve plugin?
>> 
>> I have some procmail rules to decide where mail should go, which
>> can't be migrated to sieve (uses external programs). So far I write it
>> to maildirs, but I wonder to migrate to mdbox, and procmail can't
>> handle it. Any ideas?
>
> If you've gone that far, how about just calling deliver from procmail
> like:
>
> deliver -m your_mailbox_name
>
> (With Sieve that actually only specifies the default mailbox, which is
> used only if Sieve doesn't decide to save it elsewhere.)

Yes, I know about this switch. Maybe I should tourned off sieve (So
switch works unconditionally) and rewrite all my destinations like
deliver -m  
Pity :(
KJ

-- 
http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewskiej-wprowadzenie/
The world is coming to an end ... SAVE YOUR BUFFERS!!!



[Dovecot] (Maybe stupid) question about selecting mailbox

2013-08-20 Thread Kamil Jońca

Does mailbox with "\NoSelect"  can be select or examine?

I'm not sure but IMVHO  "select x" should not work.


$/usr/lib/dovecot/imap
* PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE 
SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT 
MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 
CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS 
SPECIAL-USE COMPRESS=DEFLATE] Logged in as kjonca
2 LIST "x" "*"
* LIST (\Noselect \HasChildren) "/" "x"
* LIST (\HasNoChildren) "/" "x/y"
2 OK List completed.
3 SELECT x 
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags 
permitted.
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1376977764] UIDs valid
* OK [UIDNEXT 1] Predicted next UID
* OK [NOMODSEQ] No permanent modsequences
3 OK [READ-WRITE] Select completed.
4 logout
IMAP(kjonca): Info: Disconnected: Logged out in=35 out=813
* BYE Logging out
4 OK Logout completed.

doveconf -n
# 2.1.17 (d463fab6db95): /etc/dovecot/dovecot.conf
# OS: Linux 3.8.9+1 x86_64 Debian wheezy/sid 
auth_debug = yes
auth_mechanisms = plain digest-md5 cram-md5 login
auth_username_format = %n
auth_verbose = yes
listen = alfa
log_path = /var/log/dovecot
mail_debug = yes
mail_location = maildir:~/Mail/1:LAYOUT=fs:INBOX=~/Mail/1/INBOX
mail_log_prefix = "%Us(%u): "
mail_plugins = zlib
passdb {
  args = scheme=PLAIN /etc/security/dovecot.pwd
  driver = passwd-file
}
plugin {
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename 
flag_change save
  mail_log_fields = uid box msgid size from flags
  sieve = ~/.dovecot.sieve
  sieve_execute_bin_dir = %h/sieve/bin
  sieve_execute_exec_timeout = 86400s
  sieve_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute +vnd.dovecot.filter
  sieve_filter_bin_dir = %h/sieve/bin
  sieve_filter_exec_timeout = 86400s
  sieve_pipe_bin_dir = %h/sieve/bin
  sieve_pipe_exec_timeout = 86400s
  sieve_plugins = sieve_extprograms
}
protocols = " imap lmtp"
service auth {
  user = root
}
ssl = no
ssl_cert = http://blogdebart.pl/2009/12/22/mamy-chorych-dzieci/
The goal of Computer Science is to build something that will last at
least until we've finished building it.



Re: [Dovecot] (Maybe stupid) question about selecting mailbox

2013-11-05 Thread Kamil Jońca
Timo Sirainen  writes:

> On 21.8.2013, at 2.02, Kamil Jońca  wrote:
>
>> Does mailbox with "\NoSelect"  can be select or examine?
>> 
>> I'm not sure but IMVHO  "select x" should not work.
> ..
>> mail_location = maildir:~/Mail/1:LAYOUT=fs:INBOX=~/Mail/1/INBOX
>
> Fixed: http://hg.dovecot.org/dovecot-2.2/rev/6942a3da740c

Thanks. Somehow I missed your answer. I simply realized that dovecot now
works fine. Thank you again.
KJ


-- 
http://wolnelektury.pl/wesprzyj/teraz/
An atom-blaster is a good weapon, but it can point both ways.
-- Isaac Asimov



[Dovecot] Strange difference between mails delivered with dovecot-lda and lmtp

2014-03-15 Thread Kamil Jońca

For a long time I have had configuration where mails were fetched by
fetchmail then passed to exim and then passed to dovecot via lmtp.
Recently I remove dovecot module and mails are passed from exim to
dovecot via dovecot-lda
Yesterday I have some kind of accident and lost my .fetchids file so a
lot of mails were fetched again. 
During duplicate hunting I found something strange:
messages fetched yesterday (passed to dovecot with lda have additional
line) have additional line at the end:
for example 

--8<---cut here---start->8---
diff cur/1392241092.M478532P15313.alfa,S=13668,W=13925:2,a 
cur/1394814438.M978438P14745.alfa,S=13567,W=13823:2,a
1,6c1,4
< Return-Path: 
< Delivered-To: 
< Received: from alfa.kjonca
<   by alfa.kjonca (Dovecot) with LMTP id p94PDcTp+1LROwAApvcrCQ
<   for ; Wed, 12 Feb 2014 22:38:12 +0100
< Received: from [127.0.0.1] (port=60632 helo=alfa.kjonca)
---
> Return-path: 
> Envelope-to: kjonca@localhost
> Delivery-date: Fri, 14 Mar 2014 17:27:18 +0100
> Received: from [127.0.0.1] (port=45527 helo=alfa.kjonca)
9,10c7,8
<   id 1WDhVU-0003ys-75
<   for kjonca@localhost; Wed, 12 Feb 2014 22:38:12 +0100
---
>   id 1WOUgz-00015z-L0
>   for kjonca@localhost; Fri, 14 Mar 2014 17:10:41 +0100
13c11
<   for  (single-drop); Wed, 12 Feb 2014 22:38:12 +0100 
(CET)
---
>   for  (single-drop); Fri, 14 Mar 2014 17:10:41 +0100 
> (CET)
30c28
< Message-Id: 
---
> Message-Id: 
256a255
> 
--8<---cut here---end--->8---

I'm somewhat confused with this. Is this normal?

-- 
http://wolnelektury.pl/wesprzyj/teraz/


[Dovecot] [LMTP] sieve filter does not drop privilleges?

2014-03-25 Thread Kamil Jońca

I have (user) sieve filter in my home dir. 
This filter uses  "vnd.dovecot.filter" extension to call some shell
scripts. These scrips creates some temporary files.
Strange thing:
whent sieve is called via dovecot-lda - these files are created by user
"kjonca"
when sieve is called via lmtp - these files are created by root.
Is there any way to drop privilleges where lmtp passing messages to
sieve?
KJ

-- 
http://wolnelektury.pl/wesprzyj/teraz/


sieve - segmentation fault

2019-09-29 Thread Kamil Jońca via dovecot


I tried to experiment with "index" extension and I found that, in case
"0" sieve-filter segfaults.
example code was:
--8<---cut here---start->8---
if header :index 0 :last :regex "received" "some regex here" { fileinto 
"dedicated mailbox" ; }
--8<---cut here---end--->8---
KJ

-- 
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html
I dote on his very absence.
-- William Shakespeare, "The Merchant of Venice"


SMTPUTF8 in dovecot lmtp - current status

2024-11-11 Thread Kamil Jońca via dovecot


About a year ago I asked  about SMTPUTF8 in dovecot-lmtp, and then
dovecod did not handle it.
Is that changed?
KJ

-- 
http://wolnelektury.pl/wesprzyj/teraz/
A bore is someone who persists in holding his own views after we have
enlightened him with ours.
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


sieve filter does not work

2025-04-30 Thread Kamil Jońca via dovecot


sieve-filter -e -W -D -C -v ~/.dovecot.sieve mailbox
sieve-filter: Fatal: Couldn't load required plugin 
/usr/lib/dovecot/modules/lib90_sieve_plugin.so: dlopen() failed: 
/usr/lib/dovecot/modules/lib90_sieve_plugin.so: undefined symbol: 
mail_deliver_ctx_get_log_var_expand_table


-- 
http://wolnelektury.pl/wesprzyj/teraz/
Even if you do learn to speak correct English, whom are you going to speak
it to?
-- Clarence Darrow
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


2.3 -> 2.4 migration problem(s)

2025-04-30 Thread Kamil Jońca via dovecot


Recently in debian sid version 2.4 appeared and I tried to migrate.
it (mostly working) but
Neither dovecot-lda nor doveadm does not see current system user
context i.e.

--8<---cut here---start->8---
%doveadm mailbox list   
 
Fatal: One of -u, -F, -A or --no-userdb-lookup must be provided
--8<---cut here---end--->8---

from lda logs
--8<---cut here---start->8---
Fatal: Namespace root: mail_storage settings: Failed to parse configuration: 
Invalid setting mail_path=~/Mail/0/: mail_path setting used home directory (~/) 
but there is no mail_home and userdb didn't return it
--8<---cut here---end--->8---
for dovecot-lda
setting "mail_home = /home/%{user|username}"
helped but still ...

doveadm mailbox list -u kjonca
and "-d" option helped in both cases

Moreover I found that doveadm does not work when dovecot is stoped (but
used to work in 2.3.x)

Another thing is:
 --8<---cut here---start->8---
deliver_log_format = msgid=%m: %$
--8<---cut here---end--->8---

in 2.3.x configuration it created line like this:
--8<---cut here---start->8---
2025-04-27T02:08:31.925845+02:00 alfa dovecot: LDA(kjonca): sieve: 
msgid=: fileinto action: stored mail 
into mailbox 'RSS'
--8<---cut here---end--->8---
but now it does not work (what is strange I cannot find %$ description
and %m is described as "mechanism" not message id ...)

So how can I have old loggin and authentication mechanisms?
KJ



# 2.4.1-4 (7d8c0e5759): /etc/dovecot/dovecot.conf
# Pigeonhole version 2.4.1-4 (0a86619f)
# OS: Linux 6.12.22-amd64 x86_64 Debian trixie/sid
# ...
# 4 default setting change
dovecot_config_version = 2.4.0
acl_driver = vfile
auth_allow_cleartext = yes
auth_debug = yes
auth_mechanisms = plain digest-md5 cram-md5 login
auth_username_format = %{user | username }
auth_verbose = yes
default_vsz_limit = 1024M
dovecot_storage_version = 2.4.0
lazy_expunge_mailbox = .EXPUNGED/
lazy_expunge_only_last_instance = yes
listen = alfa
mail_driver = maildir
mail_inbox_path = ~/Mail/0/INBOX
mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename 
flag_change save
mail_log_fields = uid box msgid size from subject flags
mail_log_prefix = "%{protocol}(%{user}): "
mail_path = ~/Mail/0/
mail_plugins {
  acl = yes
  lazy_expunge = yes
}
postmaster_address = root@localhost
protocols {
  imap = yes
}
sieve_execute_bin_dir = %{home}/sieve/bin
sieve_execute_exec_timeout = 86400s
sieve_extensions {
  fileinto = yes
  reject = yes
  envelope = yes
  encoded-character = yes
  vacation = yes
  subaddress = yes
  comparator-i;ascii-numeric = yes
  relational = yes
  regex = yes
  imap4flags = yes
  copy = yes
  include = yes
  body = yes
  variables = yes
  enotify = yes
  environment = yes
  mailbox = yes
  date = yes
  index = yes
  ihave = yes
  duplicate = yes
  mime = yes
  foreverypart = yes
  extracttext = yes
  vnd.dovecot.pipe = yes
  vnd.dovecot.execute = yes
  vnd.dovecot.filter = yes
  vnd.dovecot.debug = yes
  editheader = yes
}
sieve_filter_bin_dir = %{home}/sieve/bin
sieve_filter_exec_timeout = 86400s
sieve_pipe_bin_dir = %{home}/sieve/bin
sieve_pipe_exec_timeout = 86400s
sieve_plugins {
  sieve_extprograms = yes
}
ssl = no
service auth {
  user = root
  unix_listener auth-userdb {
  }
}
passdb alfa {
  default_password_scheme = PLAIN
  driver = passwd-file
  passwd_file_path = /etc/security/dovecot.pwd
}
userdb alfa {
  passwd_file_path = /etc/security/dovecot.pwd
  driver = passwd-file
}
namespace root {
  inbox = yes
  separator = /
}
namespace expunged {
  mail_driver = maildir
  mail_path = ~/Mail/expunged/
  hidden = yes
  inbox = no
  list = no
  prefix = .EXPUNGED/
  separator = /
}
service imap-login {
  inet_listener imap {
  }
}
service imap {
}
service auth-worker {
  user = dovecot
}
service dict {
  unix_listener dict {
  }
}
protocol lda {
  deliver_log_format = msgid=%m: %$
  info_log_path = syslog
  log_path = syslog
  mail_plugins {
sieve = yes
  }
  syslog_facility = mail
}
protocol imap {
  mail_max_userip_connections = 20
  mail_plugins {
mail_log = yes
notify = yes
acl = yes
imap_acl = yes
lazy_expunge = yes
  }
}
sieve_script personal {
  path = ~/.dovecot.sieve
}
sieve_script before {
  path = /etc/dovecot/sieve
}

-- 
http://wolnelektury.pl/wesprzyj/teraz/
The way I understand it, the Russians are sort of a combination of evil and
incompetence... sort of like the Post Office with tanks.
-- Emo Philips
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


2.3 -> 2.4 sieve scripts

2025-04-30 Thread Kamil Jońca via dovecot


I have configured some sieve scripts to run when I append messages to
one of mailbox:

--8<---cut here---start->8---
  imapsieve_mailbox1_name = Archives
  imapsieve_mailbox1_causes = APPEND
  imapsieve_mailbox1_before = file:/.../sieve/dovecot.sieve
--8<---cut here---end--->8---

I tried to use this with 2.4 with no luck:

# 2.4.1-4 (7d8c0e5759): /etc/dovecot/dovecot.conf
# Pigeonhole version 2.4.1-4 (0a86619f)
# OS: Linux 6.12.21-amd64 x86_64 Debian trixie/sid 
# Hostname: qqrq
# 4 default setting changes since version 2.4.0
dovecot_config_version = 2.4.0
auth_mechanisms = plain digest-md5 cram-md5 login
compress_zstd_level = 22
default_vsz_limit = 2048M
dovecot_storage_version = 2.4.0
fts_autoindex = yes
fts_autoindex_max_recent_msgs = 999
fts_search_add_missing = yes
mail_compress_write_method = zstd
mail_driver = mdbox
mail_home = /home/%{user}
mail_inbox_path = ~/Mail/0/INBOX
mail_path = ~/Mail/0/
mail_plugins {
  mail_compress = yes
  acl = yes
}
mail_privileged_group = mail
protocols {
  imap = yes
}
sieve_extensions {
  fileinto = yes
  reject = yes
  envelope = yes
  encoded-character = yes
  vacation = yes
  subaddress = yes
  comparator-i;ascii-numeric = yes
  relational = yes
  regex = yes
  imap4flags = yes
  copy = yes
  include = yes
  body = yes
  variables = yes
  enotify = yes
  environment = yes
  mailbox = yes
  date = yes
  index = yes
  ihave = yes
  duplicate = yes
  mime = yes
  foreverypart = yes
  extracttext = yes
  notify = yes
  imapflags = yes
  editheader = yes
}
sieve_plugins {
  sieve_imapsieve = yes
  sieve_extprograms = yes
}
sieve_redirect_envelope_from = recipient
ssl = no
passdb passwd-file {
  default_password_scheme = PLAIN
  passwd_file_path = /etc/dovecot/users
}
userdb passwd-file {
  passwd_file_path = /etc/dovecot/users
}
namespace inbox {
  inbox = yes
  separator = /
  mailbox Drafts {
special_use = "\\Drafts"
  }
  mailbox Junk {
special_use = "\\Junk"
  }
  mailbox Trash {
special_use = "\\Trash"
  }
  mailbox Sent {
special_use = "\\Sent"
  }
  mailbox "Sent Messages" {
special_use = "\\Sent"
  }
}
service imap-login {
  inet_listener imap {
  }
}
service imap {
}
service pop3 {
}
service submission {
}
service auth {
  unix_listener auth-userdb {
  }
}
service auth-worker {
}
service dict {
  unix_listener dict {
  }
}
protocol imap {
  mail_plugins {
mail_log = yes
notify = yes
acl = yes
imap_acl = yes
sieve = yes
imap_sieve = yes
lazy_expunge = yes
  }
}
sieve_script mailbox1 {
  imapsieve_from_name = Archives
  cause = append
  path = file:/.../sieve/dovecot.sieve
  type = before
}

When I add message to Archive, I can see in logs:
imap(kjonca): Error: Couldn't load required plugin 
/usr/lib/dovecot/modules/lib90_sieve_plugin.so: dlopen() failed: 
/usr/lib/dovecot/modules/lib90_sieve_plugin.so: undefined symbol: 
mail_deliver_ctx_get_log_var_expand_table
-- 
http://wolnelektury.pl/wesprzyj/teraz/
Never go to bed mad.  Stay up and fight.
-- Phyllis Diller, "Phyllis Diller's Housekeeping Hints"
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: (2.4) weird doveadm behavior

2025-05-05 Thread Kamil Jońca via dovecot
Tim Dickson via dovecot  writes:

> don't send the output to head -n1 and you'll get more than one line if
> the data is there :-)
>

Could you please elaborate?
head -n 1 is to get only one message ids (and it works - as you could
see)

but trying to fetch this message fails (and this command is not piped to
"head") 

KJ
-- 
http://wolnelektury.pl/wesprzyj/teraz/
We were so poor we couldn't afford a watchdog.  If we heard a noise at night,
we'd bark ourselves.
-- Crazy Jimmy
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: (2.4) weird doveadm behavior

2025-05-06 Thread Kamil Jońca via dovecot
Timo Sirainen via dovecot  writes:

[...]
>
> Looks like unless you explicitly specify "mailbox" parameter, it's skipping 
> the list=no namespaces. Pretty sure v2.3 worked the same way. You could just 
> bypass the "doveadm search" step?
>
I am afraid not. this comes from script which works like: find some
emails and then do something for each email.
KJ

-- 
http://wolnelektury.pl/wesprzyj/teraz/
Bachelor:
A man who chases women and never Mrs. one.
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


(2.4) weird doveadm behavior

2025-05-05 Thread Kamil Jońca via dovecot


debian package
2.4.1-4 (7d8c0e5759): /etc/dovecot/dovecot.conf
I have namespace:
namespace expunged {
  mail_driver = maildir
  mail_path = ~/Mail/expunged/
  mailbox_list_layout = fs
  hidden = yes
  inbox = no
  list = no
  prefix = .EXPUNGED/
  separator = /
}

%doveadm search -u kjonca mailbox .EXPUNGED|head -n 1
08ac303413c11168864d2a00a6f72b09 30802
%doveadm fetch -u kjonca text mailbox-guid 08ac303413c11168864d2a00a6f72b09 uid 
30802

...empty output...

How can I fetch messages?
KJ


-- 
http://wolnelektury.pl/wesprzyj/teraz/
Now KEN and BARBIE are PERMANENTLY ADDICTED to MIND-ALTERING DRUGS ...
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


[solved] Re: 2.3 -> 2.4 sieve scripts

2025-05-01 Thread Kamil Jońca via dovecot
Kamil Jońca  writes:

> I have configured some sieve scripts to run when I append messages to
> one of mailbox:
>
> --8<---cut here---start->8---
>   imapsieve_mailbox1_name = Archives
>   imapsieve_mailbox1_causes = APPEND
>   imapsieve_mailbox1_before = file:/.../sieve/dovecot.sieve
> --8<---cut here---end--->8---
>
> I tried to use this with 2.4 with no luck:
>
Finally I made it working with  help of
https://doc.dovecot.org/main/core/plugins/imap_sieve.html (Example
cofiguration)
Probably it would be nice to have in
https://doc.dovecot.org/2.4.0/core/summaries/settings.html#imapsieve_from
link to this paga and not only pure doc.

>
> When I add message to Archive, I can see in logs:
> imap(kjonca): Error: Couldn't load required plugin 
> /usr/lib/dovecot/modules/lib90_sieve_plugin.so: dlopen() failed: 
> /usr/lib/dovecot/modules/lib90_sieve_plugin.so: undefined symbol: 
> mail_deliver_ctx_get_log_var_expand_table

I have to remowe "sieve" plugin from imap.

KJ

-- 
http://wolnelektury.pl/wesprzyj/teraz/
Beauty:
What's in your eye when you have a bee in your hand.
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: (2.4) weird doveadm behavior

2025-05-06 Thread Kamil Jońca via dovecot
Kamil Jońca via dovecot  writes:

[...]
>
> %doveadm search -u kjonca mailbox .EXPUNGED|head -n 1
> 08ac303413c11168864d2a00a6f72b09 30802
its even more weird for me:
(there is only one email in z/1 mailbox)
--8<---cut here---start->8---
kjonca@alfa:~%doveadm search -u kjonca mailbox .EXPUNGED|wc -l
80
kjonca@alfa:~%doveadm search -u kjonca mailbox .EXPUNGED or mailbox z/1|wc -l
1
kjonca@alfa:~%doveadm search -u kjonca  mailbox z/1|wc -l  
1
--8<---cut here---end--->8---

-- 
http://wolnelektury.pl/wesprzyj/teraz/
Death is nature's way of telling you to slow down.
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


(2.3->2.4) How to expunge with hierarhy saving?

2025-05-02 Thread Kamil Jońca via dovecot


I have used lazy_expunge plugin with namespace (configuration convert):

namespace expunged {
  mail_driver = maildir
  mail_path = ~/Mail/expunged/
  hidden = yes
  inbox = no
  list = no
  prefix = .EXPUNGED/
  separator = /
}

with
lazy_expunge_mailbox = .EXPUNGED

this allowed me to keep hierarchy (i.e.mails from "admin" mailbox were
expunged to "~/Mail/expunged/admin" )
this is no longer true - the best I can achieve is to have single
mailbox with all mails :(
Is it possible to get older behavior?
(lazy_expunge_mailbox = .EXPUNGED/ - ends with error)
KJ


-- 
http://wolnelektury.pl/wesprzyj/teraz/
Zuzanka najwyraźniej pełni obowiązki Albina Siwaka w tej ekipie...
(C) Slawek Kotynski w dyskusj nt. pl.whatewer.SETI@home...
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Access to deleted emails

2025-07-13 Thread Kamil Jońca via dovecot


Some time ago I mistakenly delete a lot of emails (mdbox storage)
I was able to recover them with command like:
--8<---cut here---start->8---
doveadm import mdbox_deleted:~/Mail/0 "" ALL
--8<---cut here---end--->8---

But now, with I get:
--8<---cut here---start->8---
%doveadm import -u kjonca mdbox_deleted:~/Mail/0 "" ALL
doveadm(kjonca): Fatal: Import namespace initialization failed: mdbox_deleted: 
mdbox: mailbox_root_directory_name must not be empty
--8<---cut here---end--->8---

How can I restore mails?
KJ


-- 
http://wolnelektury.pl/wesprzyj/teraz/
Hartley's First Law:
You can lead a horse to water, but if you can get him to float
on his back, you've got something.
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: sieve script is not exescuted

2025-07-28 Thread Kamil Jońca via dovecot
John via dovecot  writes:

> sieve_script before {
> type = before
> path = /etc/dovecot/sieve
> bin_path = /etc/dovecot/sieve
> }
>
> Place sieve script in /etc/dovecot/sieve. run sievec 

It seems that:
--8<---cut here---start->8---
type=before
--8<---cut here---end--->8---
is key line.

But for me
https://doc.dovecot.org/main/core/summaries/settings.html#sieve_script
says that
--8<---cut here---start->8---
sieve_script  before {
--8<---cut here---end--->8---

should be enough. Am I wrong?
KJ

-- 
http://wolnelektury.pl/wesprzyj/teraz/
The church is near but the road is icy; the bar is far away but I will
walk carefully.
-- Russian Proverb
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: sieve script is not executed

2025-07-28 Thread Kamil Jońca via dovecot
Aki Tuomi via dovecot  writes:

>> On 28/07/2025 10:46 EEST Kamil Jońca via dovecot  wrote:
>> 
>>  
>> I have scripts in 2 places:
>> sieve_script personal {
>> path = ~/.dovecot.sieve
>> }
>> 
>> 
>> sieve_script before {
>> path = /etc/dovecot/sieve
>> }
>> 
>> 
>> /etc/dovecot/sieve is directory with (currently) one script. This script
>> add header to message.
>> 
>> And it seems, that "before" script is not executed.
>> Any hints?
>> KJ
>> 
>
> Try running with log_debug=category=sieve and see what gets logged?
>
> Aki


Hm. No mention about "before" script?

--8<---cut here---start->8---
2025-07-28T10:07:00.764479+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
Pigeonhole version 2.4.1-4 (0a86619f) initializing
2025-07-28T10:07:00.764561+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
storage personal: file: Using Sieve script path: /home/kjonca/.dovecot.sieve
2025-07-28T10:07:00.764588+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
storage personal: file: script '.dovecot': Opened from 'personal'
2025-07-28T10:07:00.764622+02:00 alfa dovecot: lda(kjonca): Debug: sieve: Using 
the following personal Sieve script: personal/.dovecot
2025-07-28T10:07:00.764654+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
multi-script: Start execute sequence
2025-07-28T10:07:00.764680+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
Opening script 1 of 1 from 'personal/.dovecot'
2025-07-28T10:07:00.764707+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
Loading script personal/.dovecot
2025-07-28T10:07:00.764727+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
Script binary /home/kjonca/.dovecot.svbin successfully loaded
2025-07-28T10:07:00.764751+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
storage personal: file: script '.dovecot': Saving binary to 
'/home/kjonca/.dovecot.svbin'
2025-07-28T10:07:00.764776+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
binary /home/kjonca/.dovecot.svbin: save: not saving binary, because it is 
already stored
2025-07-28T10:07:00.764797+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
Executing script from '/home/kjonca/.dovecot.svbin'
2025-07-28T10:07:00.764823+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
multi-script: Run script '/home/kjonca/.dovecot.svbin'
2025-07-28T10:07:00.764908+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
Started running script '/home/kjonca/.dovecot.svbin'
2025-07-28T10:07:00.766300+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
Aborted running script '/home/kjonca/.dovecot.svbin'
2025-07-28T10:07:00.766352+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
multi-script: Execute result
2025-07-28T10:07:00.766374+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
<4brB035mnqz4cCFc@bambus.kjonca>:Executing result (status=ok, commit=no)
2025-07-28T10:07:00.766407+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
<4brB035mnqz4cCFc@bambus.kjonca>:Starting execution of actions
2025-07-28T10:07:00.766430+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
<4brB035mnqz4cCFc@bambus.kjonca>:fileinto action: Start storing into mailbox 
admin/bambus
2025-07-28T10:07:00.766458+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
<4brB035mnqz4cCFc@bambus.kjonca>:Executing actions
2025-07-28T10:07:00.766484+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
<4brB035mnqz4cCFc@bambus.kjonca>:Executing fileinto action
2025-07-28T10:07:00.766505+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
<4brB035mnqz4cCFc@bambus.kjonca>:fileinto action: Execute storing into mailbox 
'admin/bambus'
2025-07-28T10:07:00.772270+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
<4brB035mnqz4cCFc@bambus.kjonca>:fileinto action: Saving to mailbox 
'admin/bambus' successful so far
2025-07-28T10:07:00.772329+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
<4brB035mnqz4cCFc@bambus.kjonca>:Finished executing fileinto action (status=ok, 
keep=canceled)
2025-07-28T10:07:00.772354+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
<4brB035mnqz4cCFc@bambus.kjonca>:Finished executing actions (status=ok, 
keep=none, executed=yes)
2025-07-28T10:07:00.772387+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
<4brB035mnqz4cCFc@bambus.kjonca>:Finished executing result (no commit, 
status=ok, keep=no)
2025-07-28T10:07:00.772411+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
multi-script: Sequence ended
2025-07-28T10:07:00.772437+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
multi-script: Finishing sequence (status=ok)
2025-07-28T10:07:00.772461+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
<4brB035mnqz4cCFc@bambus.kjonca>:Executing result (status=ok, commit=yes)
2025-07-28T10:07:00.772482+02:00 alfa dovecot: lda(kjonca): Debug: sieve: 
&

sieve script is not exescuted

2025-07-28 Thread Kamil Jońca via dovecot


I have scripts in 2 places:
sieve_script personal {
path = ~/.dovecot.sieve
}


sieve_script before {
path = /etc/dovecot/sieve
}


/etc/dovecot/sieve is directory with (currently) one script. This script
add header to message.

And it seems, that "before" script is not executed.
Any hints?
KJ

-- 
http://wolnelektury.pl/wesprzyj/teraz/
"Linux: the operating system with a CLUE...
Command Line User Environment".
(seen in a posting in comp.software.testing)
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: sieve script is not exescuted

2025-07-29 Thread Kamil Jońca via dovecot
Håkon Alstadheim via dovecot  writes:

[...]
>>
> I may be totally misunderstanding, but is mail delivered by lda or
> lmtp ? If lda, it may be running as the mail user, and so will not
> have access to compile the before script. Try compiling it as the
> owner of the before script, and ensure that the delivery agent (daemon
> or lda binary) has access.
>

It was lda. But as I wrote earlier - "type=before" made script working,
so it was not problem with permissions.

KJ

-- 
http://wolnelektury.pl/wesprzyj/teraz/
"My life is a soap opera, but who has the rights?"
-- MadameX
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org