Re: Problem with LMTP

2017-05-11 Thread Angel L. Mateo

El 11/05/17 a las 11:28, Aki Tuomi escribió:



On 11.05.2017 12:24, Aki Tuomi wrote:


On 11.05.2017 11:26, Angel L. Mateo wrote:

El 10/05/17 a las 12:26, Aki Tuomi escribió:

Can you please try again, with debugging symbols installed?


There it is


Hi!

This is a known bug and we are working on a fix.

Aki


Although it would be quite useful for us if you can valgrind it, or know
how it can be made to happen:


	I don't know how to reproduce the problem. In fact, the same message 
that produces it, it's delivered later.


I don't mind valgrind it, but does valgrind produce a lot of output?

--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868889150
Fax: 86337


Re: Problem with LMTP

2017-05-11 Thread Angel L. Mateo

El 11/05/17 a las 11:24, Aki Tuomi escribió:



On 11.05.2017 11:26, Angel L. Mateo wrote:

El 10/05/17 a las 12:26, Aki Tuomi escribió:


Can you please try again, with debugging symbols installed?


There it is



Hi!

This is a known bug and we are working on a fix.


Ok. Could I use it in production environment?

--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868889150
Fax: 86337


[BUG] doveadm kick doesn't play well with hibernate

2017-05-11 Thread Christian Balzer

Hello,

Dovecot 2.2.27 (Debian Jessie backports).

When issuing a "doveadm kick" for a specific user I was greeted by:
---
"warning: other connections would also be kicked from following users:"
---
and a list of 22odd thousand users.

As it turns out, kick wants to smack the hibernation proces(ses) that
have hibernated sessions for this user, obviously the wrong approach here.

If there's doveadm command to wake up and thus un-hibernate sessions for a
specific user this could be used as a workaround but a quick glance
suggest no such thing. 

This functionality is absolutely crucial for us as we need this for our
custom mailbox migration functionality.

If there's no workaround or fix within 2 months I'll be forced to disable
hibernation again (with a heavy heart).

Regards,

Christian
-- 
Christian BalzerNetwork/Systems Engineer
ch...@gol.com   Global OnLine Japan/Rakuten Communications
http://www.gol.com/


Re: folders in public namespace only visable to 2nd folder level in 2.2.29.1

2017-05-11 Thread Karsten Heiken

Am 04.05.2017 um 09:27 schrieb Andreas Oster:

Error: /var/vmail/domain/someuser/Maildir/public/.test.2nd /dovecot.index.pvt 
reset, view is now inconsistent
Error: /var/vmail/domain/someuser/Maildir/public/.test.2nd/dovecot.index.pvt 
view is inconsistent


I have the same issue.

My observations are:

 - this only happens with shared/public folders
 - this only happens if the directory is empty

So in your example this would mean the public mailbox "test/2nd" has never had 
any emails in it.

My workaround is: Put an email into the mailbox and delete it. This fixes the "view 
is inconsistent" error permanently for this folder.

Hopefully this description is of any help to the devs, so that this can be 
fixed directly in dovecot.


 - Karsten



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Problem with LMTP

2017-05-11 Thread Aki Tuomi


On 11.05.2017 12:24, Aki Tuomi wrote:
>
> On 11.05.2017 11:26, Angel L. Mateo wrote:
>> El 10/05/17 a las 12:26, Aki Tuomi escribió:
>>> Can you please try again, with debugging symbols installed?
>>>
>> There it is
>>
> Hi!
>
> This is a known bug and we are working on a fix.
>
> Aki

Although it would be quite useful for us if you can valgrind it, or know
how it can be made to happen:

service lmtp {
  executable = /usr/bin/valgrind --num-callers=30 --time-stamp=yes
--track-origins=yes --log-file=/tmp/valgrind.out.$$
/usr/libexec/dovecot/lmtp
}


or /usr/lib/dovecot/lmtp depending on your OS.

Aki


Re: Problem with LMTP

2017-05-11 Thread Aki Tuomi


On 11.05.2017 11:26, Angel L. Mateo wrote:
> El 10/05/17 a las 12:26, Aki Tuomi escribió:
>>
>> Can you please try again, with debugging symbols installed?
>>
> There it is
>

Hi!

This is a known bug and we are working on a fix.

Aki


Re: Problem with LMTP

2017-05-11 Thread Angel L. Mateo

El 10/05/17 a las 12:26, Aki Tuomi escribió:


Can you please try again, with debugging symbols installed?


There it is

--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868889150
Fax: 86337
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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".
Type "show configuration" for configuration details.
Para las instrucciones de informe de errores, vea:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Leyendo símbolos desde /usr/lib/dovecot/lmtp...Leyendo símbolos desde /usr/lib/debug/.build-id/cd/860266c04866b036468daeece60e9fb1405ba0.debug...hecho.
hecho.
[Nuevo LWP 2644]
El núcleo se generó por «dovecot/lmtp».
Program terminated with signal SIGSEGV, Segmentation fault.
#0  i_stream_seek (stream=0x21, v_offset=v_offset@entry=0) at istream.c:298
298	istream.c: No existe el archivo o el directorio.
(gdb) bt full
#0  i_stream_seek (stream=0x21, v_offset=v_offset@entry=0) at istream.c:298
_stream = 
#1  0x7fcfac6c1d6f in i_stream_concat_read_next (cstream=0x563705e713b0) at istream-concat.c:77
prev_input = 0x563705e71270
data = 0x0
data_size = 0
size = 0
#2  i_stream_concat_read (stream=0x563705e713b0) at istream-concat.c:175
cstream = 0x563705e713b0
data = 0x0
size = 0
data_size = 0
cur_data_pos = 
new_pos = 
new_bytes_count = 
ret = -1
last_stream = 
__FUNCTION__ = "i_stream_concat_read"
#3  0x7fcfac6beb83 in i_stream_read (stream=0x563705e71420) at istream.c:174
_stream = 
old_size = 0
ret = 
__FUNCTION__ = "i_stream_read"
#4  0x7fcfac6c60ad in i_stream_sized_parent_read (stream=stream@entry=0x563705e90a10, 
pos_r=pos_r@entry=0x7ffe69489ec8) at istream-sized.c:54
ret = 
#5  0x7fcfac6c62ab in i_stream_sized_read (stream=0x563705e90a10) at istream-sized.c:84
data = {v_offset = 94794322348672, new_bytes = 140730664787904, 
  wanted_size = 140730664787896, eof = 236}
error = 
left = 
ret = 
pos = 0
__FUNCTION__ = "i_stream_sized_read"
#6  0x7fcfac6beb83 in i_stream_read (stream=stream@entry=0x563705e90a80) at istream.c:174
_stream = 
old_size = 0
ret = 
__FUNCTION__ = "i_stream_read"
#7  0x7fcfac6bf5cd in i_stream_read_data (stream=0x563705e90a80, 
data_r=data_r@entry=0x7ffe69489fb8, size_r=size_r@entry=0x7ffe69489fc0, 
threshold=threshold@entry=0) at istream.c:569
ret = 
read_more = false
__FUNCTION__ = "i_stream_read_data"
#8  0x7fcfac688a24 in lmtp_client_send_data (client=0x563705e71e78) at lmtp-client.c:333
data = 0x0
add = 0 '\000'
i = 
size = 0
sent_bytes = false
ret = 
#9  0x7fcfac68960e in lmtp_client_send_data (client=) at lmtp-client.c:330
sent_bytes = false
#10 lmtp_client_output (client=0x563705e71e78) at lmtp-client.c:662
ret = 1
#11 0x7fcfac6d61d8 in stream_send_io (fstream=0x563705e8be60) at ostream-file.c:473
ostream = 0x563705e8bef0
ret = 
#12 0x7fcfac6c89c2 in io_loop_call_io (io=0x563705e79420) at ioloop.c:599
ioloop = 0x563705e57740
t_id = 2
__FUNCTION__ = "io_loop_call_io"
---Type  to continue, or q  to quit---
#13 0x7fcfac6ca039 in io_loop_handler_run_internal (ioloop=ioloop@entry=0x563705e57740)
at ioloop-epoll.c:223
ctx = 0x563705e5d3b0
io = 
tv = {tv_sec = 599, tv_usec = 997477}
events_count = 
msecs = 
ret = 1
i = 0
j = 
call = 
__FUNCTION__ = "io_loop_handler_run_internal"
#14 0x7fcfac6c8a5c in io_loop_handler_run (ioloop=ioloop@entry=0x563705e57740) at ioloop.c:648
No locales.
#15 0x7fcfac6c8c08 in io_loop_run (ioloop=0x563705e57740) at ioloop.c:623
__FUNCTION__ = "io_loop_run"
#16 0x7fcfac650983 in master_service_run (service=0x563705e575e0, callback=)
at master-service.c:641
No locales.
#17 0x5637051d9d14 in main (argc=1, argv=0x563705e57390) at main.c:127
set_roots = {0x5637053e1180 , 
  0x5637053e0640 , 0x0}
service_flags = 
storage_service_flags = (MAIL_STORAGE_SERVICE_FLAG_DISALLOW_ROOT | MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP | 

Re: Example for doveadm-save using Doveadm HTTP API

2017-05-11 Thread Aki Tuomi


On 11.05.2017 00:36, KT Walrus wrote:
>> On May 10, 2017, at 5:16 PM, Sami Ketola  wrote:
>>
>>
>>> On 10 May 2017, at 16.26, KT Walrus  wrote:
 # curl -v -X POST -u doveadm:hellodoveadm -H "Content-Type: 
 application/json" -d 
 '[["save",{"user":"samik","mailbox":"INBOX/myfoldertoo","file":"From: 
 Joulu Pukki \nSubject: plaa\n\nmail 
 body\n"},"bb"]]' http://localhost:8080/doveadm/v1
>>> Thanks. I worry that by inlining the entire message in the curl command, 
>>> the message might exceed some limits on how long a command can be. Some of 
>>> my messages are up to 20MBs with the attachments and 1MB messages are very 
>>> common. I also worry about the raw message having unescaped quotes in the 
>>> message messing up to actual storage of the message in the INBOX. Are HTML 
>>> mail messages encoded to be safe to enclose in quotations? Or, should I 
>>> encode the entire mail message and trust that Dovecot can handle decoding 
>>> the message in the back end?
>>
>> The question is: why do you want to deliver 20MB messages with doveadm http 
>> api? I would not replace LMTP with that.
> I could certainly end up using SMTP/LMTP, but in my case I need complete 
> control over when, where, and how messages are delivered. The IMAP interface 
> gives me that control, but the Doveadm HTTP API seems easier and I can do 
> operations that span all users with this API. So, I don’t need to worry as 
> much about scaling (since I think IMAP is limited to one user at a time per 
> connection).
>
> If the Doveadm HTTP API isn’t mature enough or have a PHP interface (like 
> Roundcube gives me for IMAP), I may have to just go with IMAP or SMTP. SMTP 
> is a whole lot easier from PHP of my 3 options, but only handles new message 
> delivery and not the other admin actions I need to do. Eventually, I want to 
> hire some programmers to code my admin app in Go and move to a micro-services 
> architecture, but to start out, when scaling isn’t that important, I’m coding 
> the mail admin app in PHP (since Roundcube Framework gives me a lot of mail 
> handling classes that are mature and well tested).
>
> Kevin

There is no PHP interface. Roundcube is made with php, so it's not
really wonder there is.

The API is mature enough for it's use. doveadm save is not intended for
mail delivery function, it's more about dropping administrative or such
emails to user's box. It will not behave as delivery, that is, you won't
get sieve acting on those. quota is still imposed, though.

There are no size limits in the API, other than imposed by your system.
You can dump 20M email if you want, it will happily consume it.

Aki