Re: [Dovecot] Post-login script with LDAP virtual users

2011-04-16 Thread Fernando Silva
Hideo GOTO  eis.co.jp> writes:

> 
> (2011/02/07 20:44), Timo Sirainen wrote:
> > On 7.2.2011, at 12.24, Hideo GOTO wrote:
> >
> >> /var/log/maillog:
> >> Feb 7 17:45:58 pop3migr dovecot: pop3(vuser1): Post-login script denied
> >> access to user vuser1
> > The script finish isn't being done properly. I guess you're missing the exec
"$@" line?
> >
> Thanks a lot Timo for your prompt reply, which solved my problem!
> Indeed, I had omitted  exec "$@", where script-login was not executed.
> 
> Hideo GOTO
> 
> 

Hello,

Sorry for "stealing" your thread but I'm experiencing 
some problems similar to yours. I need a custom 
post-login, which is written in perl language. This
script was working fine with "dovecot 1.0-test59". 
Now I updated to "dovecot 2.0.12" and it stopped 
working, it gives me the following error in my 
dovecot.log: 
"imap(myuser01): Info: Post-login script denied 
access to user myuser01"
Through some debugging I realized that is the 
"exec $@" that's not working has intended, so I've 
created two script, one written in bash and 
another in perl. 

Bash Script:
#!/bin/sh
exec "$@"

Perl Script
#!/usr/bin/perl -w
exec('"$@"');

The thing is, the Bash script works and the Perl 
one doesn't, it comes the error stated above...
I think the problem could be from perl, for 
forking the process, but still I can't figure 
it out. 

Any ideas? 

Thanks,
Fernando 




Re: [Dovecot] calling dovecot exported auth from Java

2011-04-16 Thread WJCarpenter

On 4/15/2011 5:36 PM, WJCarpenter wrote:
I want to call dovecot's exported authentication from a Java 
application.  Java doesn't natively know how to talk to a Unix domain 
socket, so there are inconveniences.  There are 3rd party JNI 
libraries to allow Java to do it, but I'm not too wild about the idea 
of using JNI.  My current thinking is to rig up some kind of 
proxy/shuttle arrangement between a localhost TCP port and the dovecot 
auth Unix domain socket in the filesystem.  I'm looking at using the 
more or less standard tool "socat" to do that.  ('m on a mainstream 
Linux distribution.)


BTW, one workaround I thought of this situation was to connect to the 
POP3 port and do a normal POP3 login there.  That would be pretty easy, 
but it doesn't happen to work out for me.  My SQL-based login config 
factors in the service name provided by dovecot, and some of the Java 
app users might not be authorized for POP3 and/or IMAP4.  If I could 
figure out a way to run a second POP3 daemon with a different service 
name, that would probably work for me (but I don't see a way to do it 
... at least with dovecot 1.1.11 ... some some later dovecot version 
allow that?)




Re: [Dovecot] Debug new emails?

2011-04-16 Thread Beto Moreno
On Sat, Apr 16, 2011 at 8:57 AM, Charles Marcus
 wrote:
> On 2011-04-15 9:23 PM, Beto Moreno wrote:
>> I'm using Centos 5.4 Postfix 2.3.x Dovecot 1.0.x,but reading mail_log
>> plugin say that we need 1.2.x, can I still use this plugin or  I have
>> other options?
>
> I would strongly urge you to upgrade both postfix and dovecot -
>
> --
>
> Best regards,
>
> Charles
>

I already have my plan to upgrade next week.

But right now can I do something about or until I upgrade?

Because I try to update dovecot but yum didn't give me a new version
for dovecot, just postfix.

Thanks Charles for your input.


Re: [Dovecot] Debug new emails?

2011-04-16 Thread Charles Marcus
On 2011-04-15 9:23 PM, Beto Moreno wrote:
> I'm using Centos 5.4 Postfix 2.3.x Dovecot 1.0.x,but reading mail_log
> plugin say that we need 1.2.x, can I still use this plugin or  I have
> other options?

I would strongly urge you to upgrade both postfix and dovecot -

-- 

Best regards,

Charles


[Dovecot] LDA null logging patch

2011-04-16 Thread Joseph Tam


I don't really need logging of successful local deliveries since the MTA
provides enough data.  I can't get rid of LDA delivery logs by setting

deliver_log_format =

All this does is produce an empty log message e.g.

Apr 16 01:22:05 dserver dovecot: lda(user):

Timo, would you consider inclusion of this patch which will skip
logging deliveries if deliver_log_format is empty:

--- src/lib-lda/mail-deliver.c~ Sat Apr 16 01:27:23 2011
+++ src/lib-lda/mail-deliver.c  Sat Apr 16 01:29:05 2011
@@ -100,2 +100,5 @@

+   if (!(ctx->set->deliver_log_format) || !(*ctx->set->deliver_log_format))
+   return;
+
va_start(args, fmt);

Joseph Tam 


[Dovecot] doveadm mailbox status 2.0.12 crashes

2011-04-16 Thread Joseph Tam


My gdb won't cooperate and produce a backtrace so I hope this dbx stack
trace gives sufficient clues as to why it crashed.  It happended when
I was testing a doveadm command for a user which a large collection
of mboxs:

# dbx doveadm
(dbx) run mailbox status -u user messages \*
... long list ...
igel messages=1
INBOX messages=231
doveadm(user): Panic: Trying to deinit storage before freeing its 
objects
doveadm(user): Error: Raw backtrace: 0xff1bf0e4 -> 0xff1bf34c -> 0xff2a42a0 -> 0xff29d68c -> 
0xff29e494 -> 0xff2a7bc4 -> 0xff2a7e3c -> 0x16894 -> 0x169a0 -> 0x16e18 -> 0x17234 -> 0x17304 
-> 0x1c0a0 -> 0x1629c
signal ABRT (Abort) in __lwp_kill at 0xfefcd6ac
0xfefcd6ac: __lwp_kill+0x0008:  bcc,a,pt  %icc,__lwp_kill+0x18  ! 
0xfefcd6bc
Current function is default_fatal_finish
dbx: warning: can't find file "/build/dovecot-2.0.12/src/lib/failures.c"
(dbx) where
  [1] __lwp_kill(0x0, 0x6, 0x0, 0x6, 0xffbffeff, 0x0), at 0xfefcd6ac
  [2] raise(0x6, 0x0, 0x0, 0xfefacd88, 0x, 0x6), at 0xfef669ac
  [3] abort(0xff1ea980, 0x1, 0x0, 0xee4cc, 0xff0334d8, 0x0), at 
0xfef42010
=>[4] default_fatal_finish(type = LOG_TYPE_PANIC, status = 0), line 187 in 
"failures.c"
  [5] default_fatal_handler(ctx = 0xffbff598, format = (nil), args = 0xffbff600), 
line 201 in "failures.c"
  [6] i_panic(format = 0xff30d3b8 "Trying to deinit storage before freeing its 
objects", ...), line 259 in "failures.c"
  [7] mail_storage_unref(_storage = 0x6b9ec), line 379 in 
"mail-storage.c"
  [8] mail_namespace_free(ns = 0x6b9b8), line 52 in "mail-namespace.c"
  [9] mail_namespaces_deinit(_namespaces = 0x66efc), line 438 in 
"mail-namespace.c"
  [10] mail_user_deinit_base(user = 0x66ec0), line 28 in "mail-user.c"
  [11] mail_user_unref(_user = 0x55450), line 140 in "mail-user.c"
  [12] doveadm_mail_next_user(ctx = 0x55438, input = 0x55450, error_r = 
0xffbff8c4), line 221 in "doveadm-mail.c"
  [13] doveadm_mail_single_user(ctx = 0x55438, argv = 0xffbffc08, username = 0xffbffd1f 
"user", service_flags = -4196156), line 246 in "doveadm-mail.c"
  [14] doveadm_mail_cmd(cmd = 0x544f0, argc = 5, argv = 0xffbffc08), line 416 in 
"doveadm-mail.c"
  [15] doveadm_mail_try_run_multi_word(cmd = 0x544f0, cmdname = 0x2ade0 "status", 
argc = 6, argv = 0xffbffbf8), line 457 in "doveadm-mail.c"
  [16] doveadm_mail_try_run(cmd_name = 0xffbffd0d "mailbox", argc = 6, argv = 
0xffbffbf8), line 480 in "doveadm-mail.c"
  [17] main(argc = 6, argv = 0xffbffbf8), line 183 in "doveadm.c"

Joseph Tam 


Re: [Dovecot] coredump in dovecot 2.0.11

2011-04-16 Thread k b
Updating to 2.0.12 from the test repository made the trick, no more crashes. 
Thank you for all help!

--- On Fri, 4/15/11, Michal Hlavinka  wrote:

> From: Michal Hlavinka
> Subject: Re: [Dovecot] coredump in dovecot 2.0.11
> To: dovecot@dovecot.org
> Date: Friday, April 15, 2011, 8:31 AM
> On Tuesday, April 12, 2011 21:27:11 k
> b wrote:
> > Will check as soon as there is a package for fedora
> 14.
> > 
> Usually there is updated dovecot package in updates-testing
> 
> repository next working day after release, but it seems
> I've built 
> new package, but forgot to push it to repository.
> 
> I've pushed it to updates-testing repository just a few
> minutes ago. 
> It should be available within 24 hours, then you can update
> dovecot 
> using (as root):
> 
> yum update --enablerepo=updates-testing dovecot
> 
> I don't know what's the problem with abrt, I'll ask its
> maintainers
> 
> PS:for getting backtrace from gdb, you need core file (the
> one abrt deletes), 
> but that backtrace would be useless, you need to install
> debuginfo symbols first, using (as root):
> 
> debuginfo-install dovecot
>