[Dovecot] mailbox count folders issues

2009-10-27 Thread Nikita Koshikov
Hello list, 

I have one user, which have a lot of folders (not it is 414 without INBOX). 
When he tries to create one more folder with random name - the folder 
successfully created, but LIST command invokes out of memory to imap process.

From the logs:
Oct 26 15:26:38 IMAP(gozhd...@domain.com): Panic: data stack: Out of memory 
when allocating 268435472 bytes
Oct 26 15:26:38 IMAP(gozhd...@domain.com): Error: *** glibc detected *** imap: 
double free or corruption (!prev): 0x0812ba00 ***
Oct 26 15:26:38 IMAP(gozhd...@domain.com): Error: === Backtrace: =
Oct 26 15:26:38 IMAP(gozhd...@domain.com): Error: /lib/libc.so.6[0xb7e8a714]
Oct 26 15:26:38 IMAP(gozhd...@domain.com): Error: 
/lib/libc.so.6(cfree+0x9c)[0xb7e8bfcc]
Oct 26 15:26:38 IMAP(gozhd...@domain.com): Error: imap(t_pop+0x7a)[0x80f0a1a]
Oct 26 15:26:38 IMAP(gozhd...@domain.com): Error: 
imap(t_pop_check+0xf)[0x80f0b9f]
Oct 26 15:26:38 IMAP(gozhd...@domain.com): Error: imap[0x80f199d]
Oct 26 15:26:38 IMAP(gozhd...@domain.com): Error: imap[0x80f2285]
Oct 26 15:26:38 IMAP(gozhd...@domain.com): Error: imap[0x80f1bd9]
Oct 26 15:26:38 IMAP(gozhd...@domain.com): Error: imap[0x80f099d]
Oct 26 15:26:38 IMAP(gozhd...@domain.com): Error: Sending log messages too 
fast, throttling..
Oct 26 15:26:38 dovecot: Error: child 9497 (imap) killed with signal 6 (core 
dumps disabled)
Oct 26 15:26:39 IMAP(gozhd...@domain.com): Error: imap[0x80f0e17]
Oct 26 15:26:39 IMAP(gozhd...@domain.com): Error: imap[0x80fccc8]
Oct 26 15:26:39 IMAP(gozhd...@domain.com): Error: imap[0x80efd3a]
Oct 26 15:26:39 IMAP(gozhd...@domain.com): Error: 
imap(buffer_write+0xd2)[0x80f0242]
Oct 26 15:26:39 IMAP(gozhd...@domain.com): Error: 
imap(buffer_append+0x26)[0x80f0366]
Oct 26 15:26:39 IMAP(gozhd...@domain.com): Error: 
imap(mail_transaction_log_append+0x5dc)[0x80d457c]
Oct 26 15:26:39 IMAP(gozhd...@domain.com): Error: imap[0x80c90d9]
Oct 26 15:26:39 IMAP(gozhd...@domain.com): Error: 
imap(mail_index_sync_commit+0xa5)[0x80cc625]
Oct 26 15:26:39 IMAP(gozhd...@domain.com): Error: 
/usr/lib/dovecot/imap/lib20_virtual_plugin.so[0xb7de7cee]
Oct 26 15:26:39 IMAP(gozhd...@domain.com): Error: 
/usr/lib/dovecot/imap/lib20_virtual_plugin.so(virtual_storage_sync_init+0x71c)[0xb7dea7cc]
Oct 26 15:26:39 IMAP(gozhd...@domain.com): Error: 
imap(mailbox_sync+0x35)[0x80b6335]
Oct 26 15:26:40 IMAP(gozhd...@domain.com): Error: 
imap(cmd_select_full+0x3d8)[0x8065088]
Oct 26 15:26:40 IMAP(gozhd...@domain.com): Error: 
imap(cmd_select+0x19)[0x80657e9]
Oct 26 15:26:40 IMAP(gozhd...@domain.com): Error: imap[0x8067a9c]
Oct 26 15:26:40 IMAP(gozhd...@domain.com): Error: imap[0x8067b35]
Oct 26 15:26:40 IMAP(gozhd...@domain.com): Error: 
imap(client_handle_input+0x2d)[0x8067ced]
Oct 26 15:26:40 IMAP(gozhd...@domain.com): Error: 
imap(client_input+0x5f)[0x80686af]
Oct 26 15:26:40 IMAP(gozhd...@domain.com): Error: 
imap(io_loop_handler_run+0xe0)[0x80fae60]
Oct 26 15:26:40 IMAP(gozhd...@domain.com): Error: 
imap(io_loop_run+0x20)[0x80fa2e0]
Oct 26 15:26:40 IMAP(gozhd...@domain.com): Error: imap(main+0x5ea)[0x807116a]
Oct 26 15:26:40 IMAP(gozhd...@domain.com): Error: 
/lib/libc.so.6(__libc_start_main+0xe5)[0xb7e35725]
Oct 26 15:26:40 IMAP(gozhd...@domain.com): Error: imap[0x80602b1]
Oct 26 15:26:41 IMAP(gozhd...@domain.com): Error: === Memory map: 
Oct 26 15:26:41 IMAP(gozhd...@domain.com): Error: 08048000-08129000 r-xp 
 08:02 385446 /usr/libexec/dovecot/imap
Oct 26 15:26:41 IMAP(gozhd...@domain.com): Error: 08129000-0812a000 r--p 
000e 08:02 385446 /usr/libexec/dovecot/imap
Oct 26 15:26:41 IMAP(gozhd...@domain.com): Error: 0812a000-0812c000 rw-p 
000e1000 08:02 385446 /usr/libexec/dovecot/imap
Oct 26 15:26:41 IMAP(gozhd...@domain.com): Error: 0812c000-0bbbd000 rw-p 
0812c000 00:00 0  [heap]
Oct 26 15:26:41 IMAP(gozhd...@domain.com): Error: 9260-92621000 rw-p 
9260 00:00 0 
Oct 26 15:26:41 IMAP(gozhd...@domain.com): Error: 92621000-9270 ---p 
92621000 00:00 0 
Oct 26 15:26:41 IMAP(gozhd...@domain.com): Error: b280d000-b2819000 r-xp 
 08:02 263779 /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1
Oct 26 15:26:41 IMAP(gozhd...@domain.com): Error: b2819000-b281a000 r--p 
b000 08:02 263779 /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1
Oct 26 15:26:41 IMAP(gozhd...@domain.com): Error: b281a000-b281b000 rw-p 
c000 08:02 263779 /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1
Oct 26 15:26:41 IMAP(gozhd...@domain.com): Error: b2822000-b7d88000 rw-p 
b2822000 00:00 0 
Oct 26 15:26:42 IMAP(gozhd...@domain.com): Error: b7d88000-b7d9 r--s 
 08:11 24109678   
/data/mail/domain.com/gozhda.a/data/dovecot.index.cache
Oct 26 15:26:42 IMAP(gozhd...@domain.com): Error: b7d9-b7d95000 r--s 
 08:11 24109800   
/data/mail/domain.com/gozhda.a/data/.Supplier.Furniture.Prima 
Ridhacitra.Inbox/dovecot.index.cache
Oct 26 15:26:42 IMAP(gozhd...@domain.com): Error: b7d95000-b7d9a000 r--s 
 08:11 24117515   

Re: [Dovecot] Multiple identities

2009-10-27 Thread Koenraad Lelong

Daniel L. Miller schreef:

Koenraad Lelong wrote:

Hi,

...
I'm trying to debug this but dovecot does not help much. I tried 
rawlog but there is no output (that I see) from it, no log-files in my 
maildir.


The act of copying outgoing mail to a Sent folder is not an automatic 
one - certainly not from the server's point of view.  Typically, this is 
implemented by the mail client - in this case, Thunderbird.  If you have 
not gone well out of your way to configure some kind of server-side 
script - it's going to be client-driven.


Within Thunderbird, under Manage Identities, Copies  Folders, you 
can specify the Sent folder to use.  If using the default Sent 
folder results in a INBOX.Sent, override the setting here and specify 
your correct folder.



Hi Daniel,

You are right ! I'm using Thunderbird for years now, and I didn't know 
this existed :-/ ! I remember, for some reason I don't remember, for a 
while I had to modify the main identity to use another Sent. When you 
make a new identity this gets copied I think if you don't modify it 
explicitely. That explains why new aliasses don't copy to INBOX.Sent.


Many thanks.


Regards,

Koenraad Lelong.

P.S. any idea why rawlog doesn't work ? Where should to log-file be placed ?


Re: [Dovecot] Multiple identities

2009-10-27 Thread Matthijs Kooijman
 P.S. any idea why rawlog doesn't work ? Where should to log-file be placed ?
Did you see http://wiki.dovecot.org/Debugging/Rawlog ?

It works by checking if dovecot.rawlog/ directory exists in the logged in
user's home directory, and writing the traffic to mmdd-HHMMSS-pid.in and
.out files. Each connection gets their own in/out files.

Gr.

Matthijs


signature.asc
Description: Digital signature


Re: [Dovecot] Multiple identities

2009-10-27 Thread Koenraad Lelong

Matthijs Kooijman schreef:

P.S. any idea why rawlog doesn't work ? Where should to log-file be placed ?

Did you see http://wiki.dovecot.org/Debugging/Rawlog ?

It works by checking if dovecot.rawlog/ directory exists in the logged in
user's home directory, and writing the traffic to mmdd-HHMMSS-pid.in and
.out files. Each connection gets their own in/out files.

Gr.

Matthijs


Doh. Seems I skipped a few lines and misunderstood others. The directory 
should _exist_ (and with the right permissions) ! Now it works.

Thanks for pointing this out.

Regards,

Koenraad Lelong.


Re: [Dovecot] Multiple identities

2009-10-27 Thread Matthijs Kooijman
Hi Koenraad,

 Doh. Seems I skipped a few lines and misunderstood others. The
 directory should _exist_ (and with the right permissions) ! Now it
 works.
Feel free to improve the wording, it's a wiki! I agree with you that it is not
the best description of rawlog, even though all information is there...

Gr.

Matthijs


signature.asc
Description: Digital signature


Re: [Dovecot] meaning of parameter imap_idle_notify_interval??

2009-10-27 Thread Ingo Thierack


sorry to say, no change.
Takes more then 2 minutes until tb register there is a new mail.

I'm the only with this behavior? As sayd before, had no issues with
archiveopteryx-imap on this. So I think, there is no problem
with tb.

Could there be an problem with the inotify implementation in the 
CentOS-Kernel?


Timo Sirainen schrieb:

On Mon, 2009-10-26 at 21:20 +0100, Ingo Thierack wrote:
  

Set notify interval to 180 seconds.
The message appears without intervention around 140 seconds after
it was delivered to the inbox.



See if this helps: http://hg.dovecot.org/dovecot-1.2/rev/abbb153d4643

  




[Dovecot] SetUID check problem

2009-10-27 Thread Thomas Berezansky
Running dovecot 1.2.4 on FreeBSD using Postfix. Everything works fine  
normally, but deliver is executable by world.


This is not normally a problem, as I don't run deliver SetUID root.

But for whatever reason, when deliver is called by something that IS  
SetUID root I get the following error:


/usr/local/libexec/dovecot/deliver must not be both world-executable  
and setuid-root. This allows root exploits. See  
http://wiki.dovecot.org/LDA#multipleuids


Deliver's permissions look like this:

-r-xr-xr-x

While the program calling deliver has permissions like this:

-r-s--x---

If it isn't possible for deliver to differentiate between being called  
by setuid root programs and being setuid root itself I don't think it  
should be doing that particular security check. Alternatively, there  
should be an option to turn that particular check off, but what little  
I saw of the source code and found searching the documentation told me  
that there doesn't seem to be such an option already.


I also couldn't find any mention that this is fixed by 1.2.5 or 1.2.6.

Thomas Berezansky
Merrimack Valley Library Consortium






[Dovecot] listing available subscriptions - shared mailboxes

2009-10-27 Thread Hendrik Pahl
hi everybody,

got a strange issue with 1.2.4 on SLES11. When listing the user's
available subscriptions with any client, every shared mailbox that can
be subscribed is listed twice, once with it's correct name, 'folder' for
example. the second appereance is without the last letter of the name,
'folde' for example. strange behaviour, since this happens with any
client. i hope somebody know what is wrong here.

thanks in advance,
hendrik

-- 
LWsystems GmbH  Co. KG  ++  http://www.lw-systems.de/impressum
Tel: +49 (0)5403 / 5556  ++  Fax: +49 (0)5403 / 7 95 89 97

Ihr Spezialist für Linux, Open Source  IT-Sicherheit

###
###  LWsystems veranstaltet den LINUX SOLUTION DAY 2009
###  29. Oktober 2009 ab 13.30 Uhr in Osnabrück
###  Alle Details und Agenda unter: http://www.linux-solution-day.de
###  
###  Gleich anmelden: mailto:i...@linux-solution-day.de?subject=anmeldung
###

++

LWsystems GmbH  Co. KG
Sitz der Gesellschaft: Tegelerweg 11, 49186 Bad Iburg
Telefon +49 (0)5403 5556
Telefax +49 (0)5403 7958997
Handelsregister: Amtsgericht Osnabrück, HRA 110668
USt.-ID-Nr. DE23852211

Persönlich haftende Gesellschafterin: LWsystems Verwaltungs GmbH
Sitz der Gesellschaft: Tegelerweg 11, 49186 Bad Iburg
Handelsregister: Amtsgericht Osnabrück, HRB 63

Geschäftsführer:
Dipl.-Ing. Ansgar H. Licher, Bad Iburg
Dipl.-Ing. Martin Werthmöller, Ibbenbüren 

Für weitere Firmendetails zu LWsystems siehe / 
For further company details please look at:
http://www.lw-systems.de/impressum

++




signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] Dovecot

2009-10-27 Thread Pascal Volk
On 10/27/2009 06:54 AM Stefan Onken wrote:
 …
 With my tests with Exim and Dovecot I had to set the home directory 
 within EXIM,  because I found no way to specify the homedir within dovecot.
 
 local_mysql_delivery_dovecot:
driver = pipe
command = /usr/lib/dovecot/deliver -d $local_p...@$domain
home_directory = /var/mails/${domain}/${local_part}/
 
 Maybe you can give me an idea to specify the homedir from the mysql 
 query as well.

I've done this two mails earlier. ;)
http://dovecot.org/list/dovecot/2009-October/044033.html

Maybe http://wiki.dovecot.org/AuthDatabase/SQL#MySQL and
http://wiki.dovecot.org/UserDatabase helps a little bit more.


Regards,
Pascal
-- 
The trapper recommends today: 5e1f1e55.0930...@localdomain.org


Re: [Dovecot] listing available subscriptions - shared mailboxes

2009-10-27 Thread Timo Sirainen

On Oct 27, 2009, at 9:14 AM, Hendrik Pahl wrote:


got a strange issue with 1.2.4 on SLES11. When listing the user's
available subscriptions with any client, every shared mailbox that can
be subscribed is listed twice, once with it's correct name, 'folder'  
for

example. the second appereance is without the last letter of the name,
'folde' for example. strange behaviour, since this happens with any
client. i hope somebody know what is wrong here.


1) Show dovecot -n output

2) Show the IMAP traffic of the LIST and LSUB commands' output. You  
could also do it manually:


telnet localhost 143
a login username password
b list  *
c lsub  *



[Dovecot] dovecot-2.0.alpha2 doesn't compile on Mac OS X

2009-10-27 Thread Mike Abbott

Howdy, dovecot-2.0.alpha2 doesn't compile on Mac OS X.

First, trivially, there's a typo in array.h:
--- a/src/lib/array.h   2009-10-08 10:04:35.0 -0500
+++ b/src/lib/array.h   2009-10-27 10:35:58.0 -0500
@@ -72,7 +72,7 @@
 (elem)++)
 #  define array_foreach_modifiable(array, elem) \
for (elem = ARRAY_TYPE_CAST_MODIFIABLE(array) \
-   buffer_get_modifiable_data((array)- 
arr.buffer, NULL)) + \

+   buffer_get_modifiable_data((array)-arr.buffer, NULL) + 
\
(array)-arr.buffer-used; \
	 elem != CONST_PTR_OFFSET(*(array)-v, (array)-arr.buffer- 
used); \

 (elem)++)


Second, Mac OS X can't link loadable modules against other loadable  
modules (http://www.finkproject.org/doc/porting/porting.en.html#shared.lib-and-mod 
):
--- a/src/plugins/fts-squat/Makefile.am	2009-10-18 16:28:45.0  
-0500
+++ b/src/plugins/fts-squat/Makefile.am	2009-10-27 10:35:58.0  
-0500

@@ -10,8 +10,9 @@
 module_LTLIBRARIES = \
lib21_fts_squat_plugin.la

-lib21_fts_squat_plugin_la_LIBADD = \
-   ../fts/lib20_fts_plugin.la
+# Apple can't link loadable modules against other loadable modules
+#lib21_fts_squat_plugin_la_LIBADD = \
+#  ../fts/lib20_fts_plugin.la

 lib21_fts_squat_plugin_la_SOURCES = \
fts-squat-plugin.c \

--- a/src/plugins/imap-acl/Makefile.am	2009-10-09 13:02:15.0  
-0500
+++ b/src/plugins/imap-acl/Makefile.am	2009-10-27 10:35:58.0  
-0500

@@ -14,8 +14,9 @@
 imap_module_LTLIBRARIES = \
lib02_imap_acl_plugin.la

-lib02_imap_acl_plugin_la_LIBADD = \
-   ../acl/lib01_acl_plugin.la
+# Apple can't link loadable modules against other loadable modules
+#lib02_imap_acl_plugin_la_LIBADD = \
+#  ../acl/lib01_acl_plugin.la

 lib02_imap_acl_plugin_la_SOURCES = \
imap-acl-plugin.c

--- a/src/plugins/imap-quota/Makefile.am	2009-10-09 13:02:15.0  
-0500
+++ b/src/plugins/imap-quota/Makefile.am	2009-10-27 10:35:58.0  
-0500

@@ -13,8 +13,9 @@
 imap_module_LTLIBRARIES = \
lib11_imap_quota_plugin.la

-lib11_imap_quota_plugin_la_LIBADD = \
-   ../quota/lib10_quota_plugin.la
+# Apple can't link loadable modules against other loadable modules
+#lib11_imap_quota_plugin_la_LIBADD = \
+#  ../quota/lib10_quota_plugin.la

 lib11_imap_quota_plugin_la_SOURCES = \
imap-quota-plugin.c

--- a/src/plugins/mail-log/Makefile.am	2009-10-09 13:02:15.0  
-0500
+++ b/src/plugins/mail-log/Makefile.am	2009-10-27 10:35:58.0  
-0500

@@ -13,8 +13,9 @@
 module_LTLIBRARIES = \
lib20_mail_log_plugin.la

-lib20_mail_log_plugin_la_LIBADD = \
-   ../notify/lib15_notify_plugin.la
+# Apple can't link loadable modules against other loadable modules
+#lib20_mail_log_plugin_la_LIBADD = \
+#  ../notify/lib15_notify_plugin.la

 lib20_mail_log_plugin_la_SOURCES = \
mail-log-plugin.c

--- a/src/plugins/trash/Makefile.am 2009-10-09 13:02:15.0 -0500
+++ b/src/plugins/trash/Makefile.am 2009-10-27 10:35:58.0 -0500
@@ -10,8 +10,9 @@
 module_LTLIBRARIES = \
lib11_trash_plugin.la

-lib11_trash_plugin_la_LIBADD = \
-   ../quota/lib10_quota_plugin.la
+# Apple can't link loadable modules against other loadable modules
+#lib11_trash_plugin_la_LIBADD = \
+#  ../quota/lib10_quota_plugin.la

 lib11_trash_plugin_la_SOURCES = \
trash-plugin.c


Third, for cross-compiling the value of WORDS_BIGENDIAN needs to be  
tested, not its presence:
--- a/src/lib-index/mail-transaction-log-file.c	2009-10-15  
21:26:13.0 -0500
+++ b/src/lib-index/mail-transaction-log-file.c	2009-10-27  
10:35:58.0 -0500

@@ -189,7 +189,7 @@
hdr-hdr_size = sizeof(struct mail_transaction_log_header);
hdr-indexid = log-index-indexid;
hdr-create_stamp = ioloop_time;
-#ifndef WORDS_BIGENDIAN
+#if !WORDS_BIGENDIAN
hdr-compat_flags |= MAIL_INDEX_COMPAT_LITTLE_ENDIAN;
 #endif

@@ -404,7 +404,7 @@
/* we have compatibility flags */
enum mail_index_header_compat_flags compat_flags = 0;

-#ifndef WORDS_BIGENDIAN
+#if !WORDS_BIGENDIAN
compat_flags |= MAIL_INDEX_COMPAT_LITTLE_ENDIAN;
 #endif
if (file-hdr.compat_flags != compat_flags) {



Re: [Dovecot] dovecot-2.0.alpha2 doesn't compile on Mac OS X

2009-10-27 Thread Timo Sirainen

On Oct 27, 2009, at 12:06 PM, Mike Abbott wrote:


Howdy, dovecot-2.0.alpha2 doesn't compile on Mac OS X.

First, trivially, there's a typo in array.h:
--- a/src/lib/array.h   2009-10-08 10:04:35.0 -0500
+++ b/src/lib/array.h   2009-10-27 10:35:58.0 -0500
@@ -72,7 +72,7 @@
(elem)++)
#  define array_foreach_modifiable(array, elem) \
   for (elem = ARRAY_TYPE_CAST_MODIFIABLE(array) \
-   buffer_get_modifiable_data((array)- 
arr.buffer, NULL)) + \

+   buffer_get_modifiable_data((array)-arr.buffer, NULL) + 
\


Thanks, fixed. But why is your compiler taking that code path?

#if (defined(__STDC__)  __STDC_VERSION__ = 199901L)

I think that should test that you're using C99 compiler, and gcc  
definitely is one. I'd think clang would also test success there.


Second, Mac OS X can't link loadable modules against other loadable  
modules (http://www.finkproject.org/doc/porting/porting.en.html#shared.lib-and-mod 
):


Again it seems to work in my Leopard + gcc. Or actually loading e.g.  
imap_quota without quota gives dlopen() error, but the compiling part  
works fine. It doesn't matter much that this happens, with OSes that  
support it it would have simply given a nicer error message:


Error: Can't load plugin imap_quota_plugin: Plugin quota must be  
loaded also


So are you saying that the compiling part also fails with you? What  
are you then doing differently? Anyway, if this needs to be disabled I  
guess I'll have to add a configure check for it. Any idea how that  
would work?


Third, for cross-compiling the value of WORDS_BIGENDIAN needs to be  
tested, not its presence:


Fixed.


[Dovecot] Test environment question

2009-10-27 Thread Stewart Dean
I want to test out my first V1.2 Dovecot (upgraded from V1.1) instance.  
What I have in mind to do is to run it on another machine that has the 
Inbox dir and homedirs  NFS import mounted from the production 
mailserver.  I then have 5 people test it in this test environment


A) Then I can deal with the index filesystem in one of two ways:
  1) Make it local OR
  2) NFS import it from the production DC server
Comments as to which is best?  I have used #1 before...which caused some 
temporary unhappiness with the switchover and switchbackduring which 
time the index is badly wrong and DC auto-rebuilds it...


B) Is there anything else I should do/not do? 
C) Any ugliness that will surface in this testing lashup but isn't 
important?


--
 Stewart Dean, Unix System Admin, Henderson Computer Resources 
Center of Bard College, Annandale-on-Hudson, New York 12504 
sd...@bard.edu voice: 845-758-7475, fax: 845-758-7035


Re: [Dovecot] SetUID check problem

2009-10-27 Thread Timo Sirainen
On Tue, 2009-10-27 at 09:03 -0400, Thomas Berezansky wrote:
 But for whatever reason, when deliver is called by something that IS  
 SetUID root I get the following error:
 
 /usr/local/libexec/dovecot/deliver must not be both world-executable  
 and setuid-root. This allows root exploits. See  
 http://wiki.dovecot.org/LDA#multipleuids

Fixed: http://hg.dovecot.org/dovecot-1.2/rev/ead94beba32a



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


Re: [Dovecot] dovecot-2.0.alpha2 doesn't compile on Mac OS X

2009-10-27 Thread Mike Abbott

Thanks, fixed. But why is your compiler taking that code path?

#if (defined(__STDC__)  __STDC_VERSION__ = 199901L)


For whatever reason, __STDC_VERSION__ isn't defined.  __STDC__ is  
though.


Second, Mac OS X can't link loadable modules against other loadable  
modules (http://www.finkproject.org/doc/porting/porting.en.html#shared.lib-and-mod 
):


So are you saying that the compiling part also fails with you?


Yes:
/bin/sh ../../../libtool --tag=CC   --mode=link gcc  -Os -pipe -module  
-avoid-version  -o lib02_imap_acl_plugin.la -rpath /usr/lib/dovecot  
imap-acl-plugin.lo ../acl/lib01_acl_plugin.la


*** Warning: Linking the shared library lib02_imap_acl_plugin.la  
against the loadable module

*** lib01_acl_plugin.so is not portable!
libtool: link: gcc -Wl,-undefined -Wl,dynamic_lookup -o .libs/ 
lib02_imap_acl_plugin.so -bundle  .libs/imap-acl-plugin.o   ../ 
acl/.libs/lib01_acl_plugin.so
ld: in ../acl/.libs/lib01_acl_plugin.so, can't link with bundle  
(MH_BUNDLE) only dylibs (MH_DYLIB) for architecture i386

collect2: ld returned 1 exit status



Re: [Dovecot] dovecot-2.0.alpha2 doesn't compile on Mac OS X

2009-10-27 Thread Timo Sirainen
On Tue, 2009-10-27 at 13:13 -0500, Mike Abbott wrote:
  Thanks, fixed. But why is your compiler taking that code path?
 
  #if (defined(__STDC__)  __STDC_VERSION__ = 199901L)
 
 For whatever reason, __STDC_VERSION__ isn't defined.  __STDC__ is  
 though.

Sounds like gcc isn't being run in C99 mode for some reason. Are you
giving any special configure or CFLAGS options?

 libtool: link: gcc -Wl,-undefined -Wl,dynamic_lookup -o .libs/ 
 lib02_imap_acl_plugin.so -bundle  .libs/imap-acl-plugin.o   ../ 
 acl/.libs/lib01_acl_plugin.so
 ld: in ../acl/.libs/lib01_acl_plugin.so, can't link with bundle  
 (MH_BUNDLE) only dylibs (MH_DYLIB) for architecture i386
 collect2: ld returned 1 exit status

I guess there's something different in your setup than in regular OSX. I
just got a new macbook, installed Xcode and Dovecot 2.0.alpha2 tarball
compiled without any errors.

Although fdatasync() seems to have gone missing from .h files, but still
exists in libc. I guess that's intentional?


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


[Dovecot] Dovecot, Shared Mailboxes (via symlink), and ACLs

2009-10-27 Thread Dave

Hello!  I just joined the list and will be happy to help where I can in
my limited experience, but also come to the table with a question.  I
think there's something I'm missing regarding shared mailboxes and ACLs,
so I will describe my situation and see if I am understanding correctly
(running Dovecot 1.1.10).  I have read over the Dovecot Wiki many times
and have scoured many forums but still can't seem to find a solution.

I have an IMAP mailbox that is working fine (user imapuser), so the
maildir and related structure is in:  /home/imapuser/Maildir

I have another IMAP mailbox for another imap user, newuser1, also
working fine, with maildir and related structure in:  /home/newuser1/Maildir

I have created a symlink under newuser1's Maildir to imapuser's Maildir
so as to give newuser1 access to the things in imapusers's inbox.  I
have also symlinked inside the newuser1 Maildir to a folder under
imapusers's inbox, let's call it MailingList, basically settiing up
something like:

/home/newuser1/Maildir:
cur/
.imapuserinbox - /home/imapuser/Maildir
.imapusermailinglist - /home/imapuser/Maildir/MailingList
new/
tmp/
(... and various other Dovecot-related files, nothing ACL related.)

Now, I have gotten the shared boxes to work IF I changed the permissions
to be rwx for user and group on /home/imapuser/Maildir/*, but this makes
procmail (and .procmailrc) unhappy and it starts sending things to mbox
files (old system) instead of sending them on to the Maildir.  So that
doesn't seem to work.  Which led me to ACLs.  Now, I've tried (after
enabling the two appropriate lines in dovecot.conf and restarting
dovecot, etc) both per-directory ACL files and global ACLs, and while I
can get some things to *change* as viewed by my mail client, I can't
seem to create consistent behavior.  I know that's fairly vague, but
it's like I'll change something in the global ACL and folders are
affected that I wouldn't anticipate, based on what I'm understanding of
ACLs.

So, in the example above, if I enable global ACLs, what names do I use
to refer to those shared boxes I'm trying to access?  Do I use the link
name I made, .imapuserinbox or .imapusermailinglist (without leading
periods), like /etc/dovecot/acls/imapuserinbox, or is it based off of
the original dir name?  Like do I need something like
/etc/dovecot/acls/MailingList ?  What about the inbox I'm sharing in
/home/imapuser/Maildir, how do I reference that?  Is there a way to do
it without affecting or changing permissions of other IMAP users and
inboxes on the same system?

One thing I am receiving consistently in the error logs is:
mail dovecot: IMAP(newuser1):
stat(/home/newuser1/Maildir/.imapuserinbox/tmp) failed: Permission
denied (euid=152(newuser1) egid=100(usergroup) UNIX perms seem ok, ACL
problem?)

So it seems if I get the ACL stuff right, I will be in business.  Any
ideas??  Thanks for any help anyone can give!!
Dave




[Dovecot] sieve and fileinto encoding

2009-10-27 Thread proton-sss

Hello All!
I`m using dovecot 1.2.6
I have folder named in russian САПП, and when in filter i wrote:
fileinto САПП;
all works well.

Now i find 2 web applications to manage sieve filters (horde-ingo and 
squirrelmail/avelsieve) - then creates filter like this:

if header :contains Subject САПП
{
fileinto  BCEEEAQfBB8-;
stop;
}

And creates another folder .-BCEEEAQfBB8-, but GOOD folder name 
already exist .BCEEEAQfBB8-.


Please help to understand why dovecots deliver make this happen.

Best regards
Michael

p.s.
dovecot -n
# 1.2.6: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.28-hardened-r9 i686 Gentoo Base System release 1.12.11.1 
reiserfs

log_path: /var/log/dovecot_err.log
info_log_path: /var/log/dovecot_info.log
protocols: imap pop3 imaps pop3s managesieve
ssl_cert_file: /etc/dovecot/ssl/mail.proton-sss.ru.pem
ssl_key_file: /etc/dovecot/ssl/mail.proton-sss.ru.key
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
login_executable(managesieve): /usr/libexec/dovecot/managesieve-login
mail_location: maildir:/home/%u/.maildir
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_executable(managesieve): /usr/libexec/dovecot/managesieve
mail_plugins(default): acl imap_acl
mail_plugins(imap): acl imap_acl
mail_plugins(pop3):
mail_plugins(managesieve):
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
mail_plugin_dir(managesieve): /usr/lib/dovecot/managesieve
namespace:
  type: private
  separator: /
  inbox: yes
  list: yes
  subscriptions: yes
namespace:
  type: shared
  separator: /
  prefix: shared/%%u/
  location: maildir:%%h/.maildir/:INDEX=%h/.maildir/shared/%%u
  list: children
  subscriptions: yes
lda:
  postmaster_address: postmas...@example.com
  mail_plugins: acl sieve
  mail_plugin_dir: /usr/lib/dovecot/lda
  log_path: /var/log/dovecot_deliver.log
auth default:
  mechanisms: plain login
  passdb:
driver: ldap
args: /etc/dovecot/dovecot-ldap.conf
  userdb:
driver: ldap
args: /etc/dovecot/dovecot-ldap.conf
  socket:
type: listen
client:
  path: /var/run/dovecot/auth-client
  mode: 432
  group: mail
master:
  path: /var/run/dovecot/auth-master
  mode: 432
  user: mail
  group: users
plugin:
  acl: vfile
  acl_shared_dict: file:/var/lib/dovecot/shared-mailboxes
  sieve: %h/.dovecot.sieve
  sieve_dir: %h/sieve
dict:
  expire: db:/var/lib/dovecot/expire.db



Re: [Dovecot] sieve and fileinto encoding

2009-10-27 Thread Timo Sirainen
On Wed, 2009-10-28 at 00:14 +0300, proton-sss wrote:
 Hello All!
 I`m using dovecot 1.2.6
 I have folder named in russian САПП, and when in filter i wrote:
  fileinto САПП;
 all works well.

This is the correct way.

 Now i find 2 web applications to manage sieve filters (horde-ingo and 
 squirrelmail/avelsieve) - then creates filter like this:
 if header :contains Subject САПП
 {
 fileinto  BCEEEAQfBB8-;
 stop;
 }

This is the wrong way, but they're doing it because some existing
software didn't handle the UTF-8 mailbox names properly. I'd suggest
fixing this on ingo/avelsieve side. Perhaps they already have a setting
for it.


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


Re: [Dovecot] Dovecot, Shared Mailboxes (via symlink), and ACLs

2009-10-27 Thread proton-sss

Hello!
I think, if you keep maildirs by different uid then you must change file 
permissons to permit access to shared maildir.
I don`t now about procmail delivery options, but in dovecots deliver - 
if you create in shared maildir file called dovecot-shared, than 
deliver will keep permissions like this file.


After long experiments i choose dovecots v1.2 shared maildir scheme with 
imap acls.


Best Regards!
Michael

27.10.2009 22:51, Dave пишет:

Hello!  I just joined the list and will be happy to help where I can in
my limited experience, but also come to the table with a question.  I
think there's something I'm missing regarding shared mailboxes and ACLs,
so I will describe my situation and see if I am understanding correctly
(running Dovecot 1.1.10).  I have read over the Dovecot Wiki many times
and have scoured many forums but still can't seem to find a solution.

I have an IMAP mailbox that is working fine (user imapuser), so the
maildir and related structure is in:  /home/imapuser/Maildir

I have another IMAP mailbox for another imap user, newuser1, also
working fine, with maildir and related structure in:  
/home/newuser1/Maildir


I have created a symlink under newuser1's Maildir to imapuser's Maildir
so as to give newuser1 access to the things in imapusers's inbox.  I
have also symlinked inside the newuser1 Maildir to a folder under
imapusers's inbox, let's call it MailingList, basically settiing up
something like:

/home/newuser1/Maildir:
cur/
.imapuserinbox - /home/imapuser/Maildir
.imapusermailinglist - /home/imapuser/Maildir/MailingList
new/
tmp/
(... and various other Dovecot-related files, nothing ACL related.)

Now, I have gotten the shared boxes to work IF I changed the permissions
to be rwx for user and group on /home/imapuser/Maildir/*, but this makes
procmail (and .procmailrc) unhappy and it starts sending things to mbox
files (old system) instead of sending them on to the Maildir.  So that
doesn't seem to work.  Which led me to ACLs.  Now, I've tried (after
enabling the two appropriate lines in dovecot.conf and restarting
dovecot, etc) both per-directory ACL files and global ACLs, and while I
can get some things to *change* as viewed by my mail client, I can't
seem to create consistent behavior.  I know that's fairly vague, but
it's like I'll change something in the global ACL and folders are
affected that I wouldn't anticipate, based on what I'm understanding of
ACLs.

So, in the example above, if I enable global ACLs, what names do I use
to refer to those shared boxes I'm trying to access?  Do I use the link
name I made, .imapuserinbox or .imapusermailinglist (without leading
periods), like /etc/dovecot/acls/imapuserinbox, or is it based off of
the original dir name?  Like do I need something like
/etc/dovecot/acls/MailingList ?  What about the inbox I'm sharing in
/home/imapuser/Maildir, how do I reference that?  Is there a way to do
it without affecting or changing permissions of other IMAP users and
inboxes on the same system?

One thing I am receiving consistently in the error logs is:
mail dovecot: IMAP(newuser1):
stat(/home/newuser1/Maildir/.imapuserinbox/tmp) failed: Permission
denied (euid=152(newuser1) egid=100(usergroup) UNIX perms seem ok, ACL
problem?)

So it seems if I get the ACL stuff right, I will be in business.  Any
ideas??  Thanks for any help anyone can give!!
Dave





--

Системный администратор
ООО НПП СПЕЦСТРОЙ-СВЯЗЬ
Захаренко Михаил
тел. +78634 311562 доб. 478



Re: [Dovecot] Dovecot, Shared Mailboxes (via symlink), and ACLs

2009-10-27 Thread Timo Sirainen
On Tue, 2009-10-27 at 14:51 -0500, Dave wrote:
 Now, I have gotten the shared boxes to work IF I changed the permissions
 to be rwx for user and group on /home/imapuser/Maildir/*, but this makes
 procmail (and .procmailrc) unhappy and it starts sending things to mbox
 files (old system) instead of sending them on to the Maildir.  So that
 doesn't seem to work.  

You'll need to set UNIX permissions in a way that it works.

 Which led me to ACLs.

Dovecot ACLs won't get you around UNIX permission problems.

 One thing I am receiving consistently in the error logs is:
 mail dovecot: IMAP(newuser1):
 stat(/home/newuser1/Maildir/.imapuserinbox/tmp) failed: Permission
 denied (euid=152(newuser1) egid=100(usergroup) UNIX perms seem ok, ACL
 problem?)
 
 So it seems if I get the ACL stuff right, I will be in business.

No. What that means is that there's probably a bug in the code that
tries to check what permission problem you have (hopefully fixed in
later version, v1.1.10 is getting a bit old). The ACL it mentions isn't
Dovecot ACLs, but filesystem ACLs or perhaps SELinux or something else.
I guess I should change the error message.


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


Re: [Dovecot] meaning of parameter imap_idle_notify_interval??

2009-10-27 Thread Timo Sirainen
On Tue, 2009-10-27 at 09:55 +0100, Ingo Thierack wrote:
 sorry to say, no change.
 Takes more then 2 minutes until tb register there is a new mail.
 
 I'm the only with this behavior?

At least only one who has noticed it..

 Could there be an problem with the inotify implementation in the 
 CentOS-Kernel?

I doubt it, but you could try if the attached patch logs a line whenever
a new message arrives. If it does get logged and Dovecot doesn't send an
EXISTS line to Thunderbird immediately, there's a bug. If that does
happen, the next step could be to try it manually instead of using
Thunderbird, e.g.:

telnet localhost 143
a login username password
b select inbox
c idle

and then see if the EXISTS gets sent.
diff -r 04d841ecb5bf src/lib/ioloop-notify-inotify.c
--- a/src/lib/ioloop-notify-inotify.c	Tue Oct 27 17:35:16 2009 -0400
+++ b/src/lib/ioloop-notify-inotify.c	Tue Oct 27 17:38:26 2009 -0400
@@ -40,6 +40,8 @@
 	struct io_notify *io;
 	ssize_t ret, pos;
 
+	i_warning(inotify triggered);
+
 	/* read as many events as there is available and fit into our buffer.
 	   only full events are returned by the kernel. */
 	ret = read(ctx-inotify_fd, event_buf, sizeof(event_buf));


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


Re: [Dovecot] mailbox count folders issues

2009-10-27 Thread Timo Sirainen
On Tue, 2009-10-27 at 09:48 +0200, Nikita Koshikov wrote:
 I have one user, which have a lot of folders (not it is 414 without INBOX). 
 When he tries to create one more folder with random name - the folder 
 successfully created, but LIST command invokes out of memory to imap process.
 
 From the logs:
 Oct 26 15:26:38 IMAP(gozhd...@domain.com): Panic: data stack: Out of memory 
 when allocating 268435472 bytes
 Oct 26 15:26:38 IMAP(gozhd...@domain.com): Error: *** glibc detected *** 
 imap: double free or corruption (!prev): 0x0812ba00 ***

This is bad. Can you reproduce it easily? Could you cause this crash
under valgrind? For example:

protocol imap {
  mail_executable = /usr/local/bin/imap.sh
}

and /usr/local/bin/imap.sh:

#!/bin/sh

if [ $USER = gozhd...@domain.com ]; then
  exec /usr/bin/valgrind /usr/libexec/dovecot/imap
else
  exec /usr/libexec/dovecot/imap
fi

Valgrind will hopefully then log to Dovecot's log what exactly is the
problem.

It's anyway related to one of your virtual maiboxes. I suppose you have
a virtual mailbox that includes messages from all real mailboxes?


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


Re: [Dovecot] Hundreds of auth-worker sockets in /etc/dovecot

2009-10-27 Thread Timo Sirainen
On Sun, 2009-10-25 at 13:22 +0100, Eggert Ehmke wrote:
 I run dovecot 1.2.6, before last update I had 1.2.2. on Debian Lenny. I 
 noticed that my config directory /etc/dovecot is filled up with hundreds of 
 old auth-worker.12345 sockets. 

They should exist in Dovecot's base_dir, which is by default
in /var/run/dovecot/ directory.

 I guess they should have been cleaned up, is 
 there a misconfiguration? When I remember right, this did not happen with 
 dovecot 1.1.

They get wiped out from base_dir when Dovecot starts up. If your
base_dir isn't in /etc/dovecot/, I've no idea why they would have gone
there.



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


Re: [Dovecot] dovecot.log file permissions and ownership

2009-10-27 Thread Timo Sirainen
On Sun, 2009-10-25 at 07:14 -0400, Jerry wrote:
 Using FreeBSD-7.2 and Dovecot v1.2.4
 
 what user does dovecot use to write to its log file? I have the logfile
 located in the /var/log directory.

Most of Dovecot writes to it as root, but deliver is a special case.

 I have Postfix configured to use 'virtual' users and use dovecot for
 delivery.
 
 While dove can write to the file when accessed for POP services, when
 accessed via Postfix, I get this error message:
 
 Oct 25 07:02:15 scorpio postfix/pipe[56956]: B01BD2287E: 
 to=u...@domain.com, relay=dovecot, delay=220, delays=220/0.01/0/0.04, 
 dsn=4.3.0, status=deferred (temporary failure. Command output: Can't open log 
 file /var/log/dovecot.log: Permission denied )

Then you either need to make it writable to the user that runs pipe, or
use a different file. http://wiki.dovecot.org/LDA#Logging

 I have used the following ownership types for the file:
 
 1) root:wheel
 2) dovecot:dovecot
 3) root:dovecot
 4) dovecot:wheel

Never use dovecot user for anything at all. It's internal to Dovecot
and you never need to give it access to anything or set any file to be
owned by dovecot.

 The only thing that works all the time is to give the file full r/w
 (0666) permission. That seems extreme.

What user did you give to Postfix's pipe in master.cf? That's the user
you need.


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


Re: [Dovecot] meaning of parameter imap_idle_notify_interval??

2009-10-27 Thread Ingo Thierack
tried the telnet approach.
patched in the logline.

[i...@mail ~]$ telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
STARTTLS AUTH=PLAIN AUTH=CRAM-MD5 AUTH=DIGEST-MD5] ready.
a login  
a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
SORT THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN
NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH
ESORT SEARCHRES WITHIN CONTEXT=SEARCH] Logged in
b select inbox
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk
\*)] Flags permitted.
* 13 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1252958392] UIDs valid
* OK [UIDNEXT 37] Predicted next UID
* OK [HIGHESTMODSEQ 81] Highest
b OK [READ-WRITE] Select completed.
c idle
+ idling

after idling displayed, i sent a message to the account.

see the message delivered to the inbox in my syslog

 2009-10-27 23:35:20 | dovecot:   | 
deliver(i...@ghostdive.org): sieve:
msgid=ac2e3a8f0910271535q4c5096a8w56d31e117cb7b...@mail.gmail.com:
stored mail into mailbox 'INBOX'

in logfile:
b select
inbox   
  

 
 
   

c
idle

 

 

out logfile:

* OK [RAWLOG TIMESTAMP] 2009-10-27
23:34:55
   

a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
SORT THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN
NAMESPACE UIDPLUS LIST-E
XTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN
CONTEXT=SEARCH] Logged
in
 
 
   

* OK [RAWLOG TIMESTAMP] 2009-10-27
23:35:00
   

* FLAGS (\Answered \Flagged \Deleted \Seen \Draft
NonJunk)
 

* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk
\*)] Flags
permitted.  


* 13
EXISTS  

 

* 0
RECENT  

  

* OK [UIDVALIDITY 1252958392] UIDs
valid   
   

* OK [UIDNEXT 37] Predicted next
UID 
 

* OK [HIGHESTMODSEQ 81]
Highest 
  

b OK [READ-WRITE] Select
completed.  
 

 
 
   

+
idling  

 

 
 
   

* OK [RAWLOG TIMESTAMP] 2009-10-27
23:38:03
   

* OK Still
here


  


Timo Sirainen schrieb:
 On Tue, 2009-10-27 at 09:55 +0100, Ingo Thierack wrote:
   
 sorry to say, no change.
 Takes more then 2 minutes until tb register there is a new mail.

 I'm the only with 

Re: [Dovecot] Multiple SSL certs question

2009-10-27 Thread Timo Sirainen
On Sat, 2009-10-24 at 13:35 +0200, Jean-Baptiste Vignaud wrote:
 Hello;
 
 I was reading the message how to config dovecot for multiple domains,
 multiple SSL certs, 

This works in v2.0, assuming you have separate IP for each.

 and conditional IP access -- with passwd-file passdb?, 

http://wiki.dovecot.org/PasswordDatabase/ExtraFields/AllowNets can be
added to passwd-file extra fields.

 and i was wondering if Dovecot could support the SNI
 extention of TLS ?

Oh, I didn't know this was already in OpenSSL. I'll see about adding
support for it to v2.0. I'm not entirely sure how to make it
configurable though. Perhaps instead of having:

local_ip 1.2.3.4 {
  ssl_cert = /etc/ssl/certs/1.2.3.4
}
remote_ip 4.3.2.1 {
}

I could replace those with:

local host.domain.org {
  ssl_cert = /etc/ssl/certs/1.2.3.4
}
remote host2.domain2.org {
}

and of course keep the IPs also working.


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


Re: [Dovecot] Error: userdb lookup

2009-10-27 Thread Timo Sirainen
On Fri, 2009-10-23 at 16:58 +0200, kfx wrote:
 But then the userdb lookup fail and it tells me this in the log:
 deliver(u...@mydomain): Error: userdb lookup: 
 connect(/usr/local/var/run/dovecot/auth-master) failed: No such file or 
 directory

I suppose you added -d parameter to deliver also.

 This is strange because:
 a. the socket is at /var/run/dovecot/auth-master

Change either that from auth { socket { .. } } path or change
auth_socket_path setting.

 b. it is working flawlessly with the original user_attrs value

Changing user_attrs can't cause this error. Adding -d parameter to
deliver does.

 My postfix's master.cf with the deliver relevant line:
 dovecot   unix  -   n   n   -   -   pipe
   flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f 
 ${sender} -d ${recipient}
 
 My postfix's main.cf with the deliver relevant line:
 mailbox_command = /usr/local/libexec/dovecot/deliver

If you're using dovecot transport, you should probably remove the
mailbox_command since it only causes confusion.

Also one more possibility to fix this instead of using deliver -d
parameter is to set:

plugin {
  home = /var/vmail/%u/home
}


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


Re: [Dovecot] simple steps with sieve

2009-10-27 Thread Timo Sirainen
On Tue, 2009-10-20 at 12:28 +0100, Peter Borg wrote:

 So we have exactly the same issue - vacation responses appear from
 user-dom...@hostservername.

Do you think it would be enough to just add a new -r sender parameter
to deliver and all user's From: fields would use it? (I guess probably
only vacation for now.)



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


Re: [Dovecot] meaning of parameter imap_idle_notify_interval??

2009-10-27 Thread Timo Sirainen
You seem to have kind of mixed everything into one so I don't know what
happened. Rawlog (*.in, *.out files) isn't the same as where my patch
was logging the message, it went to Dovecot's error log
http://wiki.dovecot.org/Logging. Also do you mean there was no EXISTS
reply sent at all after IDLE was started in either rawlog or telnet
session?

So the most important thing: After deliver logs the message, how long
does it take for inotify triggered message to get written to Dovecot's
log file? Or does it never get logged there? (Make sure you're looking
at the log file where dovecot --log-error writes This is Dovecot's
warning log.)

On Tue, 2009-10-27 at 23:42 +0100, Ingo Thierack wrote:
 tried the telnet approach.
 patched in the logline.
 
 [i...@mail ~]$ telnet localhost 143
 Trying 127.0.0.1...
 Connected to localhost.localdomain (127.0.0.1).
 Escape character is '^]'.
 * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
 STARTTLS AUTH=PLAIN AUTH=CRAM-MD5 AUTH=DIGEST-MD5] ready.
 a login  
 a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
 SORT THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN
 NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH
 ESORT SEARCHRES WITHIN CONTEXT=SEARCH] Logged in
 b select inbox
 * FLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk)
 * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk
 \*)] Flags permitted.
 * 13 EXISTS
 * 0 RECENT
 * OK [UIDVALIDITY 1252958392] UIDs valid
 * OK [UIDNEXT 37] Predicted next UID
 * OK [HIGHESTMODSEQ 81] Highest
 b OK [READ-WRITE] Select completed.
 c idle
 + idling
 
 after idling displayed, i sent a message to the account.
 
 see the message delivered to the inbox in my syslog
 
  2009-10-27 23:35:20 | dovecot:   | 
 deliver(i...@ghostdive.org): sieve:
 msgid=ac2e3a8f0910271535q4c5096a8w56d31e117cb7b...@mail.gmail.com:
 stored mail into mailbox 'INBOX'
 
 in logfile:
 b select
 inbox 
 
 



 
 c
 idle  
   
  
 
  
 
 out logfile:
 
 * OK [RAWLOG TIMESTAMP] 2009-10-27
 23:34:55  
  
 
 a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
 SORT THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN
 NAMESPACE UIDPLUS LIST-E
 XTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN
 CONTEXT=SEARCH] Logged
 in



 
 * OK [RAWLOG TIMESTAMP] 2009-10-27
 23:35:00  
  
 
 * FLAGS (\Answered \Flagged \Deleted \Seen \Draft
 NonJunk)  

 
 * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk
 \*)] Flags
 permitted.
   
 
 * 13
 EXISTS
   
  
 
 * 0
 RECENT
   
   
 
 * OK [UIDVALIDITY 1252958392] UIDs
 valid 
  
 
 * OK [UIDNEXT 37] Predicted next
 UID   

 
 * OK [HIGHESTMODSEQ 81]
 Highest   
 
 
 b OK [READ-WRITE] Select
 completed.

 



 
 +
 idling   

Re: [Dovecot] 1.1 Quota Question

2009-10-27 Thread Timo Sirainen
On Thu, 2009-10-22 at 16:16 -0700, Marty Anstey wrote:
 We are currently running Dovecot 1.1.16  Postfix; maildir++.
 
 When a message arrives for a mailbox which is over quota, it is bounced.
 Obviously, this isn't very desirable; the primary downside to this is
 that when junk mail hits a full mailbox it's bounced to that recipient
 of the message. On a busy mail system, that could potentially get us
 blacklisted pretty quickly. Ideally we would like to reject the messages
 inline. Is there an easy way to set this up?

a) Use deliver -e parameter and configure your MTA to wait on replying
to DATA command until deliver has finished. I don't know how to make
Postfix do this (or perhaps it does it by default? dunno).

b) Use quota_warning scripts on 100% quota usage to update user's quota
full bit in a database (or wherever) and have Postfix reject RCPT TO
command based on that information. I don't know how to do that on
Postfix's side either.


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


Re: [Dovecot] Public Folder Quotas

2009-10-27 Thread Timo Sirainen
On Thu, 2009-10-22 at 11:32 -0500, Peter Fraser wrote:
 Hi All
 
 I'm really busy adding features to dovecot running on my dev box to
 later move into prod. I saw where public mailbox quotas was added to
 1.2 Does anyone have this working? I haven't been able to find docs on
 that as of yet.

I suppose you mean something like:

namespace public {
  prefix = Public/
  ..
}

quota = ..
quota2 = maildir:Public quota:ns=Public/

This creates a separate shared quota for all mailboxes in Public/
namespace. I've no idea if it really works, but the code is there. Let
me know if it doesn't. :)


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


Re: [Dovecot] Dovecot, Shared Mailboxes (via symlink), and ACLs

2009-10-27 Thread Dave

 Now, I have gotten the shared boxes to work IF I changed the permissions
 to be rwx for user and group on /home/imapuser/Maildir/*, but this makes
 procmail (and .procmailrc) unhappy

 You'll need to set UNIX permissions in a way that it works.

Thank you for the responses!  OK, it seems from some reading and 
experimentation that procmail will bail very quickly if it doesn't like 
permissions on its user directories and procmailrc files, so what I 
discovered was that I can give EVERYTHING user and group permissions 
under imapuser's Maildir (either rwx or rw depending on context) but 
that still won't let the shared folders work... although that's part of 
it.  Only when I change the permissions of the main imapuser folder 
(/home/imapuser in this example) to 770 will it work.  But, that breaks 
procmail.  As does 760 or apparently giving any write permissions to 
anyone besides the owner.  If I change the permissions to 750, 
everything automagically works.  I can move messages, delete, view, 
etc.  So, I guess that is that!


 later version, v1.1.10 is getting a bit old). The ACL it mentions isn't
 Dovecot ACLs, but filesystem ACLs or perhaps SELinux or something else.
 I guess I should change the error message.

Thanks for letting me know the difference in the ACLs mentioned in the 
error message, that was definitely part of my confusion!!  That put me 
on the path to figuring it out. :)

Dave


Re: [Dovecot] second fs quota root crashes

2009-10-27 Thread Timo Sirainen
On Tue, 2009-10-20 at 14:52 +0200, Juergen Obermann wrote:
 Hallo.
 
 In our dovecot 1.2.6 server running under Solaris 9 I would like to set up a
 second quota root because the mail folders are in the users home directories 
 and
 the inboxes of all users are in /var/mail. As soon as I add
 
   quota2 = fs:INBOX:noenforcing:mount=/var/mail
 
 the imap client crashes repeatedly as soon as the user tries to open a mail
 folder. 

I guess this helps? http://hg.dovecot.org/dovecot-1.2/rev/439e14ff1467

Or just adding the mount= path to the first quota setting.



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


Re: [Dovecot] Public Folder Quotas

2009-10-27 Thread Anton Dollmaier

Hi folks,



I suppose you mean something like:

namespace public {
  prefix = Public/
  ..
}

quota = ..
quota2 = maildir:Public quota:ns=Public/


We have this running in exactly that way.



This creates a separate shared quota for all mailboxes in Public/
namespace. I've no idea if it really works, but the code is there. Let
me know if it doesn't. :)


it does work :)


At least, with my tests at the beginning: public quota of 1kb, now a 
move of a local mail to the shared namespace fails, RoundCube and 
Thunderbird show the correct message. Customers didn't complain after 
the dovecot 1.2.6-upgrade, so I assume it's still working.


And, even more: ThunderBird (also with raw IMAP) show the shared quota 
as being different than the local quota.




best regards,

Anton


Re: [Dovecot] antispam-plugin 1.2 and trailing carriage-returns

2009-10-27 Thread Timo Sirainen
On Tue, 2009-09-01 at 22:20 +0200, Karsten Bräckelmann wrote:
 The mail that is being trained is different than its respective source
 in the mbox file. The trained one shows added, trailing carriage-return
 chars for all headers, which are not in the headers in the mbox file.
 
 This breaks sa-learn -- both these variations are different, and SA
 would learn *both* when run against each one separately.
 
 How comes? Any insight? 

Probably because incoming mails have CRLF linefeeds. Antispam plugin
could drop these by wrapping the mail_get_stream()'s returned input
stream to i_stream_create_lf().


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


Re: [Dovecot] Wish-list: X-Delivered-To headers generated by dovecot-deliver

2009-10-27 Thread Timo Sirainen
On Sat, 2009-10-17 at 22:41 +0200, Andrzej Adam Filip wrote:
 Would it be sensible/cost effective to make dovecot-deliver generated
 X-Delivered-To header(s) based on command line parameter(s)?
 [after striping such existing headers, before consulting sieve]

How exactly would that work? How is X-Delivered-To different from
Delivered-To header? Do you mean there would be another parameter
specifying what its content is?

Somehow this sounds more like MTA's job (and perhaps LMTP server's job,
so I might need to do that anyway there).


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


Re: [Dovecot] dovecot-auth stops responding

2009-10-27 Thread Timo Sirainen
On Wed, 2009-09-16 at 13:50 -0400, Jonathan Siegle wrote:
  I found something in syslog today:
 
  local0.log.20090916:Sep 16 11:58:01 dovecot: auth(default): BUG:  
  Worker sent reply with id 1, expected 2
  local0.log.20090916:Sep 16 11:58:01 dovecot: auth(default): worker- 
  server(foo,146.186.125.214): Aborted: Worker is buggy
 
 
 Found thread from August(Aborted: Worker is buggy ) and am applying  
 patch as suggested.

Did that fix dovecot-auth hanging?



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


Re: [Dovecot] Sieve vacation with russian subject

2009-10-27 Thread Timo Sirainen
On Fri, 2009-10-16 at 11:48 +0400, Proskurin Kirill wrote:

 Is this problem still not fixed in new sieve implementation?

I just implemented message header encoder:
http://hg.dovecot.org/dovecot-1.2/rev/bd4a6f500c75

So only thing left to do is for Stephan to start using it. :)


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


Re: [Dovecot] Error: NO Mailbox is locked

2009-10-27 Thread Timo Sirainen
On Fri, 2009-10-16 at 13:48 +0200, Giovanni Mancuso wrote:
 In dovecot log, i have:
 
 Error: IMAP(em...@domain.com): nfs_flush_fcntl:
 fcntl(/maildirs/domain.com/user/Maildir/dovecot.index.cache, F_RDLCK)
 failed: Interrupted system call

If your NFS lockd doesn't work fast enough or well enough I guess NFS
cache flushes can cause problems like these.. Do you have more than one
Dovecot instance accessing the mailboxes in NFS server? If not, just
remove mail_nfs_*=yes settings and this should go away.



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