[bug][Pigeonhole 0.4.10] Missing msgid

2015-12-15 Thread Alexander Moisseev

Pigeonhole 0.4.10 doesn't log msgid for some messages.

Dec 16 09:57:57 mx dovecot: lmtp(us...@example.com): EbLlL2gLcVYCBgEAPZa6/Q: sieve: 
msgid=<20151216065756.be1df1f...@cp.bitrix24.com>: forwarded to 

Dec 16 09:57:57 mx dovecot: lmtp(us...@example.com): EbLlL2gLcVYCBgEAPZa6/Q: 
sieve: stored mail into mailbox 'INBOX'
Dec 16 09:57:57 mx dovecot: lmtp(us...@example.com): FrLlL2gLcVYCBgEAPZa6/Q: sieve: 
msgid=<20151216065756.c77bb1f...@cp.bitrix24.com>: forwarded to 

Dec 16 09:57:57 mx dovecot: lmtp(us...@example.com): FrLlL2gLcVYCBgEAPZa6/Q: sieve: 
msgid=<20151216065756.c77bb1f...@cp.bitrix24.com>: stored mail into mailbox 
'bitrix'


And one more core-dump in imap:str.c str_append(cstr = NULL)

2015-12-15 Thread Peter Eriksson
Dovecot 2.2.20
Solaris 10 / x86
Maildir

q


(dbx) where
  [1] strlen(0x0, 0x0, 0x491baa, 0x0, 0x4d1ed0, 0x4d1ed0), at 
0xfd7ffeaf6dd0 
=>[2] str_append(str = 0x4a9120, cstr = (nil)), line 96 in "str.c"
  [3] client_get_commands_status(client = 0x4d16c0), line 282 in "imap-client.c"
  [4] client_log_disconnect(client = 0x4d16c0, reason = 0xfd7ffee24d80 
"Connection closed"), line 322 in "imap-client.c"
  [5] client_default_destroy(client = 0x4d16c0, reason = (nil)), line 336 in 
"imap-client.c"
  [6] client_destroy(client = 0x4d16c0, reason = (nil)), line 263 in 
"imap-client.c"
  [7] client_input(client = 0x4d16c0), line 1099 in "imap-client.c"
  [8] io_loop_call_io(io = 0x5073b0), line 559 in "ioloop.c"
  [9] io_loop_handler_run_internal(ioloop = 0x4b2580), line 211 in 
"ioloop-poll.c"
  [10] io_loop_handler_run(ioloop = 0x4b2580), line 607 in "ioloop.c"
  [11] io_loop_run(ioloop = 0x4b2580), line 583 in "ioloop.c"
  [12] master_service_run(service = 0x4b2450, callback = 0x482690 = 
&`imap`main.c`client_connected(struct master_service_connection *conn)), line 
640 in "master-service.c"
  [13] main(argc = 1, argv = 0xfd7fffdffcb8), line 442 in "main.c"
(dbx) frame 3
Current function is client_get_commands_status
  282   str_append(str, cmd->name);

  
(dbx) print *cmd
*cmd = {
prev= (nil)
next= (nil)
client  = 0x4d16c0
pool= 0x4d1eb0
tag = (nil)
name= (nil)
args= (nil)
cmd_flags   = 
func= (nil)
context = (nil)
module_contexts = {
arr  = {
buffer   = 0x4d1f80
element_size = 8U
}
v= 0x4d1f80
v_modifiable = 0x4d1f80
}
parser  = 0x4b8f90
state   = CLIENT_COMMAND_STATE_WAIT_INPUT
start_time  = {
tv_sec  = 0
tv_usec = 0
}
start_ioloop_wait_usecs = 0
running_usecs   = 0
bytes_in= 0
bytes_out   = 0
sync= (nil)
uid = 0
cancel  = 0
param_error = 0
search_save_result  = 0
search_save_result_used = 0
temp_executed   = 0
tagline_sent= 0
executing   = 0
}


(dbx) list
  280   str_append(str, " (");
  281   for (cmd = client->command_queue; cmd != NULL; cmd = cmd->next) 
{
  282   str_append(str, cmd->name);
  283   if (cmd->next != NULL)
  284   str_append_c(str, ',');
  285   running_usecs += cmd->running_usecs;
  286   bytes_in += cmd->bytes_in;
  287   bytes_out += cmd->bytes_out;
  288   last_cmd = cmd;
  289   }


Probably related to these entries in the syslog:

Dec 11 16:18:47 mail dovecot: [ID 583609 mail.info] imap-login: Login: 
user=, method=PLAIN, rip=81.233.116.192, lip=130.236.160.9, mpid=9238, 
TLS, session=
Dec 11 16:18:50 mail dovecot: [ID 583609 mail.info] imap(perje): Connection 
closed in=196 out=995
Dec 11 16:18:50 mail dovecot: [ID 583609 mail.info] imap(perje): Connection 
closed in=168 out=5683
Dec 11 16:18:50 mail dovecot: [ID 583609 mail.info] imap(perje): Connection 
closed in=168 out=4713
Dec 11 16:18:50 mail dovecot: [ID 583609 mail.info] imap(perje): Connection 
closed in=194 out=1016
Dec 11 16:18:50 mail dovecot: [ID 583609 mail.info] imap(perje): Connection 
closed in=182 out=970
Dec 11 16:18:50 mail dovecot: [ID 583609 mail.info] imap(perje): Connection 
closed in=193 out=895
Dec 11 16:18:50 mail dovecot: [ID 583609 mail.info] imap(perje): Connection 
closed in=196 out=995
Dec 11 16:18:50 mail dovecot: [ID 583609 mail.info] imap(perje): Connection 
closed in=184 out=894
Dec 11 16:18:51 mail dovecot: [ID 583609 mail.info] imap-login: Login: 
user=, method=PLAIN, rip=81.233.116.192, lip=130.236.160.9, mpid=9273, 
TLS, session=<1uJB16AmtOhR6X
TA>
Dec 11 16:18:52 mail dovecot: [ID 583609 mail.info] imap-login: Login: 
user=, method=PLAIN, rip=81.233.116.192, lip=130.236.160.9, mpid=9278, 
TLS, session=
Dec 11 16:18:52 mail dovecot: [ID 583609 mail.info] imap(perje): Connection 
closed in=150 out=491
Dec 11 16:23:08 mail dovecot: [ID 583609 mail.info] imap-login: Login: 
user=, method=PLAIN, rip=130.236.172.166, lip=130.236.160.9, mpid=10796, 
TLS, session=
Dec 11 16:23:08 mail dovecot: [ID 583609 mail.info] imap-login: Login: 
user=, method=PLAIN, rip=130.236.172.166, lip=130.236.160.9, mpid=10803, 
TLS, session=
Dec 11 16:23:08 mail dovecot: [ID 583609 mail.info] imap(perje): Connection 
closed in=150 out=491
Dec 11 16:23:13 mail dovecot: [ID 583609 mail.info] imap(perje): Connection 
closed in=150 out=491
Dec 11 16:24:10 mail dovecot: [ID

Assert failure in 2.2.20: imap-fetch.c:554 (ctx->client->output_cmd_lock || ctx->client->output_cmd_lock == cmd)

2015-12-15 Thread Peter Eriksson
Just got another core-dump from Dovecot's imap process on our mail server.

Dovecot 2.2.20
Solaris 10 / x86
Maildir


Output from syslog:

Dec 14 10:58:12 mail dovecot: [ID 583609 mail.crit] imap(oling): Panic: file 
imap-fetch.c: line 554: assertion failed: (ctx->client->output_cmd_lock == NULL 
|| ctx->client->output_cmd_lock == cmd)
Dec 14 10:58:15 mail dovecot: [ID 583609 mail.crit] imap(oling): Fatal: master: 
service(imap): child 2167 killed with signal 6 (core dumped)


Checked the users' Maildir for files modified around this time and found:

-rw---   1 olingroot   15743 Dec 14 10:54 .Deleted 
Messages/cur/1450099463.M318113P13582.mail,S=15743,W=16026:2,RSbcd

Don't know if it's related though.



Data from the core-dump / debugger:

# /pkg/studio/default/bin/dbx /ifm/pkg/dovecot/default/libexec/dovecot/imap 
imap.2167.306
...
program terminated by signal ABRT (Abort)
0xfd7ffeb81eca: __lwp_kill+0x000a:  jae  __lwp_kill+0x18[ 
0xfd7ffeb81ed8, .+0xe ]
Current function is default_fatal_finish
  201   abort();
  
(dbx) where  
  [1] __lwp_kill(0x1, 0x6, 0xfe88d2948e40, 0xfd7ffeb827be, 
0x4552555443, 0x0), at 0xfd7ffeb81eca 
  [2] _thr_kill(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfd7ffeb7a7d3 
  [3] raise(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfd7ffeb26fe9 
  [4] abort(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfd7ffeb05f60 
=>[5] default_fatal_finish(type = LOG_TYPE_PANIC, status = 0), line 201 in 
"failures.c"
  [6] i_internal_fatal_handler(ctx = 0xfd7fffdff858, format = 0x492df0 
"file %s: line %d: assertion failed: (%s)", args = 0xfd7fffdff840), line 
670 in "failures.c"
  [7] i_panic(format = 0x492df0 "file %s: line %d: assertion failed: (%s)", ... 
= 0x467f4f, ...), line 275 in "failures.c"
  [8] imap_fetch_more(ctx = 0x736b00, cmd = 0x7369a8), line 554 in 
"imap-fetch.c"
  [9] cmd_fetch(cmd = 0x7369a8), line 297 in "cmd-fetch.c"
  [10] command_exec(cmd = 0x7369a8), line 172 in "imap-commands.c"
  [11] client_command_input(cmd = 0x7369a8), line 948 in "imap-client.c"
  [12] client_command_input(cmd = 0x7369a8), line 1008 in "imap-client.c"
  [13] client_handle_next_command(client = 0x4d16c0, remove_io_r = 
0xfd7fffdffa7d), line 1022 in "imap-client.c"
  [14] client_handle_input(client = 0x4d16c0), line 1058 in "imap-client.c"
  [15] client_input(client = 0x4d16c0), line 1105 in "imap-client.c"
  [16] io_loop_call_io(io = 0x5bab00), line 559 in "ioloop.c"
  [17] io_loop_handler_run_internal(ioloop = 0x4b2580), line 211 in 
"ioloop-poll.c"
  [18] io_loop_handler_run(ioloop = 0x4b2580), line 607 in "ioloop.c"
  [19] io_loop_run(ioloop = 0x4b2580), line 583 in "ioloop.c"
  [20] master_service_run(service = 0x4b2450, callback = 0x482690 = 
&`imap`main.c`client_connected(struct master_service_connection *conn)), line 
640 in "master-service.c"
  [21] main(argc = 1, argv = 0xfd7fffdffcb8), line 442 in "main.c"

(dbx) print cmd
cmd = 0x7369a8

(dbx) print ctx->client->output_cmd_lock   
ctx->client->output_cmd_lock = 0x72e0f8

(dbx) print *cmd
*cmd = {
prev= (nil)
next= 0x72e0f8
client  = 0x4d16c0
pool= 0x4d1eb0
tag = 0x736ac0 "150.11"
name= 0x736ac8 "UID FETCH"
args= 0x736ad8 "12663:12665 (BODY.PEEK[] BODYSTRUCTURE)"
cmd_flags   = COMMAND_FLAG_BREAKS_SEQS
func= 0x437220 = &cmd_fetch(struct 
client_command_context *cmd)
context = (nil)
module_contexts = {
arr  = {
buffer   = 0x736a58
element_size = 8U
}
v= 0x736a58
v_modifiable = 0x736a58
}
parser  = 0x4d3d40
state   = CLIENT_COMMAND_STATE_WAIT_INPUT
start_time  = {
tv_sec  = 1450087092
tv_usec = 924042
}
start_ioloop_wait_usecs = 119688401U
running_usecs   = 0
bytes_in= 0
bytes_out   = 0
sync= (nil)
uid = 1U
cancel  = 0
param_error = 0
search_save_result  = 0
search_save_result_used = 0
temp_executed   = 0
tagline_sent= 0
}


(dbx) print *(ctx->client->output_cmd_lock)
*ctx->client->output_cmd_lock = {
prev= 0x7369a8
next= 0x72d8c8
client  = 0x4d16c0
pool= 0x4d1eb0
tag = 0x72e208 "149.11"
name= 0x72e210 "UID FETCH"
args= 0x72e220 "12666 (BODY.PEEK[] BODYSTRUCTURE)"
cmd_flags   = COMMAND_FLAG_BREAKS_SEQS
func= 0x4371b0 = 
&`imap`cm

Re: Dovecot SASL and GSSAPI (IPA)

2015-12-15 Thread Ranbir
On Mon, 2015-12-14 at 17:53 -0500, Ranbir wrote:
> Is it possible in Dovecot to translate the mail address lookup from
> postfix into just a "uid" search? If I could do that, Dovecot would
> find "ranbir" and report back to postfix the user exists.

I sent this and then realized I could just strip the domain in Dovecot
with "auth_username_format = %Ln". Doh!

Anyway, I figured it all out. I now have my IPA joined Dovecot +
Postfix system using GSSAPI and PLAIN. The passwd database is using pam
(i.e. sss) and the user database is configured to use password-file. I
stuck with the password-file for the userdb because it was simply much
easier to add the mail location for my public imap folders to it than
adding them to my IPA server which would have required me to extend the
LDAP schema. I've struggled enough as it is! :P

-- 
Ranbir


signature.asc
Description: This is a digitally signed message part


Re: Ideas needed for archiving

2015-12-15 Thread Ben

On 15/12/2015 14:08, Piotr Pies Ostrowski wrote:

On Tue, Dec 15, 2015 at 11:50:06AM +, Ben wrote:

I've been asked by a user whether it's possible to stop their IMAP client
downloading messages older than a given date.

Whilst I'm guessing it may well be possible to do this client-side using
folders and subscriptions, it got me thinking  is there a way to do this
server side on dovecot ?  i.e. is there a way to "hide" messages from a user
without having to archive them off into a seperate account ?


Sounds like virtual folders - create virtual folder with contains only
messages fullfiling criteria, maybe hide somehow original folder, let
user subscribe virtual folder.
http://wiki2.dovecot.org/Plugins/Virtual

Pies



Interesting, will look into that.  First time I've heard about virtual 
folders !


Re: Ideas needed for archiving

2015-12-15 Thread Piotr Pies Ostrowski
On Tue, Dec 15, 2015 at 11:50:06AM +, Ben wrote:
> I've been asked by a user whether it's possible to stop their IMAP client
> downloading messages older than a given date.
> 
> Whilst I'm guessing it may well be possible to do this client-side using
> folders and subscriptions, it got me thinking  is there a way to do this
> server side on dovecot ?  i.e. is there a way to "hide" messages from a user
> without having to archive them off into a seperate account ?

Sounds like virtual folders - create virtual folder with contains only
messages fullfiling criteria, maybe hide somehow original folder, let
user subscribe virtual folder.
http://wiki2.dovecot.org/Plugins/Virtual

Pies


Ideas needed for archiving

2015-12-15 Thread Ben
I've been asked by a user whether it's possible to stop their IMAP 
client downloading messages older than a given date.


Whilst I'm guessing it may well be possible to do this client-side using 
folders and subscriptions, it got me thinking  is there a way to do 
this server side on dovecot ?  i.e. is there a way to "hide" messages 
from a user without having to archive them off into a seperate account ?


thanks