Re: [Dovecot] %{session} does not work with deliver_log_format

2013-04-16 Thread Daniel Parthey
Timo Sirainen wrote:
> On 25.2.2013, at 23.34, Daniel Parthey 
>  wrote:
> 
> >> LMTP has a completely different session ID currently, which gets reset for 
> >> each mail delivery and is written to the Received: header that it writes.
> >> It doesn't traverse through proxies, because each delivery gets a 
> >> different ID anyway.
> >> 
> >> So .. Why is it that you want this? For matching a log line with a 
> >> Received:
> >> header? I guess that could be done, but the name should probably be 
> >> different
> >> from %{session} so it won't get mixed up with what IMAP/POP3 uses it for.
> > 
> > I simply run an LMTP director/proxy to prevent NFS locking issues
> > and in error cases I want to investigate where the mail has gone
> > (through the director lmtp to the mailbox lmtp). I thought this
> > is what "session IDs" were intended for.
> 
> The SMTP server should log the delivery ID that the backend generates, and 
> you should be able to grep for it, right?

Ah ok, that's totally fine. I didn't expect the ID to be the "backend" IP :)

> > Obviously, the generated ID is a different one for director and mailbox,
> > looking at the Received: lines of a single message:
> > 
> > Received: from mail01.example.org ([10.129.3.193])
> >  by mail01.example.org (Dovecot) with LMTP id vdSeD+CrK1HXZQAAiWCYmA
> >  ; Mon, 25 Feb 2013 19:25:02 +0100
> > Received: from mx01.example.org ([127.0.0.1])
> >  by mail01.example.org (Dovecot) with LMTP id fu7aIn6sK1EMaQAAiWCYmA
> >  ; Mon, 25 Feb 2013 19:25:02 +0100
> > 
> > What would you suggest how to track an LMTP delivery through a
> > director proxy? Should one use the MessageID to correlate the
> > lmtp log entries in dovecot-director.log and dovecot.log?
> 
> I was first thinking about having LMTP proxy log the delivery ID, until I
> noticed that LMTP proxy doesn't log anything about delivered mails currently.
> I'm not really sure if that would be of any actual help?

Currently our lmtp proxy logs the following:

dovecot: lmtp(3538): Debug: none: root=, index=, control=, inbox=, alt=
dovecot: lmtp(3538): Connect from 127.0.0.1
dovecot: lmtp(3538): Debug: auth input: user=u...@example.org proxy 
proxy_timeout=120 port=19024 host=10.129.3.193 proxy_refresh=86400
dovecot: lmtp(3538): Disconnect from 127.0.0.1: Client quit (in reset)

In combination with syslog timestamp, this is enough information
to track the user/backend assignment in the director, 
also shown by doveadm director status u...@example.org.

Regards
Daniel
-- 
https://plus.google.com/103021802792276734820


Re: [Dovecot] Moving mail servers, moving mailboxes

2013-04-16 Thread Michael

Hi,  I don't think dsync works between 1.x and 2.x.

I have migrated a few of my clients exchange servers to my dovecot 
servers and I always find LARCH https://github.com/rgrove/larch works 
really well.


Michael.


On 17/04/2013 2:59 PM, Gregory Sloop wrote:

I hate to bug anyone about this again, but I'm really unsure of how best to
proceed.

If someone could point me in a good direction - a web-link or link to
a relevant listserv thread - I'd really appreciate it.

Some additional searches have given me _some_ new ideas.
  - I've seen about dsync - but it appears that would only help between
two v2.x Postfix machines, correct? [Or will it pull from 1.x to 2.x
without an issue?]

TIA

-Greg

GS> So, I've done some searching - but search terms are hard to come by,
GS> that work, for this query.

GS> In short, migrating a RHEL 5.9 server running the back-ported Dovecot 1.0.7
GS> To: Ububtu 12.04 with 2.0.19, I believe.

GS> [I'm not against compiling a more recent version if there's some real
GS> advantage to doing so. But I'd certainly prefer to stay with the
GS> packaged version.]

GS> Most users are POP3, with some leaving messages on the server for a
GS> while.

GS> Other users are IMAP - whole mail repository on server.

GS> ---
GS> In an ideal world, I'd like to simply copy all the mailboxes/dirs from one
GS> server to the other. [Local/LAN file copies are possible]

GS> It would be great if the message ID's wouldn't change, so the
GS> read/unread/new etc status all all the messages wouldn't change
GS> between the two servers for POP/IMAP.

GS> ---
GS> So, does anyone have a reasonable walk-through for doing so?
GS> Is this a poor idea?
GS> Should I simply set myself on fire now and save everyone a lot of hassle? :)
GS> Would you suggest an alternative, and tell me if it might achieve the
GS> objectives above?

GS> I'm more than glad to take pointers to threads on this topic. I just
GS> haven't been able to dredge this up with my Google-foo.

GS> TIA
GS> -Greg



--
Regards, Michael.


Re: [Dovecot] Moving mail servers, moving mailboxes

2013-04-16 Thread Gregory Sloop
I hate to bug anyone about this again, but I'm really unsure of how best to
proceed.

If someone could point me in a good direction - a web-link or link to
a relevant listserv thread - I'd really appreciate it.

Some additional searches have given me _some_ new ideas.
 - I've seen about dsync - but it appears that would only help between
two v2.x Postfix machines, correct? [Or will it pull from 1.x to 2.x
without an issue?]

TIA

-Greg

GS> So, I've done some searching - but search terms are hard to come by,
GS> that work, for this query.

GS> In short, migrating a RHEL 5.9 server running the back-ported Dovecot 1.0.7
GS> To: Ububtu 12.04 with 2.0.19, I believe.

GS> [I'm not against compiling a more recent version if there's some real
GS> advantage to doing so. But I'd certainly prefer to stay with the
GS> packaged version.]

GS> Most users are POP3, with some leaving messages on the server for a
GS> while.

GS> Other users are IMAP - whole mail repository on server.

GS> ---
GS> In an ideal world, I'd like to simply copy all the mailboxes/dirs from one
GS> server to the other. [Local/LAN file copies are possible]

GS> It would be great if the message ID's wouldn't change, so the
GS> read/unread/new etc status all all the messages wouldn't change
GS> between the two servers for POP/IMAP.

GS> ---
GS> So, does anyone have a reasonable walk-through for doing so?
GS> Is this a poor idea?
GS> Should I simply set myself on fire now and save everyone a lot of hassle? :)
GS> Would you suggest an alternative, and tell me if it might achieve the
GS> objectives above?

GS> I'm more than glad to take pointers to threads on this topic. I just
GS> haven't been able to dredge this up with my Google-foo.

GS> TIA
GS> -Greg




Re: [Dovecot] dovecot-2.2 Warning: autocreate plugin is deprecated, use mailbox { auto } setting instead

2013-04-16 Thread Emmanuel Dreyfus
Oli Schacher  wrote:

> http://wiki2.dovecot.org/MailboxSettings

I am not sure on how to make it fit at mine. doveconf -n says this:

mail_location = mbox:~/mail:INBOX=/var/mail/%u:INDEX=/mail/indexes/%u:
SUBSCRIPTIONS=../.mailboxlist
(...)
plugin { 
  autocreate = INBOX
  autosubscribe = INBOX
  quota = fs:User quota
  quota_warning = storage=95%% quota-warning %u
}

What should I have instead? Something like this?

mail_location = mbox:~/mail:INBOX=/var/mail/%u:INDEX=/mail/indexes/%u:
SUBSCRIPTIONS=../.mailboxlist
(...)
plugin { 
  autosubscribe = INBOX
  quota = fs:User quota
  quota_warning = storage=95%% quota-warning %u
}

namespace inbox {
  mailbox INBOX {
auto = create
  }
}


-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
m...@netbsd.org


Re: [Dovecot] dovecot-2.2 Warning: autocreate plugin is deprecated, use mailbox { auto } setting instead

2013-04-16 Thread Oli Schacher
Am Wed, 17 Apr 2013 03:02:03 +0200
schrieb m...@netbsd.org (Emmanuel Dreyfus):

> Hi
> 
> After upgrading to 2.2, I get this:
> Warning: autocreate plugin is deprecated, use mailbox { auto } setting
> instead
> 
> I found no documentation on mailbox { auto }. Where should it go in
> the config file?
> 
> 

http://wiki2.dovecot.org/MailboxSettings


[Dovecot] dovecot-2.2 Warning: autocreate plugin is deprecated, use mailbox { auto } setting instead

2013-04-16 Thread Emmanuel Dreyfus
Hi

After upgrading to 2.2, I get this:
Warning: autocreate plugin is deprecated, use mailbox { auto } setting
instead

I found no documentation on mailbox { auto }. Where should it go in the
config file?


-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
m...@netbsd.org


Re: [Dovecot] Dovecot 2.1.16: Quota plugin compile fails: Solaris 10

2013-04-16 Thread Joseph Tam

Stephen Usher writes:


quota-status.c: In function `main':
quota-status.c:200: error: `optarg' undeclared (first use in this function)
...
It seems that the following C standard header files need to be included in
quota-status.c:

#include 
#include 
#include 


It was mentioned a few weeks back (check the archives), but you only need
one of them (which may include the others).  My patch to cope with this

--- a/src/plugins/quota/quota-status.c  Sat Apr 13 02:18:40 2013
+++ b/src/plugins/quota/quota-status.c  Sat Apr 13 02:18:56 2013
@@ -14,0 +14,1 @@
+#include 

This worked for me.

Joseph Tam 


Re: [Dovecot] Dovecot 2.2.0 compile error

2013-04-16 Thread Timo Sirainen
On 17.4.2013, at 1.27, Peter Wagner  wrote:

 make[6]: Entering directory 
 `/mnt/data/Develop/Openwrt/trunk_git/build_dir/target-mips_r2_uClibc-0.9.33.2/dovecot-2.2.0/src/util'
 /bin/sh ../../libtool --tag=CC   --mode=link mips-openwrt-linux-uclibc-gcc 
  -std=gnu99 -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves 
 -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable 
 -msoft-float  -Wall -W -Wmissing-prototypes -Wmissing-declarations 
 -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast 
 -fno-builtin-strftime -Wstrict-aliasing=2 
 -I/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
  -no-undefined -Wl,--as-needed 
 -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib
  
 -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/lib
  
 -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib
  
 -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib
   -o gdbhelper gdbhelper.o
> the weired thing is, when i build it with --without-shared-libs
> the program builds fine and works. How can i find out why this works
> but using shard-libs doesn't?

Probably specific to the mips/linaro/something tools that you're using. Have 
you tried that v2.1 still compiles? The best way to figure out why it works and 
v2.2 doesn't would be to find the specific commit from v2.2 that broke it. 
http://mercurial.selenic.com/wiki/BisectExtension could make finding that 
easier.



Re: [Dovecot] Dovecot 2.2.0 compile error

2013-04-16 Thread Peter Wagner
On Tue, 16 Apr 2013 19:34:02 +0200
Peter Wagner  wrote:

> On Tue, 16 Apr 2013 18:07:51 +0300
> Timo Sirainen  wrote:
> 
> > On 16.4.2013, at 17.55, rauchwo...@gmx.net wrote:
> > 
> > > i tried to compile dovecot 2.2.0 and i end up with this error:
> > > 
> > > make[6]: Entering directory 
> > > `/mnt/data/Develop/Openwrt/trunk_git/build_dir/target-mips_r2_uClibc-0.9.33.2/dovecot-2.2.0/src/util'
> > > /bin/sh ../../libtool --tag=CC   --mode=link 
> > > mips-openwrt-linux-uclibc-gcc  -std=gnu99 -Os -pipe -mips32r2 
> > > -mtune=mips32r2 -fno-caller-saves -mno-branch-likely -fhonour-copts 
> > > -Wno-error=unused-but-set-variable -msoft-float  -Wall -W 
> > > -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith 
> > > -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime 
> > > -Wstrict-aliasing=2 
> > > -I/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
> > >  -no-undefined -Wl,--as-needed 
> > > -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib
> > >  
> > > -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/lib
> > >  
> > > -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib
> > >  
> > > -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib
> > >   -o gdbhelper gdbhelper.o
> > 
> > So it's failing only at gdbhelper. Why there and not earlier?..
> 
> I don't know.
> 
> > 
> > > ../../src/lib-dovecot/.libs/libdovecot.so:(.got+0x0): multiple definition 
> > > of `_GLOBAL_OFFSET_TABLE_'
> > 
> > Does it have it multiple times?
> 
> No only once. i attached the last 1000 lines of the output.
> 
> > 
> > nm src/lib-dovecot/.libs/libdovecot.so | grep _GLOBAL_OFFSET_TABLE_
> 
> nm src/lib-dovecot/.libs/libdovecot.so | grep _GLOBAL_OFFSET_TABLE_
> 000b4d00 A _GLOBAL_OFFSET_TABLE_
> 
> > 
> > > Version 2.1.16 compiled fine. How can i fix this linker error?
> > 
> > No idea.
> > 


the weired thing is, when i build it with --without-shared-libs
the program builds fine and works. How can i find out why this works
but using shard-libs doesn't?

with kind regards
Peter


[Dovecot] Dovecot 2.1.16: Mail server input error: UPDATE-SESSION pop3: stats shrank

2013-04-16 Thread Daniel Parthey
Daniel Parthey wrote:
> Timo Sirainen wrote:
> > On 27.11.2012, at 23.47, Daniel Parthey wrote:
> > > Can you fix these strange stats plugin errors please?
> > > These are the only errors regularly occurring in our 2.1.10 logs:
> > > 
> > > Nov 27 08:06:54 10.129.3.249 dovecot: stats: Error: Mail server input 
> > > error: UPDATE-SESSION: stats shrank: mlpath 429 < 622
> > > Nov 27 08:07:06 10.129.3.249 dovecot: stats: Error: Mail server input 
> > > error: UPDATE-SESSION: stats shrank: mlpath 436 < 622
> > 
> > It's strange that I can't figure out how to reproduce this no matter what I 
> > do. Could you with latest hg, especially:
> > http://hg.dovecot.org/dovecot-2.1/rev/c81f1ca3cda6
> > and also the attached patch, which simplifies the stats plugin?
> 
> Yes, version 2.1.13 plus the simplification patch fixes the problem.
> Please apply :)

Version 2.1.16 logs the following error:

Apr 16 18:07:58 10.129.3.249 dovecot: stats: Error: Mail server input error: 
UPDATE-SESSION us...@example.org pop3: stats shrank: mlpath 1 < 2
Apr 16 18:46:44 10.129.3.233 dovecot: stats: Error: Mail server input error: 
UPDATE-SESSION us...@example.org pop3: stats shrank: mlpath 3 < 4

Were there any reasons NOT to apply stats.diff the 2.1.x branch or did you 
simply overlook my mail?

Regards
Daniel
-- 
https://plus.google.com/103021802792276734820
diff -r c81f1ca3cda6 src/plugins/stats/stats-plugin.c
--- a/src/plugins/stats/stats-plugin.c	Wed Nov 28 04:29:58 2012 +0200
+++ b/src/plugins/stats/stats-plugin.c	Wed Nov 28 04:30:03 2012 +0200
@@ -55,8 +55,6 @@
 static int proc_io_fd = -1;
 
 static struct stats_connection *global_stats_conn = NULL;
-static struct mail_user *stats_global_user = NULL;
-static unsigned int stats_user_count = 0;
 
 static void session_stats_refresh_timeout(struct mail_user *user);
 
@@ -188,16 +186,7 @@
 	struct mail_user *user = context;
 	struct stats_user *suser = STATS_USER_CONTEXT(user);
 
-	if (stats_user_count == 1) {
-		/* the first user sets the global user. the second user sets
-		   it to NULL. when we get back to one user we'll need to set
-		   the global user again somewhere. do it here. */
-		stats_global_user = user;
-	} else {
-		i_assert(stats_global_user == NULL);
-
-		mail_stats_get(suser, &suser->pre_io_stats);
-	}
+	mail_stats_get(suser, &suser->pre_io_stats);
 }
 
 static void timeval_add_diff(struct timeval *dest,
@@ -489,8 +478,6 @@
 
 static void session_stats_refresh_timeout(struct mail_user *user)
 {
-	if (stats_global_user != NULL)
-		stats_add_session(user);
 	session_stats_refresh(user);
 }
 
@@ -500,13 +487,10 @@
 	struct stats_user *suser = STATS_USER_CONTEXT(user);
 	unsigned int last_update_secs;
 
-	if (stats_global_user == NULL)
-		stats_add_session(user);
+	stats_add_session(user);
 
 	last_update_secs = time(NULL) - suser->last_session_update;
 	if (last_update_secs >= suser->refresh_secs) {
-		if (stats_global_user != NULL)
-			stats_add_session(user);
 		session_stats_refresh(user);
 	} else if (suser->to_stats_timeout == NULL) {
 		suser->to_stats_timeout =
@@ -520,16 +504,6 @@
 	struct stats_user *suser = STATS_USER_CONTEXT(user);
 	struct stats_connection *stats_conn = suser->stats_conn;
 
-	i_assert(stats_user_count > 0);
-	if (--stats_user_count == 0) {
-		/* we were updating the session lazily. do one final update. */
-		i_assert(stats_global_user == user);
-		stats_add_session(user);
-		stats_global_user = NULL;
-	} else {
-		i_assert(stats_global_user == NULL);
-	}
-
 	io_loop_context_remove_callbacks(suser->ioloop_ctx,
 	 stats_io_activate,
 	 stats_io_deactivate, user);
@@ -582,21 +556,6 @@
 	}
 	stats_connection_ref(global_stats_conn);
 
-	if (stats_user_count == 0) {
-		/* first user connection */
-		stats_global_user = user;
-	} else if (stats_user_count == 1) {
-		/* second user connection. we'll need to start doing
-		   per-io callback tracking now. (we might have been doing it
-		   also previously but just temporarily quickly dropped to
-		   having 1 user, in which case stats_global_user=NULL) */
-		if (stats_global_user != NULL) {
-			stats_add_session(stats_global_user);
-			stats_global_user = NULL;
-		}
-	}
-	stats_user_count++;
-
 	suser = p_new(user->pool, struct stats_user, 1);
 	suser->module_ctx.super = *v;
 	user->vlast = &suser->module_ctx.super;
# 2.1.16: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-46-server x86_64 Ubuntu 10.04.4 LTS 
auth_cache_negative_ttl = 0
auth_cache_size = 10 M
auth_cache_ttl = 1 mins
auth_verbose = yes
auth_verbose_passwords = sha1
deliver_log_format = mailbox: deliver: session=<%{session}> msgid=%m from=%f: %$
dict {
  quota = mysql:/etc/dovecot/conf.d/dovecot-dict-sql.conf.ext
}
disable_plaintext_auth = no
doveadm_password = xxx
imapc_features = rfc822.size
imapc_host = local-mailbox
imapc_port = 18143
instance_name = dovecot-mailbox
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
login_greeting = Mailbox
login_log_format = mailbox: login: %$: %s
login_trusted_networks = 10.129

Re: [Dovecot] Small documentation error?

2013-04-16 Thread Axel Luttgens
Le 16 avr. 2013 à 21:01, Timo Sirainen a écrit :

> On 16.4.2013, at 20.45, Axel Luttgens wrote:
> 
>> Hello,
>> 
>> At http://wiki2.dovecot.org/MailboxFormat/mbox:
>> 
>>  The UID for a new message is calculated from "last used UID" in
>>  X-IMAP header + 1
>> 
>> Shouldn't it read "in X-UID header + 1" instead?
> 
> No. Either X-IMAP: or X-IMAPbase: header.

Hello Timo,

Yes, sorry for the noise...

Thanks,
Axel

Re: [Dovecot] dovecot index errors since 2.1.12 [SOLVED with 2.1.16]

2013-04-16 Thread Daniel Parthey
Timo Sirainen wrote:
> On 14.1.2013, at 17.16, Daniel Parthey 
>  wrote:
> 
> > Last week we upgraded to 2.1.13 and since then we encountered the same 
> > issues as
> > Morten Stevens. We got a lot of error messages with corrupt index cache
> > and FETCH errors: So we had to roll back to dovecot 2.1.10. Now the errors 
> > are gone.
> > 
> > Jan 12 16:48:35 10.129.3.233 dovecot: mailbox: mail: 
> > imap(us...@example.org): : Error: Cached message size 
> > larger than expected (5194 > 4399)
> 
> Does reverting this change also fix it for you? 
> http://hg.dovecot.org/dovecot-2.1/rev/6c1b4b9f527c

Yes, I can confirm 2.1.16 to be running smoothly without any cache issues.
Thanks, Timo!

> I guess you're using only LMTP to deliver mails?

Yes, LMTP director proxy only.

> How many CPU cores do you have?

2 CPU cores on each of the 4 machines.

Regards
Daniel
-- 
https://plus.google.com/103021802792276734820


Re: [Dovecot] v2.2.0 released

2013-04-16 Thread Timo Sirainen
On 15.4.2013, at 19.16, Timo Sirainen  wrote:

> On 15.4.2013, at 18.55, l...@airstreamcomm.net wrote:
> 
>> Does the new obox plugin support any of the open source object storage 
>> systems such as openstack, glusterfs, or ceph?  From your store site it does 
>> not appear so.
> 
> Openstack Swift support is coming. There's a half-working version of it 
> already, would need just a day or two to finish it up.

BTW. This is also done now, although not heavily tested yet.



Re: [Dovecot] v2.2.0 released

2013-04-16 Thread Timo Sirainen
On 16.4.2013, at 19.30, l...@airstreamcomm.net wrote:

> On 4/15/13 11:16 AM, Timo Sirainen wrote:
>> On 15.4.2013, at 18.55, l...@airstreamcomm.net wrote:
>> 
>>> Does the new obox plugin support any of the open source object storage 
>>> systems such as openstack, glusterfs, or ceph?  From your store site it 
>>> does not appear so.
>> Glusterfs isn't really object storage (unless they've changed since I last 
>> looked at them), and it already more or less works with Dovecot using the 
>> existing mailbox formats. Except last I heard it still caused index file 
>> corruption.
>> 
>> Openstack Swift support is coming. There's a half-working version of it 
>> already, would need just a day or two to finish it up.
>> 
>> I haven't looked at Ceph closely yet, but it would be nice to support it as 
>> well.
>> 
>> obox can also be used with a regular POSIX filesystem, although it loses the 
>> prefetching capabilities then. So it could be used with e.g. Glusterfs or 
>> NFS to provide an efficient local cache. I've also thought about trying out 
>> if prefetching could be done by creating new "diskio" processes with a ton 
>> of threads doing the actual disk I/O.
>> 
>> 
> 
> Timo, Riak CS is S3 compatible.  Just curious if you have tested with Riak CS 
> (especially the multi-data center implementation).

I've only tested it against Amazon S3. But if it's fully API compatible, I 
don't see why it wouldn't work.. 



Re: [Dovecot] Small documentation error?

2013-04-16 Thread Timo Sirainen
On 16.4.2013, at 20.45, Axel Luttgens  wrote:

> Hello,
> 
> At http://wiki2.dovecot.org/MailboxFormat/mbox:
> 
>   The UID for a new message is calculated from "last used UID" in
>   X-IMAP header + 1
> 
> Shouldn't it read "in X-UID header + 1" instead?

No. Either X-IMAP: or X-IMAPbase: header.



[Dovecot] Running LMTP as a user other than the root user

2013-04-16 Thread Axel Luttgens
Hello,

With this one in Postfix' main.cf:

virtual_transport = lmtp:unix:/_ROOT/var/run/dovecot/lmtp

and Dovecot settings reproduced at the end of this message, there is no problem 
for having mail delivered into a user's INBOX.

But as soon as I try the security improvement suggested in the docs:

service lmtp {  
user = dovemailer
}

this is what I get in the logs:

postfix/smtpd[52588]: connect from localhost[127.0.0.1]
postfix/smtpd[52588]: E86B5BD2BA0: client=localhost[127.0.0.1]
postfix/cleanup[52594]: E86B5BD2BA0: 
message-id=<20130416171203.E86B5BD2BA0@ALMba.local>
postfix/qmgr[88232]: E86B5BD2BA0: from=, size=315, 
nrcpt=1 (queue active)
dovecot[52568]: lmtp(52596): Debug: none: root=, index=, control=, 
inbox=, alt=
dovecot[52568]: lmtp(52596): Connect from local
dovecot[52568]: lmtp(52596): Debug: Loading modules from directory: 
/_ROOT/dovecot-2.1.16-0.3.4/lib/dovecot
dovecot[52568]: lmtp(52596): Debug: Module loaded: 
/_ROOT/dovecot-2.1.16-0.3.4/lib/dovecot/lib10_quota_plugin.so
dovecot[52568]: auth: Error: userdb(t...@example.com): client doesn't 
have lookup permissions for this user: userdb reply doesn't contain uid (to 
bypass this check, set: service auth { unix_listener 
/_ROOT/var/run/dovecot/auth-userdb { mode=0777 } })
dovecot[52568]: lmtp(52596): Error: user t...@example.com: Auth USER 
lookup failed
dovecot[52568]: lmtp(52596): Debug: auth input: 
postfix/lmtp[52595]: E86B5BD2BA0: to=, 
relay=ALMba.local[/_ROOT/var/run/dovecot/lmtp], delay=19, 
delays=19/0.02/0.17/0.06, dsn=4.3.0, status=deferred (host 
ALMba.local[/_ROOT/var/run/dovecot/lmtp] said: 451 4.3.0  
Internal error occurred. Refer to server log for more information. (in reply to 
RCPT TO command))
dovecot[52568]: lmtp(52596): Disconnect from local: Client quit (in 
reset)
postfix/smtpd[52588]: disconnect from localhost[127.0.0.1]

and the message of course remains in Postfix' queue.

I understand that the +x workaround suggested for the auth-userdb socket (so as 
to have 0777 permissions instead of 0666) relies on provisions made in 
Dovecot's code in order to relax some requirements.

But I still need help for a correct interpretation...

The socket receives 0666 permissions by default; any process should thus be 
able to read from/write to that socket.
So, why set such a default, since it is anyway going to yield un-intuitive 
results?

And, as far as the log messages are concerned:

"client doesn't have lookup permissions...".
Who's the client here?

Still from the log: "client doesn't have lookup permissions for this user:".
Which user?

"userdb reply doesn't contain uid"
The userdb query seems to have failed; but does it mean that is should 
explicitly return a uid?

TIA,
Axel


$ doveconf -n
# 2.1.16: /_ROOT/etc/dovecot/dovecot.conf
# OS: Darwin 12.3.0 x86_64  
auth_verbose = yes
disable_plaintext_auth = no
mail_debug = yes
mail_gid = dovemailer
mail_location = mbox:~/mboxes:INBOX=~/mboxes/inbox
mail_uid = dovemailer
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date ihave
mbox_write_locks = fcntl
passdb {
  args = /_ROOT/etc/dovecot/db.conf
  driver = sql
}
plugin {
  quota = dirsize:User quota
  quota_rule = *:storage=1M
}
ssl = no
userdb {
  driver = prefetch
}
userdb {
  args = /_ROOT/etc/dovecot/db.conf
  driver = sql
}
protocol lmtp {
  mail_plugins = quota
}
protocol pop3 {
  mail_plugins = quota
  pop3_uidl_format = %08Xv%08Xu
}
protocol imap {
  mail_plugins = quota
}

With above settings, the permissions on socket auth-userdb are:

srw-rw-rw-   1 dovecot  wheel   0 16 avr 16:05 auth-userdb

and the full config for service lmtp is:

$ doveconf service/lmtp
service lmtp {
  chroot = 
  client_limit = 1
  drop_priv_before_exec = no
  executable = lmtp
  extra_groups = 
  group = 
  idle_kill = 0
  privileged_group = 
  process_limit = 0
  process_min_avail = 0
  protocol = lmtp
  service_count = 0
  type = 
  unix_listener lmtp {
group = 
mode = 0666
user = 
  }
  user = 
  vsz_limit = 18446744073709551615 B
}



[Dovecot] Small documentation error?

2013-04-16 Thread Axel Luttgens
Hello,

At http://wiki2.dovecot.org/MailboxFormat/mbox:

The UID for a new message is calculated from "last used UID" in
X-IMAP header + 1

Shouldn't it read "in X-UID header + 1" instead?

Axel



Re: [Dovecot] Dovecot 2.2.0 compile error

2013-04-16 Thread Peter Wagner
On Tue, 16 Apr 2013 18:07:51 +0300
Timo Sirainen  wrote:

> On 16.4.2013, at 17.55, rauchwo...@gmx.net wrote:
> 
> > i tried to compile dovecot 2.2.0 and i end up with this error:
> > 
> > make[6]: Entering directory 
> > `/mnt/data/Develop/Openwrt/trunk_git/build_dir/target-mips_r2_uClibc-0.9.33.2/dovecot-2.2.0/src/util'
> > /bin/sh ../../libtool --tag=CC   --mode=link mips-openwrt-linux-uclibc-gcc  
> > -std=gnu99 -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves 
> > -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable 
> > -msoft-float  -Wall -W -Wmissing-prototypes -Wmissing-declarations 
> > -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast 
> > -fno-builtin-strftime -Wstrict-aliasing=2 
> > -I/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
> >  -no-undefined -Wl,--as-needed 
> > -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib
> >  
> > -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/lib
> >  
> > -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib
> >  
> > -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib
> >   -o gdbhelper gdbhelper.o
> 
> So it's failing only at gdbhelper. Why there and not earlier?..

I don't know.

> 
> > ../../src/lib-dovecot/.libs/libdovecot.so:(.got+0x0): multiple definition 
> > of `_GLOBAL_OFFSET_TABLE_'
> 
> Does it have it multiple times?

No only once. i attached the last 1000 lines of the output.

> 
> nm src/lib-dovecot/.libs/libdovecot.so | grep _GLOBAL_OFFSET_TABLE_

nm src/lib-dovecot/.libs/libdovecot.so | grep _GLOBAL_OFFSET_TABLE_
000b4d00 A _GLOBAL_OFFSET_TABLE_

> 
> > Version 2.1.16 compiled fine. How can i fix this linker error?
> 
> No idea.
> 


log.txz
Description: application/xz-compressed-tar


[Dovecot] Delete_to_Trash plugin and quota problem

2013-04-16 Thread BINOTTO Luis SIDOR
   Hello list... I am new at dovecot and I have a problem with it;
any help will be very grateful

We have a exchange server with outlook at the client side, and
we are migrating the exchange server to postfix/dovecot(1.2.15)
solution.

I enabled the "deleted-to-trash" plugin (v0.3) to move the messages to
the Trash folder automatically when it is deleted. Also, I am using
quota and quota_imap plugins to maintain the quota for users. The quota
rule for Trash folder is unlimit.

The problem is, when the client reach their maximum quota and
try to delete a mail in the inbox to release space. The delete to trash
plugin effectively copy it to the Trash folder, but the original mail
still remain (marked for delete) at the inbox folder and the quota does
not released.

 

This is my Configuration:

Dovecot -n 

 

# 1.2.15: /etc/dovecot/dovecot.conf

# OS: Linux 2.6.32-5-686 i686 Debian 6.0.6

log_path: /var/log/dovecot.log

protocols: imap imaps pop3 pop3s

login_dir: /var/run/dovecot/login

login_executable(default): /usr/lib/dovecot/imap-login

login_executable(imap): /usr/lib/dovecot/imap-login

login_executable(pop3): /usr/lib/dovecot/pop3-login

mail_uid: 16343

mail_gid: 16343

mail_location: maildir:mailboxes/mail

mail_debug: yes

mbox_write_locks: fcntl dotlock

mail_executable(default): /usr/lib/dovecot/imap

mail_executable(imap): /usr/lib/dovecot/imap

mail_executable(pop3): /usr/lib/dovecot/pop3

mail_plugins(default): autocreate deleted_to_trash quota imap_quota

mail_plugins(imap): autocreate deleted_to_trash quota imap_quota

mail_plugins(pop3): quota

mail_plugin_dir(default): /usr/lib/dovecot/modules/imap

mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap

mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3

imap_client_workarounds(default): delay-newmail outlook-idle
netscape-eoh

imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh

imap_client_workarounds(pop3):

pop3_client_workarounds(default):

pop3_client_workarounds(imap):

pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh

lda:

  postmaster_address: sir...@sidor.com

  mail_plugins: quota

  log_path: /var/log/dovecot.log

auth default:

  mechanisms: gssapi gss-spnego login ntlm

  username_format: %Ln

  use_winbind: yes

  passdb:

driver: pam

  userdb:

   driver: ldap

args: /etc/dovecot/dovecot-ldap.conf

  socket:

type: listen

client:

  path: /var/spool/postfix/private/auth

  mode: 432

  user: postfix

  group: postfix

master:

  path: /var/run/dovecot/auth-master

  mode: 384

  user: vmail

plugin:

  autocreate: Trash

  autosubscribe: Trash

  deleted_to_trash_folder: Trash

  quota: maildir:User quota

  quota_rule: *:storage=100M

  quota_rule2: Trash:storage=1G

  quota_warning: storage=80%% /etc/dovecot/scripts/quota-warning.sh 80

  quota_warning2: storage=90%% /etc/dovecot/scripts/quota-warning.sh 90

  quota_warning3: storage=96%% /etc/dovecot/scripts/quota-exceeded.sh
100

  quota_exceeded_message: Ha exedido el tamano del buzon

 

 

/etc/dovecot/dovecot-ldap.conf:

...

user_attrs =
postalCode=mail=maildir:/mailboxes/%$/,title=quota_rule=*:storage=%$M

...

 

Am I doing something wrong?

   

Thanking you in anticipation

 

L. Binotto

 

 



" Notificacion Automatica:
Este mensaje y cualquier archivo que se adjunte contiene informacion 
privilegiada y confidencial. Es para uso exclusivo del destinatario. Si usted 
ha recibido esta comunicacion por error, por favor avisenos inmediatamente.
Automatic notification: 
This e-mail and any file transmitted with it are confidential and may be 
legally privileged. It is intended solely for the addressee and may not be 
disclosed to or used by anyone other than the addressee. If you have received 
this e-mail by mistake , please advise the sender immediately"


Re: [Dovecot] imap Panic: file index-attachment.c: line 231 (index_attachment_save_finish): assertion failed: (attach->input->eof)

2013-04-16 Thread Pascal Volk
On 04/15/2013 11:33 PM Pascal Volk wrote:
> OK, applied that patch. Lets see what will happen.
> 

Looks good. No crash in the last 20 hours.


Regards,
Pascal
-- 
The trapper recommends today: cafefeed.1310...@localdomain.org


Re: [Dovecot] Sync errors trying to sync old mbox inboxes to dovecot

2013-04-16 Thread Timo Sirainen
On Tue, 2013-04-16 at 16:01 +, Michael Smith wrote:

> Just checking if you've had a chance to identify the problem.  Yesterday I 
> saw a patch for multipart messages.  Was this related, or a separate issue?

Here: http://hg.dovecot.org/dovecot-2.2/rev/c473f8d2540e




Re: [Dovecot] v2.2.0 released

2013-04-16 Thread l...@airstreamcomm.net

On 4/15/13 11:16 AM, Timo Sirainen wrote:

On 15.4.2013, at 18.55, l...@airstreamcomm.net wrote:


Does the new obox plugin support any of the open source object storage systems 
such as openstack, glusterfs, or ceph?  From your store site it does not appear 
so.

Glusterfs isn't really object storage (unless they've changed since I last 
looked at them), and it already more or less works with Dovecot using the 
existing mailbox formats. Except last I heard it still caused index file 
corruption.

Openstack Swift support is coming. There's a half-working version of it 
already, would need just a day or two to finish it up.

I haven't looked at Ceph closely yet, but it would be nice to support it as 
well.

obox can also be used with a regular POSIX filesystem, although it loses the prefetching 
capabilities then. So it could be used with e.g. Glusterfs or NFS to provide an efficient 
local cache. I've also thought about trying out if prefetching could be done by creating 
new "diskio" processes with a ton of threads doing the actual disk I/O.




Timo, Riak CS is S3 compatible.  Just curious if you have tested with 
Riak CS (especially the multi-data center implementation).




Re: [Dovecot] Sync errors trying to sync old mbox inboxes to dovecot

2013-04-16 Thread Michael Smith
Timo,

Just checking if you've had a chance to identify the problem.  Yesterday I saw 
a patch for multipart messages.  Was this related, or a separate issue?

--
Michael Smith


-Original Message-
From: Timo Sirainen [mailto:t...@iki.fi] 
Sent: Friday, April 12, 2013 1:17 PM
To: Michael Smith
Cc: 'dovecot@dovecot.org'
Subject: Re: [Dovecot] Sync errors trying to sync old mbox inboxes to dovecot

Yes, I can reproduce it now. I'll try to get it fixed on Monday.

On 12.4.2013, at 21.13, Michael Smith  wrote:

> Timo,
> 
> Any luck reproducing the sync error with the updated/correct mbox file?
> 
> --
> Michael Smith
> 
> 
> -Original Message-
> From: dovecot-boun...@dovecot.org [mailto:dovecot-boun...@dovecot.org] On 
> Behalf Of Michael Smith
> Sent: Wednesday, April 10, 2013 3:52 PM
> To: 'Timo Sirainen'
> Cc: 'dovecot@dovecot.org'
> Subject: Re: [Dovecot] Sync errors trying to sync old mbox inboxes to dovecot
> 
> It shouldn't.  Part of the migration is to remove any existing dovecot 
> mailbox for the user.  It does this by deleting the entire user's directory.
> 
> I just downloaded the file and checked.  Oops, looks like I grabbed the post 
> dsync mirror file.
> 
> I've uploaded the correct file (pre dsync mirror).  Downloaded it and 
> confirmed I'm getting the following error on dsync mirror.
> 
> dsync(webmail): Error: Sync failed for mbox file 
> /var/opt/migrate/users/webmail/inbox: seq=4482 uid=4482 uid_broken=0 
> originally needed 10 bytes, now needs 12 bytes
> 
> 
> --
> Michael Smith
> 
> -Original Message-
> From: Timo Sirainen [mailto:t...@iki.fi] 
> Sent: Tuesday, April 09, 2013 4:05 PM
> To: Michael Smith
> Cc: 'dovecot@dovecot.org'
> Subject: Re: [Dovecot] Sync errors trying to sync old mbox inboxes to dovecot
> 
> On 9.4.2013, at 1.41, Michael Smith  wrote:
> 
>> I tried importing the anonymized file, and there were no errors.  So, it's 
>> something with the actual data.  UTF-8 issues?
>> 
>> While I can't send you a raw customer's mailbox, one of the failures is a 
>> 'role' account mailbox, with no critical/useful data in it.
>> 
>> Here is a link (expires in 30 days) to download the mailbox, it's 107M.
>> https://truck.it/p/HNlzl9hWbO
>> 
>> The error I'm getting is 
>> dsync(webmail): Error: Sync failed for mbox file 
>> /var/opt/migrate/users/webmail/inbox: seq=4482 uid=4482 uid_broken=0 
>> originally needed 10 bytes, now needs 12 bytes
> 
> I can't reproduce with that file, dsync succeeds without errors. Maybe the 
> problem requires something specific in the index files also?
> 
> 



Re: [Dovecot] Dovecot 2.1.16: Quota plugin compile fails: Solaris 10

2013-04-16 Thread Stephen Usher
It seems that the following C standard header files need to be included in 
quota-status.c:


#include 
#include 
#include 

Once these are added it compiles.

Steve
--
---
IT Systems Administrator, E-Mail:- st...@earth.ox.ac.uk
Department of Earth Sciences,Tel:-   +44 (0)1865 282110
Oxford University, South Parks Road, Oxford, UK. Fax:-   +44 (0)1865 272072


[Dovecot] Dovecot 2.1.16: Quota plugin compile fails: Solaris 10

2013-04-16 Thread Stephen Usher
Dovecot 2.1.16 fails to compile giving the following error under Solaris 10. 
Previously I had no problem compiling 2.1.12.


The start of the config.log file contains:

It was created by Dovecot configure 2.1.16, which was
generated by GNU Autoconf 2.68.  Invocation command line was

  $ ./configure


## - ##
## Platform. ##
## - ##

hostname = luna
uname -m = i86pc
uname -r = 5.10
uname -s = SunOS
uname -v = Generic_148889-01

/usr/bin/uname -p = i386
/bin/uname -X = System = SunOS
Node = luna
Release = 5.10
KernelID = Generic_148889-01
Machine = i86pc
BusType = 
Serial = 
Users = 
OEM# = 0
Origin# = 1
NumCPU = 4

/bin/arch  = i86pc
/usr/bin/arch -k   = i86pc
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo  = unknown
/bin/machine   = unknown
/usr/bin/oslevel   = unknown
/bin/universe  = unknown

PATH: /usr/sfw/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /usr/sbin
PATH: /usr/ccs/bin
PATH: /opt/SUNWspro/bin
PATH: /usr/ucb


GCC version info:

Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/specs
Configured with: /builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure 
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as 
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared

Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)


Making all in quota
gmake[4]: Entering directory 
`/usr/local/src/mail/dovecot/dovecot-2.1.16/src/plugins/quota'
gcc -DHAVE_CONFIG_H -I. -I../../..  -I../../../src/lib -I../../../src/lib-master 
-I../../../src/lib-dict -I../../../src/lib-index -I../../../src/lib-mail 
-I../../../src/lib-storage -I../../../src/lib-storage/index 
-I../../../src/lib-storage/index/maildir -I../../../src/doveadm 
-I/usr/local/ssl/include -I/usr/sfw/include -I/usr/local/include  -std=gnu99 -g 
-O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith 
-Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime 
-I/usr/local/ssl/include  -MT quota-status.o -MD -MP -MF .deps/quota-status.Tpo 
-c -o quota-status.o quota-status.c

quota-status.c: In function `main':
quota-status.c:200: error: `optarg' undeclared (first use in this function)
quota-status.c:200: error: (Each undeclared identifier is reported only once
quota-status.c:200: error: for each function it appears in.)
gmake[4]: *** [quota-status.o] Error 1
gmake[4]: Leaving directory 
`/usr/local/src/mail/dovecot/dovecot-2.1.16/src/plugins/quota'


Steve
--
---
IT Systems Administrator, E-Mail:- st...@earth.ox.ac.uk
Department of Earth Sciences,Tel:-   +44 (0)1865 282110
Oxford University, South Parks Road, Oxford, UK. Fax:-   +44 (0)1865 272072


Re: [Dovecot] Maildirs location migration

2013-04-16 Thread Timo Sirainen
On 16.4.2013, at 18.03, Thomas Hummel  wrote:

> On Tue, Apr 16, 2013 at 05:51:21PM +0300, Timo Sirainen wrote:
> 
>> dsync in general resolves UID conflicts. If there's any chance that an IMAP 
>> client could have seen two different messages with the same UID, both of the 
>> messages get assigned new UIDs. 
> 
> I'm not sure I understand this correctly :
> 
> let's say that :
> 
> 1. in old, foobar as uid 100
> 2. initial dsync
> 3. user gets relocated, kicked and reconnects to new, then deletes foobar
> 4. final dsync. dsync somehow manages to understand it should not sync foobar 
> from old to new

Yes. It sees that uid 100 was deleted, and keeps nextuid=101.

> 5. migration is over, new message foobaz comes in. Oh, I get it, you mean 
> since
> uids gets only incremented, this new could not get uid 100 and then confuse 
> the
> client index ?

The new message gets uid 101, as according to nextuid value. A slightly more 
complex one would have been:

1. you have mails up to 100
2. dsync
3. old server gets new mail uid=101
4. old server deletes uid 101
5. new server gets new mail uid 101
5. dsync sees that there's a conflict (even though the old mail was already 
deleted), and gives the new server's new mail uid 102



Re: [Dovecot] Dovecot 2.2.0 compile error

2013-04-16 Thread Timo Sirainen
On 16.4.2013, at 17.55, rauchwo...@gmx.net wrote:

> i tried to compile dovecot 2.2.0 and i end up with this error:
> 
> make[6]: Entering directory 
> `/mnt/data/Develop/Openwrt/trunk_git/build_dir/target-mips_r2_uClibc-0.9.33.2/dovecot-2.2.0/src/util'
> /bin/sh ../../libtool --tag=CC   --mode=link mips-openwrt-linux-uclibc-gcc  
> -std=gnu99 -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves 
> -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable 
> -msoft-float  -Wall -W -Wmissing-prototypes -Wmissing-declarations 
> -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast 
> -fno-builtin-strftime -Wstrict-aliasing=2 
> -I/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
>  -no-undefined -Wl,--as-needed 
> -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib
>  
> -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/lib
>  
> -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib
>  
> -L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib
>   -o gdbhelper gdbhelper.o

So it's failing only at gdbhelper. Why there and not earlier?..

> ../../src/lib-dovecot/.libs/libdovecot.so:(.got+0x0): multiple definition of 
> `_GLOBAL_OFFSET_TABLE_'

Does it have it multiple times?

nm src/lib-dovecot/.libs/libdovecot.so | grep _GLOBAL_OFFSET_TABLE_

> Version 2.1.16 compiled fine. How can i fix this linker error?

No idea.



Re: [Dovecot] Maildirs location migration

2013-04-16 Thread Thomas Hummel
On Tue, Apr 16, 2013 at 05:51:21PM +0300, Timo Sirainen wrote:

> dsync in general resolves UID conflicts. If there's any chance that an IMAP 
> client could have seen two different messages with the same UID, both of the 
> messages get assigned new UIDs. 

I'm not sure I understand this correctly :

let's say that :

1. in old, foobar as uid 100
2. initial dsync
3. user gets relocated, kicked and reconnects to new, then deletes foobar
4. final dsync. dsync somehow manages to understand it should not sync foobar 
from old to new
5. migration is over, new message foobaz comes in. Oh, I get it, you mean since
uids gets only incremented, this new could not get uid 100 and then confuse the
client index ?


-- 
Thomas Hummel   | Institut Pasteur
 | Groupe Exploitation et Infrastructure


[Dovecot] Dovecot 2.2.0 compile error

2013-04-16 Thread rauchwolke
Hi,

i tried to compile dovecot 2.2.0 and i end up with this error:

make[6]: Entering directory 
`/mnt/data/Develop/Openwrt/trunk_git/build_dir/target-mips_r2_uClibc-0.9.33.2/dovecot-2.2.0/src/util'
/bin/sh ../../libtool --tag=CC   --mode=link mips-openwrt-linux-uclibc-gcc  
-std=gnu99 -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves 
-mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable 
-msoft-float  -Wall -W -Wmissing-prototypes -Wmissing-declarations 
-Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast 
-fno-builtin-strftime -Wstrict-aliasing=2 
-I/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
 -no-undefined -Wl,--as-needed 
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib
 
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/lib
 
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib
 
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib
  -o gdbhelper gdbhelper.o ../../src/lib-dovecot/libdovecot.la -export-dynamic 
-ldl 
OpenWrt-libtool: link: mips-openwrt-linux-uclibc-gcc -std=gnu99 -Os -pipe 
-mips32r2 -mtune=mips32r2 -fno-caller-saves -mno-branch-likely -fhonour-copts 
-Wno-error=unused-but-set-variable -msoft-float -Wall -W -Wmissing-prototypes 
-Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 
-Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 
-I/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/include
 -Wl,--as-needed -o .libs/gdbhelper gdbhelper.o -Wl,--export-dynamic  
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib
 
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/target-mips_r2_uClibc-0.9.33.2/lib
 
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib
 
-L/mnt/data/Develop/Openwrt/trunk_git/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib
 ../../src/lib-dovecot/.libs/libdovecot.so -ldl -Wl,-rpath -Wl,/usr/lib/dovecot
../../src/lib-dovecot/.libs/libdovecot.so:(.got+0x0): multiple definition of 
`_GLOBAL_OFFSET_TABLE_'
collect2: ld returned 1 exit status
make[6]: *** [gdbhelper] Error 1
make[6]: Leaving directory 
`/mnt/data/Develop/Openwrt/trunk_git/build_dir/target-mips_r2_uClibc-0.9.33.2/dovecot-2.2.0/src/util'
Making all in doveadm
make[6]: Entering directory 
`/mnt/data/Develop/Openwrt/trunk_git/build_dir/target-mips_r2_uClibc-0.9.33.2/dovecot-2.2.0/src/doveadm'
Making all in dsync
make[7]: Entering directory 
`/mnt/data/Develop/Openwrt/trunk_git/build_dir/target-mips_r2_uClibc-0.9.33.2/dovecot-2.2.0/src/doveadm/dsync'
make[7]: Nothing to be done for `all'.

Version 2.1.16 compiled fine. How can i fix this linker error?

With kind regards



Re: [Dovecot] Maildirs location migration

2013-04-16 Thread Timo Sirainen
On 16.4.2013, at 17.35, Thomas Hummel  wrote:

>>> Besides, how about client side indexing while in this incoherent, not yet 
>>> fully
>>> sync'ed state ? Wouldn't there be corruption risk ?
>> 
>> The worst that can happen is:
>> 
>> 1) Client sees new mail 123 in old server
>> 2) Client sees only mails up to 122 in the new server
>> 3) Client again will see mail 123 after a while
>> 
>> I'm actually not sure how clients will handle that. It is an IMAP
>> protocol violation. It would be possible to add a new flag to dsync
>> where it would treat all new emails as conflicts and give them new UIDs,
>> so in the above case it wouldn't save a mail 123 but 124.
> 
> I see. But there are other cases : 
> 
> for instance, the user deletes a mail foobar in the new server because he 
> reconnects
> after the kick. I guess dsync would merge the change and would not sync the
> foobar message from the old server in the final step. But what if another , 
> new, mail foobaz is
> delivered : would'it get the nextuid which was the uid of the deleted foobar 
> mail,
> thus confusing the client local indexes ?

dsync in general resolves UID conflicts. If there's any chance that an IMAP 
client could have seen two different messages with the same UID, both of the 
messages get assigned new UIDs. That's why I was wondering only about the case 
that I mentioned. There the client couldn't have seen two different messages, 
but it's possible that some client could hide the mail 123 because it thought 
it got lost.



Re: [Dovecot] Maildirs location migration

2013-04-16 Thread Thomas Hummel
On Tue, Apr 16, 2013 at 02:00:38PM +0300, Timo Sirainen wrote:

> dsync doesn't scan through filesystem. It reads the changes from the
> index files. If there are no changes it's pretty much instant even with
> 1M mail mailbox. With changes it's still fast enough (and could be
> faster still by using incremental syncing with saved state via -s
> parameter).

Ok. Actually, I had benched an initial dsync (i.e. no mail in destination) with
a parallelized rsync of precalculated (by an home made tool) chunks of files of
the maildir. For a ~3.3G Maildir, dsync took ~1 hour vs 10 min with 4 rsync at
a time. This of course is a very unfair comparison to dsync since I was using a
cluster to parallelise rsyncs.

But as you said, dsync could be wiser, so I was thinking of using parallel
rsync to make the initial mirror and then use dsync instead of rsync in the
final step described in the dsync wiki.

I'm still not sure if I should forbid dovecot auth temporary (using auth-deny
for instance) or try the seemless way.

> > Besides, how about client side indexing while in this incoherent, not yet 
> > fully
> > sync'ed state ? Wouldn't there be corruption risk ?
> 
> The worst that can happen is:
> 
> 1) Client sees new mail 123 in old server
> 2) Client sees only mails up to 122 in the new server
> 3) Client again will see mail 123 after a while
> 
> I'm actually not sure how clients will handle that. It is an IMAP
> protocol violation. It would be possible to add a new flag to dsync
> where it would treat all new emails as conflicts and give them new UIDs,
> so in the above case it wouldn't save a mail 123 but 124.

I see. But there are other cases : 

for instance, the user deletes a mail foobar in the new server because he 
reconnects
after the kick. I guess dsync would merge the change and would not sync the
foobar message from the old server in the final step. But what if another , 
new, mail foobaz is
delivered : would'it get the nextuid which was the uid of the deleted foobar 
mail,
thus confusing the client local indexes ?

Thanks

-- 
Thomas Hummel   | Institut Pasteur
 | Groupe Exploitation et Infrastructure


Re: [Dovecot] LDAP attribute as shared mailbox name

2013-04-16 Thread Timo Sirainen
On 16.4.2013, at 11.10, Marek Skubela  wrote:

> Is it possible to use LDAP attribute (cn in my case) instead
> of e-mail address as a shared folder name, so users would
> see something like: Shared > ExampleCompany Service
> and not the default Shared > serv...@example.com?

Only if you change all of the usernames to look like that instead of email 
addresses (this translation could be done by passdb/userdb after user login).

If there are only a few such accounts, maybe you should be using public 
namespaces instead.



Re: [Dovecot] [PATCH] mailbox_get_metadata() for mailboxes with open transactions.

2013-04-16 Thread Timo Sirainen
On 16.4.2013, at 17.04, Dafan Zhai  wrote:

> I am writing a dovecot statistic plugin, which calls mailbox_get_metadata() 
> to get the virtual size of the mailbox, if a mail is copied. I have noticed 
> that mailbox_get_metadata() calls mailbox_sync(), and mailbox_sync() will 
> fail for the mailboxes with open transactions. But if a mail is copied, there 
> must be at least one transaction opened for the mailbox. So I can not get the 
> virtual size.

If you hook into mailbox_copy() you'll be calling it for each mail separately 
that is copied within the same command. Also you're calling it even if the copy 
fails later (e.g. IMAP COPY gets aborted if some messages are missing). So you 
should delay calling it until after transaction commit (set your own flag to 
the transaction that messages were copied). Maybe even until the next sync is 
called.

> Commit [1] has fixed the same problem in mailbox_get_status(). I think the 
> same should also be done in mailbox_get_metadata(). See the patch below.

Too much of a chance of breaking some code that relies on the current behavior.



[Dovecot] [PATCH] mailbox_get_metadata() for mailboxes with open transactions.

2013-04-16 Thread Dafan Zhai

Hi everyone,

I am writing a dovecot statistic plugin, which calls 
mailbox_get_metadata() to get the virtual size of the mailbox, if a mail 
is copied. I have noticed that mailbox_get_metadata() calls 
mailbox_sync(), and mailbox_sync() will fail for the mailboxes with open 
transactions. But if a mail is copied, there must be at least one 
transaction opened for the mailbox. So I can not get the virtual size.


Commit [1] has fixed the same problem in mailbox_get_status(). I think 
the same should also be done in mailbox_get_metadata(). See the patch below.


Dovecot version: 2.2.0
OS: OS: Linux 3.4.39-dist i686
maildir:~/Maildir:LAYOUT=fs:INBOX=~/Maildir/INBOX

Dafan


[1] http://hg.dovecot.org/dovecot-2.2/rev/12136db6e31f


# HG changeset patch
# User Dafan Zhai 
# Date 1366118323 -7200
# Node ID 7f0c5122d863d303ef5e74bbf650c2bac89ac564
# Parent f33bacb03cc22e02ca2d11d527d8dc0d99214486
lib-storage: mailbox_get_metadata() no longer forces mailbox to be synced.
This fixes getting virtual size through mailbox_get_metadata() of 
mailboxes with open transactions.


diff -r f33bacb03cc2 -r 7f0c5122d863 src/lib-storage/index/index-status.c
--- a/src/lib-storage/index/index-status.c Tue Apr 16 15:54:05 2013 +0300
+++ b/src/lib-storage/index/index-status.c Tue Apr 16 15:18:43 2013 +0200
@@ -371,10 +371,10 @@
if (!box->opened) {
if (mailbox_open(box) < 0)
return -1;
- }
- if (!box->synced && (items & MAILBOX_METADATA_SYNC_ITEMS) != 0) {
- if (mailbox_sync(box, MAILBOX_SYNC_FLAG_FAST) < 0)
- return -1;
+ if ((items & MAILBOX_METADATA_SYNC_ITEMS) != 0) {
+ if (mailbox_sync(box, MAILBOX_SYNC_FLAG_FAST) < 0)
+ return -1;
+ }
}

if ((items & MAILBOX_METADATA_VIRTUAL_SIZE) != 0) {


Re: [Dovecot] Dovecot 2.2 multiple master user passdb's not working anymore

2013-04-16 Thread Christian Wiese
Hi Timo,

> > after an update from dovecot 2.1.16 to 2.2.0 I encountered a problem
> > when using multiple master user passdb's like the following:
> 
> Fixed: http://hg.dovecot.org/dovecot-2.2/rev/854469baa57c
>

Thanks a lot for the quick fix! It's working again! :)

Cheers,
Chris


Re: [Dovecot] Dovecot 2.2 multiple master user passdb's not working anymore

2013-04-16 Thread Timo Sirainen
On 16.4.2013, at 16.12, Christian Wiese  wrote:

> after an update from dovecot 2.1.16 to 2.2.0 I encountered a problem
> when using multiple master user passdb's like the following:

Fixed: http://hg.dovecot.org/dovecot-2.2/rev/854469baa57c



[Dovecot] Dovecot 2.2 multiple master user passdb's not working anymore

2013-04-16 Thread Christian Wiese
Hi,

after an update from dovecot 2.1.16 to 2.2.0 I encountered a problem
when using multiple master user passdb's like the following:

%<-
passdb {
  args = /etc/dovecot/passwd.foo-master
  driver = passwd-file
  master = yes
}
passdb {
  args = /etc/dovecot/passwd.bar-master
  driver = passwd-file
  master = yes
}
%<-

The former behavior that the passdb's are searched sequentially
to find the given master user doesn't seem to work anymore.
Only the first passdb is searched, and thus authentication will fail
for all master users which are not defined in the first passdb.

Because I cannot find any hint that the master user handling has
changed fundamentally it looks like a bug, but maybe I missed
configuration related changes from 2.1 to 2.2 that is causing this new
behavior.

Cheers,
Chris


Re: [Dovecot] Maildirs location migration

2013-04-16 Thread Timo Sirainen
On Tue, 2013-04-16 at 12:38 +0200, Thomas Hummel wrote:
> On Thu, Apr 11, 2013 at 01:09:18PM +0300, Timo Sirainen wrote:
> 
> > > the user may see an incorrect state for a small amount of time, doesn't he
> > > ?
> > 
> [...]
> > For a small amount of time, yes.
> 
> [...]
> > Which is probably a few seconds, so I don't see this as much of a problem.
> 
> Well, isn't, as with rsync, the travel time through the filesystem (to find 
> out
> what's to be sync'ed) incompressible, in which case it would take more than a
> few seconds on a large mailbox (I'm testing but in more complex conditions) ?
> 
> Is dsync, for that matter, fastest than rsync (maybe because using
> dovecot-uidlist or similar) ?

dsync doesn't scan through filesystem. It reads the changes from the
index files. If there are no changes it's pretty much instant even with
1M mail mailbox. With changes it's still fast enough (and could be
faster still by using incremental syncing with saved state via -s
parameter).

> Besides, how about client side indexing while in this incoherent, not yet 
> fully
> sync'ed state ? Wouldn't there be corruption risk ?

The worst that can happen is:

1) Client sees new mail 123 in old server
2) Client sees only mails up to 122 in the new server
3) Client again will see mail 123 after a while

I'm actually not sure how clients will handle that. It is an IMAP
protocol violation. It would be possible to add a new flag to dsync
where it would treat all new emails as conflicts and give them new UIDs,
so in the above case it wouldn't save a mail 123 but 124.




Re: [Dovecot] Maildirs location migration

2013-04-16 Thread Thomas Hummel
On Thu, Apr 11, 2013 at 01:09:18PM +0300, Timo Sirainen wrote:

> > the user may see an incorrect state for a small amount of time, doesn't he
> > ?
> 
[...]
> For a small amount of time, yes.

[...]
> Which is probably a few seconds, so I don't see this as much of a problem.

Well, isn't, as with rsync, the travel time through the filesystem (to find out
what's to be sync'ed) incompressible, in which case it would take more than a
few seconds on a large mailbox (I'm testing but in more complex conditions) ?

Is dsync, for that matter, fastest than rsync (maybe because using
dovecot-uidlist or similar) ?

Besides, how about client side indexing while in this incoherent, not yet fully
sync'ed state ? Wouldn't there be corruption risk ?

Thanks.

-- 
Thomas Hummel   | Institut Pasteur
 | Groupe Exploitation et Infrastructure


Re: [Dovecot] Probs authenticating to Dovecot

2013-04-16 Thread Professa Dementia

Turn on the following directives:

auth_verbose = yes
auth_debug_passwords = yes

Restart, then reconnect with your mail client.  You should have much 
better logging to determine the source of the problem.


Dem


Re: [Dovecot] Probs authenticating to Dovecot

2013-04-16 Thread Daniel Reinhardt
It would appear that port 110 is not opened on your firewall, and is that
IP address one that is assigned to your External WAN interface on your
Comcast connection?

The VM should have a Privately assigned IP address as given by the VM
Software.


On Tue, Apr 16, 2013 at 4:12 AM, Kris Magnusson
wrote:

> root@mail:/etc/dovecot# telnet mail 110
> Trying 50.196.172.zzz...
> telnet: Unable to connect to remote host: Connection timed out
>
> On Apr 16, 2013, at 1:10 AM, Daniel Reinhardt  wrote:
>
> > What was the output of the telnet localhost 110?
> >
> > Did it present any error messages?
> >
> >
> > On Tue, Apr 16, 2013 at 3:43 AM, Kris Magnusson
> > wrote:
> >
> >> Thanks much. I prefer Debian for server work anyway.
> >>
> >> Best, Kris
> >>
> >> On Apr 16, 2013, at 12:29 AM, Noel Butler 
> wrote:
> >>
> >>> On Mon, 2013-04-15 at 23:38 -0700, Kris Magnusson wrote:
> >>>
> >>>
>  I will blow this VM away and start from scratch. Unless anyone has any
> >> concrete suggestions I can implement before then that I can use to
> salvage
> >> a day's worth of work.
> 
> >>>
> >>>
> >>> If it comes down to it, I just asked on IRC for you if anyone knows a
> >>> good howto for ubuntu, someone replied to look for the ISP setup guide
> >>> by Chris Haas, said it was for debian so should work.
> >>>
> >>
> >>
> >
> >
> > --
> > Daniel Reinhardt
> > crypto...@cryptodan.net
> > http://www.cryptodan.net
> > 301-875-7018(c)
> > 410-455-0488(h)
>
>


-- 
Daniel Reinhardt
crypto...@cryptodan.net
http://www.cryptodan.net
301-875-7018(c)
410-455-0488(h)


Re: [Dovecot] Probs authenticating to Dovecot

2013-04-16 Thread Kris Magnusson
root@mail:/etc/dovecot# telnet mail 110
Trying 50.196.172.zzz...
telnet: Unable to connect to remote host: Connection timed out

On Apr 16, 2013, at 1:10 AM, Daniel Reinhardt  wrote:

> What was the output of the telnet localhost 110?
> 
> Did it present any error messages?
> 
> 
> On Tue, Apr 16, 2013 at 3:43 AM, Kris Magnusson
> wrote:
> 
>> Thanks much. I prefer Debian for server work anyway.
>> 
>> Best, Kris
>> 
>> On Apr 16, 2013, at 12:29 AM, Noel Butler  wrote:
>> 
>>> On Mon, 2013-04-15 at 23:38 -0700, Kris Magnusson wrote:
>>> 
>>> 
 I will blow this VM away and start from scratch. Unless anyone has any
>> concrete suggestions I can implement before then that I can use to salvage
>> a day's worth of work.
 
>>> 
>>> 
>>> If it comes down to it, I just asked on IRC for you if anyone knows a
>>> good howto for ubuntu, someone replied to look for the ISP setup guide
>>> by Chris Haas, said it was for debian so should work.
>>> 
>> 
>> 
> 
> 
> -- 
> Daniel Reinhardt
> crypto...@cryptodan.net
> http://www.cryptodan.net
> 301-875-7018(c)
> 410-455-0488(h)



Re: [Dovecot] Probs authenticating to Dovecot

2013-04-16 Thread Daniel Reinhardt
What was the output of the telnet localhost 110?

Did it present any error messages?


On Tue, Apr 16, 2013 at 3:43 AM, Kris Magnusson
wrote:

> Thanks much. I prefer Debian for server work anyway.
>
> Best, Kris
>
> On Apr 16, 2013, at 12:29 AM, Noel Butler  wrote:
>
> > On Mon, 2013-04-15 at 23:38 -0700, Kris Magnusson wrote:
> >
> >
> >> I will blow this VM away and start from scratch. Unless anyone has any
> concrete suggestions I can implement before then that I can use to salvage
> a day's worth of work.
> >>
> >
> >
> > If it comes down to it, I just asked on IRC for you if anyone knows a
> > good howto for ubuntu, someone replied to look for the ISP setup guide
> > by Chris Haas, said it was for debian so should work.
> >
>
>


-- 
Daniel Reinhardt
crypto...@cryptodan.net
http://www.cryptodan.net
301-875-7018(c)
410-455-0488(h)


[Dovecot] LDAP attribute as shared mailbox name

2013-04-16 Thread Marek Skubela

Hello,

Is it possible to use LDAP attribute (cn in my case) instead
of e-mail address as a shared folder name, so users would
see something like: Shared > ExampleCompany Service
and not the default Shared > serv...@example.com?

--
Regards,
Marek Skubela


Re: [Dovecot] Probs authenticating to Dovecot

2013-04-16 Thread Kris Magnusson
Thanks much. I prefer Debian for server work anyway. 

Best, Kris

On Apr 16, 2013, at 12:29 AM, Noel Butler  wrote:

> On Mon, 2013-04-15 at 23:38 -0700, Kris Magnusson wrote:
> 
> 
>> I will blow this VM away and start from scratch. Unless anyone has any 
>> concrete suggestions I can implement before then that I can use to salvage a 
>> day's worth of work.
>> 
> 
> 
> If it comes down to it, I just asked on IRC for you if anyone knows a
> good howto for ubuntu, someone replied to look for the ISP setup guide
> by Chris Haas, said it was for debian so should work.
> 



[Dovecot] [OT] xi.rename-it.nl dovecot-2.2 stable-auto

2013-04-16 Thread Jan Phillip Greimann

Hi there,

I check my mail-server for debian package-upgrades with Nagios, so 
everyday I got a mail for 8 "new" dovecot-packages on this server. I 
think that wasn't so in 2.1 stable-auto, but I'm not sure about that. 
Maybe someone who uses the 2.1 stable-auto repo could response to this? 
But 2.2 released only few days ago, maybe the repo-admin hadn't time to 
change this, or my memory about this is wrong.


best regards,
Jan



Re: [Dovecot] Probs authenticating to Dovecot

2013-04-16 Thread Noel Butler
On Mon, 2013-04-15 at 23:38 -0700, Kris Magnusson wrote:


> I will blow this VM away and start from scratch. Unless anyone has any 
> concrete suggestions I can implement before then that I can use to salvage a 
> day's worth of work.
> 


If it comes down to it, I just asked on IRC for you if anyone knows a
good howto for ubuntu, someone replied to look for the ISP setup guide
by Chris Haas, said it was for debian so should work.



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


Re: [Dovecot] Probs authenticating to Dovecot

2013-04-16 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 15 Apr 2013, Kris Magnusson wrote:


I will blow this VM away and start from scratch. Unless anyone has any concrete 
suggestions I can implement before then that I can use to salvage a day's worth 
of work.


If you want to debug this config further, I would

1) enable auth_debug in Dovcot, see http://wiki2.dovecot.org/Logging
2) check with telnet if authentification works in Dovecot
3) check if SMTP AUTH works

If you don't trust ISPConfig, then ignore this VM, check out the Dovecot 
Wiki2 and its Postfix howto.



Is there a best possible OS for running Dovecot/Postfix? That would be a step 
in the right direction. Ubuntu is great for running WordPress, but I recognize 
there are different OSes out there. I don't care if it's Linux-based or a BSD 
distribution.


I don't think there is a "best" OS. You could compile Dovecot yourself, 
the development packages of dependencies are available in most (all?) 
distributions, then you are not stuck on one particular version of 
Dovecot.



Will Dovecot/Postfix scale without a RDBMS backing it up? Or will OpenLDAP 
suffice?


Dovecot will work fine with OpenLDAP, esp. because it implements caching.

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUWz8Al3r2wJMiz2NAQLGNgf/YU6ecbB15V4kJBEKolId06m4odtDwb7z
md+gsYghBNAGkqO5hg6brJKHhrx/ReBUI68iIwQ9X26ifF90oOSrGINv5NH0uYpK
10YI0zljq45b4/GC3927PP56K1wrKm/ekhLJJ368bdCqfH3jznaFViU+gn1Ud3FZ
bOh0Y2lQHINIkpI9GqlZAGeLj8GZ3k0urv8KSENLaWqf5/ycSNTvpCI1b5xuXYvc
+z3LB5NBtCLP/OLjVDhy5a/TpK6L0nYgc6Tphf+7HJR9nHWMez/7NZqa/faPRVZd
v+5qa2n7wB9powAjIJZWLMIBGzk/AEVTTdbZ3etzK6sVwKeHkvL6Uw==
=6nJA
-END PGP SIGNATURE-


[Dovecot] Dovecot IMAPS and slow reconnections

2013-04-16 Thread Jarrad

Hi List,

I've recently moved from postfix + courier-imap to a new server with 
postfix + dovecot with a mysql user management.


I have it up and running and receiving mail ok but I'm having problems 
with IMAP connections being slow. I have an iphone with multiple imap 
accounts set up on it (4 I think) and when I open the mail app it 
connects to first account quickly. Then if I navigate to another account 
it takes about 1 minute to connect (sits there with the 'connecting' 
status)


Looking at the logs it shows the connection come through at the same 
time the iphone actually connects so it's as if something is timing out 
before it actually connects.


My setup is an Amazon EC2 micro instance running debian wheezy. There 
is about 5 domains being hosted with approximately 4-5 accounts for each 
so it's not a heavy load by any means. I've tried bumping up the max 
connections, service_count and minimum processes but nothing seems to 
help.


Any advice is much appreciated.

My config is as per below:

# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.0 ext4
auth_debug = yes
auth_verbose = yes
disable_plaintext_auth = no
mail_location = maildir:/var/vmail/%d/%n/Maildir
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix =
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocols = " imap pop3"
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-master {
group = vmail
mode = 0600
user = vmail
  }
}
service imap-login {
  process_min_avail = 5
  service_count = 10
}
ssl_cert =   args = uid=5000 gid=5000 home=/var/vmail/%d/%n/Maildir 
allow_all_users=yes

  driver = static
}
verbose_ssl = yes
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  log_path =
  mail_plugins =
  postmaster_address = 
}
protocol imap {
  mail_max_userip_connections = 100
}



Re: [Dovecot] Probs authenticating to Dovecot

2013-04-16 Thread Noel Butler
On Mon, 2013-04-15 at 23:38 -0700, Kris Magnusson wrote:


> 
> and introducing a DB into the mix just made things an order of magnitude more 
> complicated. I'd rather use OpenLDAP, since I can write JNDI code to figure 
> out what's going on with a directory and even add/modify/delete entries to/in 
> the directory.
> 


I'll start a war here, but IMO, ldap is just another database...

If you are doing virtuals nothing wrong with them, mysql works fine.


> I will blow this VM away and start from scratch. Unless anyone has any 
> concrete suggestions I can implement before then that I can use to salvage a 
> day's worth of work.
> 


Unless you built them from source, I'd wait a day or so (if you can)
until maybe some ubuntu users can offer suggestions, but, given ubuntu
is just a dressed up debian, you might find something of interest that
will work for you on google.


> Is there a best possible OS for running Dovecot/Postfix?

Slackware! haha  - asking that question will start another war - each to
our own, whatever distro you are comfortable with - slackware, centos,
debian, suse, or the kiddie variants (fedora/ubuntu)  (/me puts on flame
suite )... it wont make much difference really, it's just a mater of
getting the daemons to talk nicely to each other, which they do,
postfix, dovecot and mysql go hand in hand.


> but I recognize there are different OSes out there. I don't care if it's 
> Linux-based or a BSD distribution. 
> 
> Will Dovecot/Postfix scale without a RDBMS backing it up? Or will OpenLDAP 
> suffice?
> 


It scales best with one, but that's just my opinion, there are some folk
who do use ldap but I dont know their network requirements.



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