Re: [Dovecot] dot-containing foldernames \HasNoChildren bug ?

2010-08-06 Thread Samuel Kvasnica
 On 08/06/2010 12:49 AM, Timo Sirainen wrote:
 On 5.8.2010, at 21.13, Samuel Kvasnica wrote:

 Hi Timo,

 On 08/05/2010 06:26 PM, Timo Sirainen wrote:
 I think this problem shows up only with acl+listescape combination. I
 fixed it for v2.0 now with
 http://hg.dovecot.org/dovecot-2.0/rev/e77310eedfbb. Some of the other
 commits before that were also required to get it working correctly. I'm
 not sure if porting that patch to v1.2 would fix it or not, probably too
 much trouble anyway..
 Is it really not feasible to port the patch to 1.2 ? (could you give a
 hint, what other patches might be needed?)
 If that one patch alone fixes it (but I'm 70% sure it doesn't), it wouldn't 
 be too difficult to backport it. Who knows, the patch might even apply 
 without any conflicts (you can try). But if that isn't enough, then the 
 changes would be too big.

I tried already but it does not even compile, some basic functionality
in array.h is missing, seems really like big changes...

 Is 2.0 stable enough to be deployed in production environment right now ?

 I'll probably release 2.0.rc5 tomorrow and 2.0.0 next week. The current v2.0 
 rcs are also in production in several small/medium sized installations.
Hmm, might be really the best way, I would give it a try. But I'm having
quite a hard time to convert configs to 2.0. The docs on wiki is not
complete and
the

doveconf -n -c dovecot-1.conf  dovecot-2.conf

command seems to remove rather big part of of original config... still fighting 
with sieve and some other plugins.





[Dovecot] Panic: file ioloop-iolist.c: line 25 (ioloop_iolist_add): assertion failed

2010-08-06 Thread Computer Department (Watchtower South Africa Branch)
Hi,

I receive the following message after running /etc/init.d/dovecot
reload:

Aug 06 02:00:11 dovecot: Warning: SIGHUP received - reloading
configuration
Aug 06 02:00:11 dovecot: Panic: file ioloop-iolist.c: line 25
(ioloop_iolist_add): assertion failed: (list-ios[idx] == NULL)

I'm running dovecot version 1.2.13, compiled against uclibc on the
Alpine Linux distro, version 1.10.6. This problem started to occur since
upgrading to dovecot 1.2.12 from dovecot 1.2.11. No configuration has
been changed in between these versions.

# 1.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32.16-grsec i686  rootfs
log_path: /var/log/dovecot.log
info_log_path: /var/log/dovecot-info.log
protocols: imap imaps pop3 pop3s
ssl_cert_file: /etc/lighttpd/server-bundle.pem
ssl_key_file: /etc/lighttpd/server-bundle.pem
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
mail_location: maildir:/var/mail/domains/%d/%n
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
lda:
  postmaster_address: ad...@windhoek.zaf.wtbts.net
  mail_plugins: quota
  auth_socket_path: /var/run/dovecot/auth-master
  sendmail_path: /usr/sbin/sendmail
auth default:
  verbose: yes
  passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  userdb:
driver: prefetch
  userdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
  socket:
type: listen
master:
  path: /var/run/dovecot/auth-master
  mode: 432
  user: vmail
  group: vmail
plugin:
  quota: dict:user::proxy::quotadict
dict:
  quotadict: pgsql:/etc/dovecot/dovecot-dict-quota.conf

The init.d script can be found here:
http://git.alpinelinux.org/cgit/aports/tree/main/dovecot/dovecot.initd?h
=1.10-stableid=a3087eff06dff4a69b2914cdc1bbe76dce29b448 

Any ideas?

Thanks for any help you can provide.

Duane Hughes





Re: [Dovecot] Double logging problem

2010-08-06 Thread Nikolaos Milas

 I worked it out:

I modified syslog as follows:

*.info;mail.none;authpriv.none;cron.none;local1.none
/var/log/messages


Regards,
Nick

On 5/8/2010 5:46 μμ, Nikolaos Milas wrote:


Could I use something like (in syslog.conf):

*.info;mail.none;authpriv.none;cron.none;dovecot.none 
   /var/log/messages


to capture dovecot messages and *exclude* them from /var/log/messages 
? I am not sure if syslog understands dovecot.none. Please explain 
how this could be done.




[Dovecot] Strange behaviour when add new mailbox to IMAP (v 1.2.13)

2010-08-06 Thread Alexander Chekalin

Hi,

I think I need to ask you for advice. Personally I face that for the 
first time and hardly imagine this could be possible at all, but...


My setup is simple: I have one mail server where all of my mail accounts 
are stored, and another one to store backup of all mailings.


The scheme is simple, SMTP on first server forwards a copy of each 
message to address catch...@secondserver.my-domain. So whenever I need 
to restore any message I'll simple search for it on second server.


Both servers are have Dovecot 1.2.13 as IMAP servers. First server's 
Dovecot is sql-backed one, the second server's (in fact it serving just 
one box) is using passwd-style text file auth. Other than this, setup is 
pretty similiar, and everything is well, but here is the mystery:


I use Thunderbird (yesterday it was 3.1.1 and now it is 3.1.2) as my 
IMAP client. When I connect to my IMAP account on second server, and 
create mailbox, I see that there appears greyed folder named 
#virtual^Sent , and my new mailbox is in it.


When I do the same thing on first server, everything works just as I 
expect it (new mailbox created right under root of my IMAP account). If 
I create on second server new mailbox right under any existing (say, 
under Inbox) everything is fine also.



To check the problem I simplified my Dovecot config to the bare minimum, 
and it also won't work (#virtual^Sent still there). When I see on server 
disk, I see there .#virtual^Sent.NewTestMailbox dir (NewTestMailbox is 
the test mailbox I created), but there is no .#virtual^Sent dir.


I rebuilt Dovecot, and also tried to build 1.2.12, none worked.

May there be any solution for that?
Yours,
  Alexander Chekalin


Re: [Dovecot] dot-containing foldernames \HasNoChildren bug ?

2010-08-06 Thread Samuel Kvasnica
 Hi Timo,

I got 2.0 from trunk kind of working now, but the listescape is still
broken ! The haschildren flag is correct now, but I cannot use (list or
create) any subfolders in general when listescape enabled
in config, only folders directly in inbox root work normal.

When clicking e.g. at folder 'zzz', getting these error messages on client:
The current operation on 'zzz' did not suceed. The mail server for
account x...@aaa.com responded: Invalid mailbox name: xxx/zzz


 I'll probably release 2.0.rc5 tomorrow and 2.0.0 next week. The current v2.0 
 rcs are also in production in several small/medium sized installations.



[Dovecot] Problem creating sockets after Solaris Live Upgrade

2010-08-06 Thread Jürgen Obermann


Hello, 

I use Solaris Live Upgrade to install solaris patches in an alternate boot 
environment. Unfortunately the dovecot sockets 
/opt/local/var/run/dovecot/dict-server and 
/opt/local/var/run/dovecot/login/default are created as normal files in the 
ABE. After switching to the ABE dovecot will not start because of the existence 
of these two files. After removing these files dovecot starts normally. I think 
that dovecot should create the sockets even if there exist files with the same 
names. Here is the protocol of this:

Dovecot uses two sockets in the running system:

# ls -al /opt/local/var/run/dovecot/login/default 
/opt/local/var/run/dovecot/dict-server
srwxrwxrwx   1 root root   0 Aug  4 10:07 
/opt/local/var/run/dovecot/dict-server
srw-rw   1 root dovecot0 Aug  4 10:07 
/opt/local/var/run/dovecot/login/default

In the Alternate Boot Environment created with Solaris Live Upgrade there are 
normal files instead of the sockets:

# ls -al /a/opt/local/var/run/dovecot/login/default 
/a/opt/local/var/run/dovecot/login/default
-rw-rw   1 root dovecot0 Jul  7 17:01 
/a/opt/local/var/run/dovecot/login/default
-rw-rw   1 root dovecot0 Jul  7 17:01 
/a/opt/local/var/run/dovecot/login/default

During booting this ABE dovecot will not start, unless both files are removed:

Aug  6 06:55:30 hostname dovecot: Fatal: Socket already exists: 
/opt/local/var/run/dovecot/dict-server

# ls -al /opt/local/var/run/dovecot/dict-server
-rwxrwxrwx   1 root root   0 Aug  4 10:09 
/opt/local/var/run/dovecot/dict-server

# rm /opt/local/var/run/dovecot/dict-server

# /etc/init.d/dovecot start
Last died with error (see error log for more information): Socket already 
exists: /opt/local/var/run/dovecot/dict-server
Aug  6 06:57:50 hostname dovecot: [ID 583609 local0.info] Dovecot v1.2.12 
starting up
Aug  6 06:57:50 hostname dovecot: [ID 583609 local0.error] 
net_listen_unix(/opt/local/var/run/dovecot/login/default) failed: Address 
already in use
Aug  6 06:57:50 hostname dovecot: [ID 583609 local0.crit] Fatal: Couldn't 
create auth process listener

# ls -al /opt/local/var/run/dovecot/dict-server
srwxrwxrwx   1 root other  0 Aug  6 06:57 
/opt/local/var/run/dovecot/dict-server

# ls -al /opt/local/var/run/dovecot/login/default
-rw-rw   1 root dovecot0 Aug  4 10:09 
/opt/local/var/run/dovecot/login/default

# rm /opt/local/var/run/dovecot/login/default

# /etc/init.d/dovecot start

# ls -al /opt/local/var/run/dovecot/login/default
srw-rw   1 root dovecot0 Aug  6 07:00 
/opt/local/var/run/dovecot/login/default

Both sockets are created by dovecot if they don't exist.

Greetings,
Jürgen Obermann
--
Hochschulrechenzentrum der | Mail: juergen.oberm...@hrz.uni-giessen.de
Justus-Liebig-Universitaet | WWW:  http://www.uni-giessen.de/obermann/
Heinrich-Buff-Ring 44  | Tel:  0641-99-13054 (0641-99-13001)
D-35392 Giessen, Germany   | Fax:  0641-99-13009


This message was sent using IMP, the Internet Messaging Program.

Re: [Dovecot] Write a c program to access a mailbox as a system user using dovecot version 2 includes/libs

2010-08-06 Thread Jonathan Siegle

On Aug 5, 2010, at 10:16 AM, Timo Sirainen wrote:

 On Thu, 2010-08-05 at 10:12 -0400, Jonathan Siegle wrote:
 Should this be doable with the current design? 
 
 Yes.
 
 Is there a good reference to do this?
 
 doveadm and dsync are good examples. Or maybe you shouldn't write a
 separate C program, but a doveadm plugin instead (see e.g. doveadm_quota
 plugin). http://wiki2.dovecot.org/Design has some docs.
 
 

 The first goal is to open these mailboxes(mdbox/dbox) with alpine version 2 
and the mailboxes are on localhost.  So I will look at dsync. Both programs use 
master_service_* calls to start up something. Is that the design I should 
follow?

smime.p7s
Description: S/MIME cryptographic signature


Re: [Dovecot] dot-containing foldernames \HasNoChildren bug ?

2010-08-06 Thread Timo Sirainen
On 6.8.2010, at 8.38, Samuel Kvasnica wrote:

 doveconf -n -c dovecot-1.conf  dovecot-2.conf
 
 command seems to remove rather big part of of original config...

What parts?


Re: [Dovecot] Write a c program to access a mailbox as a system user using dovecot version 2 includes/libs

2010-08-06 Thread Timo Sirainen
On 6.8.2010, at 11.45, Jonathan Siegle wrote:

 The first goal is to open these mailboxes(mdbox/dbox) with alpine version 2 
 and the mailboxes are on localhost.  

Why? Why not just let it use IMAP? Seems like a huge amount of work to make 
c-client call lib-storage. And who knows how many symbol conflicts there will 
be.. I thought you were talking about some standalone program.

 So I will look at dsync. Both programs use master_service_* calls to start up 
 something. Is that the design I should follow?

Yes, those should be used.



Re: [Dovecot] Making both folder and .folder available to dovecot-lda but not imap

2010-08-06 Thread Timo Sirainen
On 6.8.2010, at 3.37, Stand H wrote:

 Hi,
 
 I'm looking for a way to deliver mail to both 'folder' and '.folder'. I put 
 LAYOUT=fs to mail_location, sieve recognize both 'folder' and '.folder',

Okay..

 but I don't want dovecot-imap to show 'folder' to imap client. The purpose is 
 to send some emails to 'folder' and don't let user to see the folder and 
 email in it.

This makes less sense to me. Are you talking about just one folder or all 
folders that don't begin with a '.'? If just one, you could use ACLs to remove 
user's access to it. If all, probably easier to just change the code.



[Dovecot] Searching dovecot Maildir

2010-08-06 Thread emdeex
Hi All,

Loving Dovecot after several years with Cyrus.

This might be more a general question, but this seemed the best place to
ask.

The idea is to just add up all the values of quotes I've sent in a month.

I want to search my Sent mail folder for all messages with a certain
subject, then grep out a certain line that has a dollar ($) figure, and
add up those figures.  The idea is to just add up all the values of quotes
I've sent in a month.

Can it be done?

Any help appreciated.
regards,
Murray

Dovecot 1.2.6


Re: [Dovecot] Searching dovecot Maildir

2010-08-06 Thread Timo Sirainen
On 6.8.2010, at 4.16, emdeex wrote:

 I want to search my Sent mail folder for all messages with a certain
 subject, then grep out a certain line that has a dollar ($) figure, and
 add up those figures.  The idea is to just add up all the values of quotes
 I've sent in a month.

a) Do it via IMAP protocol by using some IMAP library for Perl/Python/whatever.

b) Upgrade to Dovecot v2.0.0 and do it via doveadm:
doveadm fetch body mailbox Sent subject something body $ | grep '\$' | etc 
script processing



[Dovecot] Configure Dovecot to move read mails to another folder?

2010-08-06 Thread Steven Weiß

Hallo,

is it possible (with dovecot sieve?) to deliver incoming mails to the 
default INBOX and then, when I have read the mail with Thunderbird, 
automatically move it to another folder?


I know I could create filters in my mail client. But that has the 
disadvantage that I would need to create these filters everywhere: on my 
office PC, at home, webmail, ...


Also moving a mail from one folder to another marks the original mail as 
deleted, at least in Thunderbird. Maybe other clients finally delete the 
mail.


Therefore that would be really cool.

Another related problem for me is: how can I automatically move outgoing 
mails to another folder? I created sieve-rules but it doesn't work - the 
mails remain in the folder sent-mail.


For example:

if address :domain :is to somedomain.de {
fileinto sent-mail.Somedomain;
stop;
}

Greetings,
Steven




Re: [Dovecot] Write a c program to access a mailbox as a system user using dovecot version 2 includes/libs

2010-08-06 Thread Marcus Rueckert
On 2010-08-06 12:28:28 +0100, Timo Sirainen wrote:
 On 6.8.2010, at 11.45, Jonathan Siegle wrote:
 
  The first goal is to open these mailboxes(mdbox/dbox) with alpine version 2 
  and the mailboxes are on localhost.  
 
 Why? Why not just let it use IMAP? Seems like a huge amount of work to
 make c-client call lib-storage. And who knows how many symbol
 conflicts there will be.. I thought you were talking about some
 standalone program.

and for the fun part i run with mutt like that for 2 years now or so.
set tunnel=/usr/sbin/dovecot --exec-mail imap

mutt header caches are off as they are dirt slow compared to dovecot's
caches.

darix

-- 
   openSUSE - SUSE Linux is my linux
   openSUSE is good for you
   www.opensuse.org


Re: [Dovecot] Configure Dovecot to move read mails to another folder?

2010-08-06 Thread Timo Sirainen
On 6.8.2010, at 13.06, Steven Weiß wrote:

 is it possible (with dovecot sieve?) to deliver incoming mails to the default 
 INBOX and then, when I have read the mail with Thunderbird, automatically 
 move it to another folder?

Virtual INBOX would probably work, but it requires v2.0 to work properly: 
http://wiki2.dovecot.org/Plugins/Virtual

dovecot-virtual file would contain:

!RealMails/INBOX
INBOX
 unseen

 Another related problem for me is: how can I automatically move outgoing 
 mails to another folder? I created sieve-rules but it doesn't work - the 
 mails remain in the folder sent-mail.

That doesn't really work currently.



[Dovecot] dovecot-auth process crashed during pam login

2010-08-06 Thread Elmar Rudigier
Hello!

We experienced crashes of the dovecot-auth process during user
verification with pam_ssh.

After a little debugging I saw that pam_ssh and dovecot both provide a
buffer_free() function. During cleanup of pam_ssh the buffer_free() from
dovecot was called. The members of the buffer had all out of bound
addresses.

After rename the buffer_free() in dovecot the pam login works fine.

Cheer, Elmar


diff -rNbB dovecot-1.2.13.orig/ChangeLog dovecot-1.2.13/ChangeLog
18337c18337
   Changed buffer_free() and buffer_free_without_data() APIs to take **
---
   Changed buffer_free_renamed() and buffer_free_without_data() APIs to 
 take **
diff -rNbB dovecot-1.2.13.orig/src/lib/array.h dovecot-1.2.13/src/lib/array.h
81c81
   buffer_free(array-buffer);
---
   buffer_free_renamed(array-buffer);
diff -rNbB dovecot-1.2.13.orig/src/lib/buffer.c dovecot-1.2.13/src/lib/buffer.c
123c123
 void buffer_free(buffer_t **_buf)
---
 void buffer_free_renamed(buffer_t **_buf)
diff -rNbB dovecot-1.2.13.orig/src/lib/buffer.h dovecot-1.2.13/src/lib/buffer.h
30c30
 void buffer_free(buffer_t **buf);
---
 void buffer_free_renamed(buffer_t **buf);
diff -rNbB dovecot-1.2.13.orig/src/lib/file-cache.c 
dovecot-1.2.13/src/lib/file-cache.c
39c39
   buffer_free(cache-page_bitmask);
---
   buffer_free_renamed(cache-page_bitmask);
diff -rNbB dovecot-1.2.13.orig/src/lib/istream-seekable.c 
dovecot-1.2.13/src/lib/istream-seekable.c
50c50
   buffer_free(sstream-buffer);
---
   buffer_free_renamed(sstream-buffer);
115c115
   buffer_free(sstream-buffer);
---
   buffer_free_renamed(sstream-buffer);
205c205
   buffer_free(sstream-buffer);
---
   buffer_free_renamed(sstream-buffer);
diff -rNbB dovecot-1.2.13.orig/src/lib/str.c dovecot-1.2.13/src/lib/str.c
37c37
   buffer_free(str);
---
   buffer_free_renamed(str);
diff -rNbB dovecot-1.2.13.orig/src/lib-auth/auth-client.c 
dovecot-1.2.13/src/lib-auth/auth-client.c
40c40
   buffer_free(client-available_auth_mechs);
---
   buffer_free_renamed(client-available_auth_mechs);
diff -rNbB dovecot-1.2.13.orig/src/lib-auth/auth-server-connection.c 
dovecot-1.2.13/src/lib-auth/auth-server-connection.c
328c328
   buffer_free(conn-auth_mechs_buf);
---
   buffer_free_renamed(conn-auth_mechs_buf);
diff -rNbB dovecot-1.2.13.orig/src/lib-index/mail-cache-compress.c 
dovecot-1.2.13/src/lib-index/mail-cache-compress.c
276,277c276,277
   buffer_free(ctx.buffer);
   buffer_free(ctx.field_seen);
---
   buffer_free_renamed(ctx.buffer);
   buffer_free_renamed(ctx.field_seen);
diff -rNbB dovecot-1.2.13.orig/src/lib-index/mail-cache-transaction.c 
dovecot-1.2.13/src/lib-index/mail-cache-transaction.c
106c106
   buffer_free(ctx-cache_data);
---
   buffer_free_renamed(ctx-cache_data);
diff -rNbB dovecot-1.2.13.orig/src/lib-index/mail-cache.c 
dovecot-1.2.13/src/lib-index/mail-cache.c
704c704
   buffer_free(view-cached_exists_buf);
---
   buffer_free_renamed(view-cached_exists_buf);
diff -rNbB dovecot-1.2.13.orig/src/lib-index/mail-index-fsck.c 
dovecot-1.2.13/src/lib-index/mail-index-fsck.c
254c254
   buffer_free(dest);
---
   buffer_free_renamed(dest);
diff -rNbB dovecot-1.2.13.orig/src/lib-index/mail-index-map.c 
dovecot-1.2.13/src/lib-index/mail-index-map.c
518c518
   buffer_free(rec_map-buffer);
---
   buffer_free_renamed(rec_map-buffer);
976c976
   buffer_free(rec_map-buffer);
---
   buffer_free_renamed(rec_map-buffer);
1023c1023
   buffer_free(map-hdr_copy_buf);
---
   buffer_free_renamed(map-hdr_copy_buf);
diff -rNbB dovecot-1.2.13.orig/src/lib-index/mail-index-sync-ext.c 
dovecot-1.2.13/src/lib-index/mail-index-sync-ext.c
248c248
   buffer_free(map-rec_map-buffer);
---
   buffer_free_renamed(map-rec_map-buffer);
diff -rNbB dovecot-1.2.13.orig/src/lib-index/mail-index-sync-update.c 
dovecot-1.2.13/src/lib-index/mail-index-sync-update.c
758c758
   buffer_free(sync_map_ctx-unknown_extensions);
---
   buffer_free_renamed(sync_map_ctx-unknown_extensions);
diff -rNbB dovecot-1.2.13.orig/src/lib-index/mail-index-transaction-view.c 
dovecot-1.2.13/src/lib-index/mail-index-transaction-view.c
39c39
   buffer_free(tview-lookup_return_data);
---
   buffer_free_renamed(tview-lookup_return_data);
diff -rNbB dovecot-1.2.13.orig/src/lib-index/mail-transaction-log-append.c 
dovecot-1.2.13/src/lib-index/mail-transaction-log-append.c
710c710
   buffer_free(ctx.output);
---
   buffer_free_renamed(ctx.output);
714c714
   buffer_free(ctx.output);
---
   buffer_free_renamed(ctx.output);
diff -rNbB dovecot-1.2.13.orig/src/lib-index/mail-transaction-log-file.c 
dovecot-1.2.13/src/lib-index/mail-transaction-log-file.c
90c90
   buffer_free(file-buffer);
---
   buffer_free_renamed(file-buffer);
1401c1401
   

Re: [Dovecot] dovecot-auth process crashed during pam login

2010-08-06 Thread Marcus Rueckert
On 2010-08-06 14:30:21 +0200, Elmar Rudigier wrote:
 We experienced crashes of the dovecot-auth process during user
 verification with pam_ssh.
 
 After a little debugging I saw that pam_ssh and dovecot both provide a
 buffer_free() function. During cleanup of pam_ssh the buffer_free() from
 dovecot was called. The members of the buffer had all out of bound
 addresses.
 
 After rename the buffer_free() in dovecot the pam login works fine.

diff -u is a bit more readable.

darix

-- 
   openSUSE - SUSE Linux is my linux
   openSUSE is good for you
   www.opensuse.org


Re: [Dovecot] dot-containing foldernames \HasNoChildren bug ?

2010-08-06 Thread Samuel Kvasnica
 On 08/06/2010 01:24 PM, Timo Sirainen wrote:
 On 6.8.2010, at 8.38, Samuel Kvasnica wrote:

 doveconf -n -c dovecot-1.conf  dovecot-2.conf

 command seems to remove rather big part of of original config...
 What parts?
Seems like something went wrong (might be my fault), there was simply
some stuff like sieve, fts completely missing. But now it seems ok.
Anyway I've rewritten my configs by hand to use the new nice conf.d layout.

But as I written recently, listescape is still badly broken, cannot use
any subfolders now if I use activate plugin. But the \hasnochildren bug
is away !

I also have troubles to get managesieve work again, client getting
errors and seen some signal 11 on imap service in log, but I have to
investigate some more hour
to get usable infos.


Re: [Dovecot] dovecot-auth process crashed during pam login

2010-08-06 Thread Timo Sirainen
On Fri, 2010-08-06 at 14:30 +0200, Elmar Rudigier wrote:

 After a little debugging I saw that pam_ssh and dovecot both provide a
 buffer_free() function. During cleanup of pam_ssh the buffer_free() from
 dovecot was called. The members of the buffer had all out of bound
 addresses.
 
 After rename the buffer_free() in dovecot the pam login works fine.

Why not rename it in pam_ssh? PAM is the library that is being used in
tons of different programs, and it should be the one to avoid symbol
conflicts.

Anyway, attached a simpler patch to fix this on Dovecot's side (but I'm
not including it).

diff -r 641e86843234 src/lib/buffer.h
--- a/src/lib/buffer.h	Thu Aug 05 18:43:23 2010 +0100
+++ b/src/lib/buffer.h	Fri Aug 06 13:54:34 2010 +0100
@@ -1,6 +1,8 @@
 #ifndef BUFFER_H
 #define BUFFER_H
 
+#define buffer_free buffer_free_pamssh_sucks
+
 struct buffer {
 	const void *data;
 	const size_t used;


Re: [Dovecot] dot-containing foldernames \HasNoChildren bug ?

2010-08-06 Thread Timo Sirainen
On Fri, 2010-08-06 at 14:48 +0200, Samuel Kvasnica wrote:
 On 08/06/2010 01:24 PM, Timo Sirainen wrote:
  On 6.8.2010, at 8.38, Samuel Kvasnica wrote:
 
  doveconf -n -c dovecot-1.conf  dovecot-2.conf
 
  command seems to remove rather big part of of original config...
  What parts?
 Seems like something went wrong (might be my fault), there was simply
 some stuff like sieve, fts completely missing. But now it seems ok.

It was supposed to do a full conversion, so if there are bugs I would
like to know about it.

 I also have troubles to get managesieve work again, client getting
 errors and seen some signal 11 on imap service in log, but I have to
 investigate some more hour
 to get usable infos.

Signal 11 means crash, and getting a gdb backtrace helps locate and fix
it: http://dovecot.org/bugreport.html



Re: [Dovecot] dot-containing foldernames \HasNoChildren bug ?

2010-08-06 Thread Timo Sirainen
On Fri, 2010-08-06 at 11:31 +0200, Samuel Kvasnica wrote:

 I got 2.0 from trunk kind of working now, but the listescape is still
 broken ! The haschildren flag is correct now, but I cannot use (list or
 create) any subfolders in general when listescape enabled
 in config, only folders directly in inbox root work normal.
 
 When clicking e.g. at folder 'zzz', getting these error messages on client:
 The current operation on 'zzz' did not suceed. The mail server for
 account x...@aaa.com responded: Invalid mailbox name: xxx/zzz

And this is the latest hg? I thought
http://hg.dovecot.org/dovecot-2.0/rev/827ebadc5995 fixed this bug. Also
I can't reproduce it:

x create a.b/x
x OK Create completed.
x create x/y
x OK Create completed.

What's your current doveconf -n output?



Re: [Dovecot] Write a c program to access a mailbox as a system user using dovecot version 2 includes/libs

2010-08-06 Thread Jonathan Siegle

On Aug 6, 2010, at 7:28 AM, Timo Sirainen wrote:

 On 6.8.2010, at 11.45, Jonathan Siegle wrote:
 
 The first goal is to open these mailboxes(mdbox/dbox) with alpine version 2 
 and the mailboxes are on localhost.  
 
 Why? Why not just let it use IMAP? Seems like a huge amount of work to make 
 c-client call lib-storage. And who knows how many symbol conflicts there will 
 be.. I thought you were talking about some standalone program.
 

Well the idea is for some client to be able to do updates to a mailbox. I 
grabbed alpine out of the air because it knows how to use different drivers to 
open mailboxes using the filesystem and not going through an IMAP socket. Maybe 
I shouldn't be going down this road. The end goal is for my Webmail client to 
access dovecot mailboxes. Does it make more sense to do the more traditional 
route of making Webmail an IMAP client?  I don't know. I thought it would make 
more sense to just access the filesystem and write a smart Webmail client. 
Right now my Webmail is a caching AJAX POP client. 

Thanks,
Jonathan




smime.p7s
Description: S/MIME cryptographic signature


Re: [Dovecot] Write a c program to access a mailbox as a system user using dovecot version 2 includes/libs

2010-08-06 Thread Timo Sirainen
On Fri, 2010-08-06 at 10:16 -0400, Jonathan Siegle wrote:

 The end goal is for my Webmail client to access dovecot mailboxes.
 Does it make more sense to do the more traditional route of making
 Webmail an IMAP client? 

Yes. There's almost zero performance benefit for accessing mails via
lib-storage than just accessing via IMAP. Also Dovecot's lib-storage API
changes every time minor version changes, so you'd have to keep updating
your code once in a while. (For v2.1 API I'm hoping to add support for
async calls and using UTF-8 mailbox names everywhere.)




Re: [Dovecot] dovecot 2.0 rc4, expire, sqlite

2010-08-06 Thread Burckhard Schmidt



On 05.08.2010 18:38, Timo Sirainen wrote:

On Thu, 2010-08-05 at 18:02 +0200, Burckhard Schmidt wrote:


If I copy a message (with TB) into that folder, I get an error if there
exists no entry for that user and that folder within the database:

   dict: Error: sqlite: exec(INSERT INTO expires
(expire_stamp,username,mailbox) VALUES
('1281016832','userx','AutoCleanSpam')) failed: unable to open database
file (14)
dict: Error: sql dict: commit failed:

If I make an initial entry manually first no error occurs.


You have to create the row for each user?..


Anymore there is a problem concerning acl of the base directory of the
expires.db:
dict: Error: sqlite: open(/addons/expire/expires.db) failed: unable to
open database file
dict: Error: dict sql lookup failed: out of memory


It looks to me like 3/4 of those error messages are wrong..


It was necessary to give other r-x permissions for directory
/addons/expire.


r-x? o+rx?


I use mail_uid = sysdov and mail_gid = sysdov. That is uid 29.
Furthermore I work with userdb ldap and uid/gid mapping:
user_attrs = homeDirectory=home,uidNumber=29,gidNumber=29
So usually it was sufficient using acl like this
drwxr-x---   2 sysdov   sysdov 5 Aug  5 16:00 /addons/expire

As which user expire, dict, sqlite access are running?


dict process runs as $dovecot_internal_user (dovecot) by default. All
accesses to the expiredb are done via dict process, so you should just
make it accessible to dovecot user.



user dovecot solves the problems.

drwx--  dovecot  dovecot  6 Aug  6 14:20 /addons/expire
-rw---  dovecot  dovecot   3072 Aug  6 14:20 expires.db


--
regards
Burckhard Schmidt


[Dovecot] Dovecot 2.0.rc4 (a30a30d1e25a): LMTP dies intermittently

2010-08-06 Thread Thomas Leuxner
Hi,

not sure what change caused this but it first appeared when building HG
a30a30d1e25a. LMTP dies intermittently.


Aug  6 16:00:57 spectre dovecot: lmtp(5509, al...@domain.tld):
b9ESKJkVXEyFFQAAqZii3w: sieve:
msgid=1281102852.6211.447.ca...@kurkku.sapo.corppt.com: stored mail
into mailbox 'Public/Mailing-Lists/Dovecot'
Aug  6 16:00:57 spectre dovecot: lmtp(5509): Disconnect from local:
Client quit
Aug  6 16:17:05 spectre dovecot: master: Error: service(lmtp): child
5509 killed with signal 11 (core not dumped)

Let me know if you need more details.

Regards
Thomas


Re: [Dovecot] Problem creating sockets after Solaris Live Upgrade

2010-08-06 Thread Timo Sirainen
On Fri, 2010-08-06 at 11:52 +0200, Jürgen Obermann wrote:

 During booting this ABE dovecot will not start, unless both files are removed:
 
 Aug  6 06:55:30 hostname dovecot: Fatal: Socket already exists: 
 /opt/local/var/run/dovecot/dict-server

Doesn't it say something about Socket operation on non-socket?
Anyway.. I thought about this, and I don't think I want to change how it
works. Dovecot shouldn't go deleting files that exist, just in case
someone accidentally configured some socket to point to wrong location.

Just create a wrapper script that deletes the
entire /opt/local/var/run/dovecot/ directory at startup.




Re: [Dovecot] Strange behaviour when add new mailbox to IMAP (v 1.2.13)

2010-08-06 Thread Timo Sirainen
On Fri, 2010-08-06 at 11:51 +0300, Alexander Chekalin wrote:

 I use Thunderbird (yesterday it was 3.1.1 and now it is 3.1.2) as my 
 IMAP client. When I connect to my IMAP account on second server, and 
 create mailbox, I see that there appears greyed folder named 
 #virtual^Sent , and my new mailbox is in it.

Did you add that #virtual^Sent prefix yourself? Did you configure it
in your TB setup? Is it intended to have it?

 To check the problem I simplified my Dovecot config to the bare minimum, 
 and it also won't work (#virtual^Sent still there). When I see on server 
 disk, I see there .#virtual^Sent.NewTestMailbox dir (NewTestMailbox is 
 the test mailbox I created), but there is no .#virtual^Sent dir.

There doesn't need to be .#virtual^Sent dir for it to have children,
that's normal.

But your explanation is confusing. Also make sure it's not a Thunderbird
configuration problem. Talk IMAP protocol directly to your server:
http://wiki.dovecot.org/TestInstallation and show me what commands give
unexpected results. For creating mailboxes you can use:

a create mailbox name



Re: [Dovecot] dot-containing foldernames \HasNoChildren bug ?

2010-08-06 Thread Samuel Kvasnica
 Hi Timo,

On 08/06/2010 03:54 PM, Timo Sirainen wrote:
 On Fri, 2010-08-06 at 11:31 +0200, Samuel Kvasnica wrote:

 I got 2.0 from trunk kind of working now, but the listescape is still
 broken ! The haschildren flag is correct now, but I cannot use (list or
 create) any subfolders in general when listescape enabled
 in config, only folders directly in inbox root work normal.

 When clicking e.g. at folder 'zzz', getting these error messages on client:
 The current operation on 'zzz' did not suceed. The mail server for
 account x...@aaa.com responded: Invalid mailbox name: xxx/zzz
 And this is the latest hg? I thought
 http://hg.dovecot.org/dovecot-2.0/rev/827ebadc5995 fixed this bug. Also
Well, I work only with subversion, no experience with mercurial. But I
downloaded the bz2 for tip from dovecot-2.0, I suppose tip is the
trunk which should include all latest changes. Currently it is
dovecot-2-0-4ef2280ee490 and it is still broken. If listescape is
included and I click on any subfolder in thunderbird, get those error
messages.

 I can't reproduce it:

 x create a.b/x
 x OK Create completed.
 x create x/y
 x OK Create completed.

for me it is:

. create my.test/eee
. NO Invalid mailbox name: my.test/eee

or even without dot

. create xxx/aaa
. NO Invalid mailbox name: xxx/aaa

while root level works:
. create eee
. OK Create completed.




 What's your current doveconf -n output?

# 2.0.rc4: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.31.13-18-xen x86_64 openSUSE 11.2 (x86_64) xfs
auth_master_user_separator = #   
auth_mechanisms = plain login
auth_verbose = yes   
disable_plaintext_auth = no  
hostname = imap  
log_path = /var/log/dovecot  
mail_access_groups = vmail   
mail_debug = yes 
mail_gid = vmail 
mail_location = maildir:/data/vmail/%u/Maildir   
mail_plugins = fts fts_squat acl imap_acl quota imap_quota   
mail_privileged_group = vmail
mail_uid = vmail 
managesieve_notify_capability = mailto   
managesieve_sieve_capability = comparator-i;octet
comparator-i;ascii-casemap fileinto reject envelope encoded-character
vacation subaddress comparator-i;ascii-numeric relational regex
imap4flags copy include variables body enotify environment mailbox date
spamtest spamtestplus
virustest   


namespace
{   
  

  hidden =
no  
 

  inbox =
yes 
  

  list =
yes 
   

  location
=   
 

  prefix
=   
   

  separator =
/   
  

  subscriptions =
yes 
  

  type =
private 
   

}   


namespace
{   
  

  list =
children
   

  location =
maildir:/data/vmail/%%u/Maildir:INDEX=/data/vmail/%u/index/shared/%%u   
   

  prefix =
Shared/%%u/ 
 

  separator =
/   
  

  subscriptions =
no  

Re: [Dovecot] Dovecot 2.0.rc4 (a30a30d1e25a): LMTP dies intermittently

2010-08-06 Thread Timo Sirainen
On Fri, 2010-08-06 at 16:36 +0200, Thomas Leuxner wrote:
 Aug  6 16:17:05 spectre dovecot: master: Error: service(lmtp): child
 5509 killed with signal 11 (core not dumped)

gdb backtrace is the only good way to know why it would dump a core:

1. Set:

service lmtp {
  executable = lmtp -D
}

2. Run ulimit -c unlimited before starting dovecot 

Anyway, are you using mbox format? Out-of-quota with mbox was crashing.
This fixes it: http://hg.dovecot.org/dovecot-2.0/rev/4ef2280ee490




[Dovecot] dovecot 2.0 rc4, doveadm: referenced symbol not found

2010-08-06 Thread Burckhard Schmidt

Hi,

I used

/usr/dovecot-2/bin/doveadm -Dv expunge -u userx mailbox AutoCleanSpam 
savedbefore 30d


doveadm(root): Debug: Loading modules from directory: 
/usr/dovecot-2/lib/dovecot/doveadm
doveadm(root): Error: 
dlopen(/usr/dovecot-2/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so) failed: 
ld.so.1: doveadm: fatal: relocation error: file 
/usr/dovecot-2/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so: 
symbol expire_set_init: referenced symbol not found


doveadm(root): Error: 
dlopen(/usr/dovecot-2/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so) 
failed: ld.so.1: doveadm: fatal: relocation error: file 
/usr/dovecot-2/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so: symbol 
quota_user_module: referenced symbol not found



However old mails have been deleted.

--
regards - Burckhard Schmidt




Re: [Dovecot] dot-containing foldernames \HasNoChildren bug ?

2010-08-06 Thread Timo Sirainen
On Fri, 2010-08-06 at 16:51 +0200, Samuel Kvasnica wrote:
 . create my.test/eee
 . NO Invalid mailbox name: my.test/eee

Looks like yet another problem with handling hooks. Fixed:
http://hg.dovecot.org/dovecot-2.0/rev/e54df5af98ac

I hope this doesn't now break another plugin (combination).. I guess
I'll have to delay v2.0.0 release to make sure.




Re: [Dovecot] dovecot 2.0 rc4, doveadm: referenced symbol not found

2010-08-06 Thread Timo Sirainen
On Fri, 2010-08-06 at 16:52 +0200, Burckhard Schmidt wrote:

 /usr/dovecot-2/bin/doveadm -Dv expunge -u userx mailbox AutoCleanSpam 
 savedbefore 30d

You enabled debug output with -D.

 doveadm(root): Debug: Loading modules from directory: 
 /usr/dovecot-2/lib/dovecot/doveadm
 doveadm(root): Error: 
 dlopen(/usr/dovecot-2/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so) 
 failed: 
 ld.so.1: doveadm: fatal: relocation error: file 
 /usr/dovecot-2/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so: 
 symbol expire_set_init: referenced symbol not found

This is debug output saying that you don't have expire plugin enabled.
Of course, it's shown with Error: prefix.. I'm getting tired of people
reporting this, so I suppose I'll have to change the message..




Re: [Dovecot] assertion failure with 2.0rc4

2010-08-06 Thread Timo Sirainen
On Thu, 2010-08-05 at 15:28 -0700, Ryan Murray wrote:
 #4  0x7f419e3be05c in i_panic (
 format=0x7f419e3e9778 file %s: line %d (%s): assertion failed: (%s))
 at failures.c:230
 args = {{gp_offset = 0, fp_offset = 0, overflow_arg_area = 0x0, 
 reg_save_area = 0x0}}
 #5  0x7f419e3a1a4d in read_mixed (mstream=0x1598d20, 
 body_highwater_size=0)
 at istream-header-filter.c:81

Looks like the assert was just a few lines too early, fixed:
http://hg.dovecot.org/dovecot-2.0/rev/dd3e70c85d43




Re: [Dovecot] Dovecot 2.0.rc4 (a30a30d1e25a): LMTP dies intermittently

2010-08-06 Thread Thomas Leuxner
Am 06.08.2010 um 16:51 schrieb Timo Sirainen:

 service lmtp {
  executable = lmtp -D
 }

Added that but still does not dump cores when LMTP crashes.

[19:22] root spectre:/etc/dovecot/conf.d# doveconf -n | grep executable
  executable = lmtp -D

 2. Run ulimit -c unlimited before starting dovecot

This is set.

What I can add is, it seems to crash on every second delivery. Not using 'mbox' 
but 'mdbox'

# 2.0.rc4 (a30a30d1e25a): /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-amd64 x86_64 Debian 5.0.5 
auth_verbose = yes
mail_location = mdbox:~/mdbox
mail_plugins = acl quota
managesieve_notify_capability = mailto
managesieve_sieve_capability = comparator-i;octet comparator-i;ascii-casemap 
fileinto reject envelope encoded-character vacation subaddress 
comparator-i;ascii-numeric relational regex imap4flags copy include variables 
body enotify environment mailbox date spamtest spamtestplus virustest
namespace {
  hidden = no
  inbox = yes
  location = 
  prefix = 
  separator = /
  type = private
}
namespace {
  list = yes
  location = maildir:/var/vmail/public:LAYOUT=fs:INDEX=~/public
  prefix = Public/
  separator = /
  subscriptions = no
  type = public
}
passdb {
  args = username_format=%u /var/vmail/auth.d/%d/passwd
  driver = passwd-file
}
plugin {
  acl = vfile:/var/vmail/conf.d/%d/acls:cache_secs=300
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
  quota = dict:user::file:%h/mdbox/dovecot-quota
  quota_rule = *:storage=1GB
  quota_rule2 = Trash:storage=+10%%
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  sieve_global_dir = /var/vmail/conf.d/%d/sieve
}
protocols = imap lmtp
service auth-worker {
  user = doveauth
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  user = doveauth
}
service imap-login {
  inet_listener imap {
address = 1.2.3.4
port = 143
  }
  inet_listener imaps {
port = 0
  }
}
service lmtp {
  executable = lmtp -D
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0660
user = postfix
  }
}
ssl_cert = /etc/ssl/certs/host_domain_tld.crt
ssl_key = /etc/ssl/private/host_domain_tld.key
syslog_facility = local1
userdb {
  args = username_format=%u /var/vmail/auth.d/%d/passwd
  driver = passwd-file
}
verbose_proctitle = yes
protocol lmtp {
  mail_plugins = $mail_plugins sieve
}
protocol imap {
  mail_plugins = $mail_plugins imap_acl imap_quota mail_log notify
}




Re: [Dovecot] Dovecot 2.0.rc4 (a30a30d1e25a): LMTP dies intermittently

2010-08-06 Thread Timo Sirainen
On Fri, 2010-08-06 at 19:27 +0200, Thomas Leuxner wrote:
 Am 06.08.2010 um 16:51 schrieb Timo Sirainen:
 
  service lmtp {
   executable = lmtp -D
  }
 
 Added that but still does not dump cores when LMTP crashes.

What does it log? Is it just (core not dumped)? Usually it says a
reason.

 What I can add is, it seems to crash on every second delivery. Not using 
 'mbox' but 'mdbox'

If you can easily reproduce it, then you could attach gdb into lmtp
process and get the backtrace from there:

gdb -p `pidof lmtp`
cont
make it crash
bt full




Re: [Dovecot] Dovecot 2.0.rc4 (a30a30d1e25a): LMTP dies intermittently

2010-08-06 Thread Thomas Leuxner
Am 06.08.2010 um 19:39 schrieb Timo Sirainen:
 If you can easily reproduce it, then you could attach gdb into lmtp
 process and get the backtrace from there:
 
 gdb -p `pidof lmtp`
 cont
 make it crash
 bt full

License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as x86_64-linux-gnu.
Attaching to process 12841
Reading symbols from /usr/lib/dovecot/lmtp...Reading symbols from 
/usr/lib/debug/usr/lib/dovecot/lmtp...done.
done.
Reading symbols from /usr/lib/dovecot/libdovecot-storage.so.0...Reading symbols 
from /usr/lib/debug/usr/lib/dovecot/libdovecot-storage.so.0.0.0...done.
done.
Loaded symbols for /usr/lib/dovecot/libdovecot-storage.so.0
Reading symbols from /usr/lib/dovecot/libdovecot-lda.so.0...Reading symbols 
from /usr/lib/debug/usr/lib/dovecot/libdovecot-lda.so.0.0.0...done.
done.
Loaded symbols for /usr/lib/dovecot/libdovecot-lda.so.0
Reading symbols from /usr/lib/dovecot/libdovecot.so.0...Reading symbols from 
/usr/lib/debug/usr/lib/dovecot/libdovecot.so.0.0.0...done.
done.
Loaded symbols for /usr/lib/dovecot/libdovecot.so.0
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffa65801700 (LWP 12841)]
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /usr/lib/dovecot/modules/lib01_acl_plugin.so...Reading 
symbols from /usr/lib/debug/usr/lib/dovecot/modules/lib01_acl_plugin.so...done.
done.
Loaded symbols for /usr/lib/dovecot/modules/lib01_acl_plugin.so
Reading symbols from /usr/lib/dovecot/modules/lib10_quota_plugin.so...Reading 
symbols from 
/usr/lib/debug/usr/lib/dovecot/modules/lib10_quota_plugin.so...done.
done.
Loaded symbols for /usr/lib/dovecot/modules/lib10_quota_plugin.so
Reading symbols from /usr/lib/dovecot/modules/lib90_sieve_plugin.so...Reading 
symbols from 
/usr/lib/debug/usr/lib/dovecot/modules/lib90_sieve_plugin.so...done.
done.
Loaded symbols for /usr/lib/dovecot/modules/lib90_sieve_plugin.so
Reading symbols from /usr/lib/dovecot/libdovecot-sieve.so.0...Reading symbols 
from /usr/lib/debug/usr/lib/dovecot/libdovecot-sieve.so.0.0.0...done.
done.
Loaded symbols for /usr/lib/dovecot/libdovecot-sieve.so.0
0x7ffa648015f3 in epoll_wait () from /lib/libc.so.6
(gdb) cont
Continuing.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffa65801700 (LWP 12841)]
acl_mail_namespace_storage_added (ns=0xd33e10) at acl-mailbox-list.c:509
509 acl-mailbox-list.c: No such file or directory.
in acl-mailbox-list.c
(gdb) bt full
#0  acl_mail_namespace_storage_added (ns=0xd33e10) at acl-mailbox-list.c:509
auser = value optimized out
backend = value optimized out
current_username = 0xd36268 raw user
owner_username = value optimized out
owner = value optimized out
#1  0x7ffa65351829 in hook_mail_namespace_storage_added (ns=0xd33e10) at 
mail-storage-hooks.c:256
hooks__foreach_end = (const void *) 0xd371a0
hooks = (const struct mail_storage_hooks * const *) 0xd37180
#2  0x7ffa65351274 in mail_storage_create (ns=0xd33e10, driver=0xcf0e58 
=�e�\177, flags=0, error_r=0x7fff96ea0ea0) at mail-storage.c:333
storage_class = (struct mail_storage *) 0x7ffa655ebf00
storage = (struct mail_storage *) 0xd3a1c8
list_set = {layout = 0xcdf6f8 none, root_dir = 0xcdf6f0 , index_dir 
= 0x0, control_dir = 0x0, alt_dir = 0x0, inbox_path = 0x0, subscription_fname = 
0x7ffa653d188b subscriptions, 
  maildir_name = 0x0, mailbox_dir_name = 0x0}
data = 0x407806 :LAYOUT=none
p = value optimized out
__FUNCTION__ = mail_storage_create
#3  0x00404c41 in client_create (fd_in=value optimized out, 
fd_out=11, conn=value optimized out) at client.c:145
client = (struct client *) 0xcfcc28
pool = (pool_t) 0xcfcc00
#4  0x7ffa64ed29ad in master_service_listen (l=0xcef048) at 
master-service.c:736
service = (struct master_service *) 0xce7480
conn = {fd = 11, listen_fd = 7, remote_ip = {family = 0, u = {ip6 = 
{in6_u = {u6_addr8 = '\0' repeats 15 times, u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 
0}, u6_addr32 = {0, 0, 0, 0}}}, ip4 = {
s_addr = 0}}}, remote_port = 0, fifo = 0, ssl = 0, accepted = 1}
__FUNCTION__ = master_service_listen
#5  0x7ffa64ee3fcb in io_loop_handler_run (ioloop=value optimized out) at 
ioloop-epoll.c:212
   

Re: [Dovecot] dot-containing foldernames \HasNoChildren bug ?

2010-08-06 Thread Timo Sirainen
On Fri, 2010-08-06 at 19:51 +0200, SK wrote:
 yes this works now for thunderbird. But still getting the segfault when
 using open-xchange weblient right
 on login.
..

 #0  list_unescape_str (dest=value optimized out, str=0x6c8597 
 sharing.user, ns=value optimized out) at listescape-plugin.c:91
 mlist = 0x0   
  
 num = value optimized out   
  
 #1  listescape_mailbox_list_iter_next (dest=value optimized out, 
 str=0x6c8597 sharing.user, ns=value optimized out)  
 at listescape-plugin.c:211
  

Fixed: http://hg.dovecot.org/dovecot-2.0/rev/3fc1f263827c




Re: [Dovecot] dot-containing foldernames \HasNoChildren bug ?

2010-08-06 Thread SK
Hi Timo,

yes this works now for thunderbird. But still getting the segfault when
using open-xchange weblient right
on login.
I'm attaching the stacktrace of imap daemon below. Seems to appear in
combination with a shared folder of a user
with loginID firstname.lastname. Strangely, it wont crash when using
thunderbird.

...yes it might take fes more day until declaring it stable. On the
other hand,
in 1.2.x listescape is badly broken anyway.


On 08/06/2010 06:06 PM, Timo Sirainen wrote:
 On Fri, 2010-08-06 at 16:51 +0200, Samuel Kvasnica wrote:
   
 . create my.test/eee
 . NO Invalid mailbox name: my.test/eee
 
 Looks like yet another problem with handling hooks. Fixed:
 http://hg.dovecot.org/dovecot-2.0/rev/e54df5af98ac

 I hope this doesn't now break another plugin (combination).. I guess
 I'll have to delay v2.0.0 release to make sure.


   

Core was generated by `dovecot/imap'.   
   
Program terminated with signal 11, Segmentation fault.  
   
#0  list_unescape_str (dest=value optimized out, str=0x6c8597 sharing.user, 
ns=value optimized out) at listescape-plugin.c:91
91  if (*str == mlist-escape_char
   
(gdb) bt full   
   
#0  list_unescape_str (dest=value optimized out, str=0x6c8597 sharing.user, 
ns=value optimized out) at listescape-plugin.c:91
mlist = 0x0 
   
num = value optimized out 
   
#1  listescape_mailbox_list_iter_next (dest=value optimized out, str=0x6c8597 
sharing.user, ns=value optimized out)  
at listescape-plugin.c:211  
   
mlist = value optimized out   
   
ns = 0x650e20   
   
liter = 0x647dd8
   
info = 0x6885d0 
   
__FUNCTION__ = listescape_mailbox_list_iter_next  
   
#2  0x7fd3fa3755c8 in acl_mailbox_list_iter_next_info (ctx=value optimized 
out) at acl-mailbox-list.c:206
alist = 0x647b70
   
#3  acl_mailbox_list_iter_next (ctx=value optimized out) at 
acl-mailbox-list.c:369   
ctx = 0x6f5120  
   
info = 0x620310 
   
ret = 6423312   
   
#4  0x7fd3fb1a92ea in mailbox_list_iter_next (ctx=0x20) at 
mailbox-list.c:1029 
info = value optimized out
   
#5  0x0040bc89 in list_namespace_mailboxes (ctx=value optimized out) 
at cmd-list.c:373   
info = 0x645480 
   
flags = 6575088 
   
str = 0x620310  
   
ret = 0 
   
ns = 0x7fff9245f458 
   
name = 0x6203c8   
   

Re: [Dovecot] Dovecot 2.0.rc4 (a30a30d1e25a): LMTP dies intermittently

2010-08-06 Thread Timo Sirainen
On Fri, 2010-08-06 at 19:50 +0200, Thomas Leuxner wrote:
 
 #0  acl_mail_namespace_storage_added (ns=0xd33e10) at
 acl-mailbox-list.c:509 

Fixed: http://hg.dovecot.org/dovecot-2.0/rev/1aa2ccceacb9




Re: [Dovecot] Dovecot 2.0.rc4 (a30a30d1e25a): LMTP dies intermittently

2010-08-06 Thread Thomas Leuxner
Am 06.08.2010 um 20:03 schrieb Timo Sirainen:

 On Fri, 2010-08-06 at 19:50 +0200, Thomas Leuxner wrote:
 
 #0  acl_mail_namespace_storage_added (ns=0xd33e10) at
 acl-mailbox-list.c:509 
 
 Fixed: http://hg.dovecot.org/dovecot-2.0/rev/1aa2ccceacb9
 

Looking good. Thanks.



Re: [Dovecot] dot-containing foldernames \HasNoChildren bug ?

2010-08-06 Thread SK


On 08/06/2010 07:59 PM, Timo Sirainen wrote:
 num = value optimized out
 #1  listescape_mailbox_list_iter_next (dest=value optimized out, 
 str=0x6c8597 sharing.user, ns=value optimized out)  
 at listescape-plugin.c:211   
   
 
 Fixed: http://hg.dovecot.org/dovecot-2.0/rev/3fc1f263827c

   

Wow that was fast !

Ok, now it does not crash anymore,  But...: I cannot see shared folders
for users containing a dot (e.g. the shared.user above)
on open-exchange webclient. If I disable the listscape plugin, the
folder is visible. Something more is still broken. Any idea where to look ?



Re: [Dovecot] dot-containing foldernames \HasNoChildren bug ?

2010-08-06 Thread Timo Sirainen
On Fri, 2010-08-06 at 20:41 +0200, SK wrote:
 Ok, now it does not crash anymore,  But...: I cannot see shared folders
 for users containing a dot (e.g. the shared.user above)
 on open-exchange webclient. If I disable the listscape plugin, the
 folder is visible. Something more is still broken. Any idea where to look ?

I'm not sure if this is fixable. I'll look into it later..




[Dovecot] Maildir over NFS

2010-08-06 Thread CJ Keist
I'm working on bring up a new mail server to replace our current one.  
Our current mail server is running dovecot 1.1.16, with postfix using 
mbox format.  User inboxes are stored locally on the mail server and all 
other mail folders in users home directory under mail which is NFS 
mounted on the mail server.


For our new mail server I'm looking to switch to the Maildir format.  
Some years ago I remember reading that it was not recommended to run 
Maildir format over NFS.  Now I'm looking at several posts that seem to 
indicate that Maildir should run fine over NFS.  I'm a little concerned 
about running Maildir over NFS, especially from the howto conversion 
pages I read would move all messages over to the User ~/Maildir folder 
including the inbox.  So having every single mail transaction going over 
NFS doesn't seem the smart thing to do.


So question I have for the dovecot team, does running Maildir over NFS 
work well?  Or would you recommend that all user mail folders be stored 
locally on the mail server when using Maildir?


We have about 3400 users, doing about 30k mail deliveries daily.  Some 
users have 10's of thousands of mail messages in hundreds of mail folders.


Thanks...

--
C. J. Keist Email: cj.ke...@colostate.edu
UNIX/Network ManagerPhone: 970-491-0630
Engineering Network ServicesFax:   970-491-5569
College of Engineering, CSU
Ft. Collins, CO 80523-1301

All I want is a chance to prove 'Money can't buy happiness'



Re: [Dovecot] Maildir over NFS

2010-08-06 Thread Seth Mattinen
On 8/6/2010 12:31, CJ Keist wrote:
 
 So question I have for the dovecot team, does running Maildir over NFS
 work well?  Or would you recommend that all user mail folders be stored
 locally on the mail server when using Maildir?
 
 We have about 3400 users, doing about 30k mail deliveries daily.  Some
 users have 10's of thousands of mail messages in hundreds of mail folders.
 

Maildir (and Dovecot in general) will work fine with NFS.

http://wiki.dovecot.org/NFS

~Seth


Re: [Dovecot] Maildir over NFS

2010-08-06 Thread Patrick Domack

Quoting CJ Keist cj.ke...@colostate.edu:

I'm working on bring up a new mail server to replace our current  
one.  Our current mail server is running dovecot 1.1.16, with  
postfix using mbox format.  User inboxes are stored locally on the  
mail server and all other mail folders in users home directory under  
mail which is NFS mounted on the mail server.


For our new mail server I'm looking to switch to the Maildir format.  
 Some years ago I remember reading that it was not recommended to  
run Maildir format over NFS.  Now I'm looking at several posts that  
seem to indicate that Maildir should run fine over NFS.  I'm a  
little concerned about running Maildir over NFS, especially from the  
howto conversion pages I read would move all messages over to the  
User ~/Maildir folder including the inbox.  So having every single  
mail transaction going over NFS doesn't seem the smart thing to do.


So question I have for the dovecot team, does running Maildir over  
NFS work well?  Or would you recommend that all user mail folders be  
stored locally on the mail server when using Maildir?


We have about 3400 users, doing about 30k mail deliveries daily.   
Some users have 10's of thousands of mail messages in hundreds of  
mail folders.




I'm happy with maildir on nfs (netapp), doing 3million receiving per day.

Looking at the new methods for v2.0, still on the fence though with them.




Re: [Dovecot] dot-containing foldernames \HasNoChildren bug ?

2010-08-06 Thread SK
On 08/06/2010 09:04 PM, Timo Sirainen wrote:
 On Fri, 2010-08-06 at 20:41 +0200, SK wrote:
   
 Ok, now it does not crash anymore,  But...: I cannot see shared folders
 for users containing a dot (e.g. the shared.user above)
 on open-exchange webclient. If I disable the listscape plugin, the
 folder is visible. Something more is still broken. Any idea where to look ?
 
 I'm not sure if this is fixable. I'll look into it later..

   
Well, that would be an essential showstopper for the migration from
scalix to dovecot in our setup.
But I don't believe it is unfixable. I did some tcpdump logging in the
meantime, The open-xchange client
seems to rely heavily on the LSUB command which is different from e.g.
thunderbird which seems to use mostly LIST.

It appears that the dovecot replies for LSUB commands with '%' wildcard
are different when listescape is enabled.
Please have a look at the attached comparison. At least for the public
folders it is pretty clear (even when not using dots there) and
subfolders in public area are broken as well. I cannot find the clear
difference for the shared folder case though, but more info comes later
on... the public folder bug might be the key...
1. NO listescape plugin, works correctly

Public folders:

. lsub  Public/*
* LSUB () / Public/
* LSUB () / Public/aa
* LSUB () / Public/psc
* LSUB () / Public/psc/aaa
* LSUB () / Public/psc/bbb
* LSUB () / Public/public
* LSUB () / Public/public/ccc
. OK Lsub completed.

. lsub  Public/%
* LSUB () / Public/
* LSUB () / Public/aa
* LSUB () / Public/psc
* LSUB () / Public/public
. OK Lsub completed.

. list  Public/*
* LIST (\HasChildren) / Public/psc
* LIST (\HasNoChildren) / Public/psc/aaa
* LIST (\HasNoChildren) / Public/psc/bbb
* LIST (\HasChildren) / Public/public
* LIST (\HasNoChildren) / Public/public/ccc
. OK List completed.

. list  Public/%
* LIST (\HasChildren) / Public/psc
* LIST (\HasChildren) / Public/public
. OK List completed.

Shared folders:

. lsub  Shared/*
* LSUB () / Shared/dot.user/dot_shared
* LSUB () / Shared/dot.user/
* LSUB () / Shared/
* LSUB () / Shared/ixogux/ixshare
. OK Lsub completed.

. lsub  Shared/%
* LSUB (\Noselect) / Shared/dot.user
* LSUB () / Shared/
* LSUB (\Noselect) / Shared/ixogux
. OK Lsub completed.


. list  Shared/*
* LIST (\Noselect \HasChildren) / Shared/ixogux
* LIST (\Noselect \HasChildren) / Shared/dot.user
* LIST (\HasNoChildren) / Shared/ixogux/ixshare
* LIST (\HasChildren) / Shared/dot.user/dot_shared
* LIST (\HasNoChildren) / Shared/dot.user/dot_shared/folder1
. OK List completed.

. list  Shared/%
* LIST (\Noselect \HasChildren) / Shared/ixogux
* LIST (\Noselect \HasChildren) / Shared/dot.user
. OK List completed.


2. with listescape plugin ENABLED

Public folders:

. lsub  Public/*
* LSUB () / Public/
* LSUB () / Public/aa
* LSUB () / Public/psc
* LSUB () / Public/public
* LSUB () / Public/psc/aaa
* LSUB () / Public/psc/bbb
* LSUB () / Public/public/ccc
. OK Lsub completed.

 BAD RESPONSE 
. lsub  Public/%
* LSUB () / Public/
* LSUB () / Public/aa
* LSUB () / Public/psc
* LSUB () / Public/public
* LSUB () / Public/psc/aaa == HUH ?
* LSUB () / Public/psc/bbb == HUH ?
* LSUB () / Public/public/ccc == HUH ?
. OK Lsub completed.

. list  Public/*
* LIST (\HasChildren) / Public/psc
* LIST (\HasNoChildren) / Public/psc/aaa
* LIST (\HasNoChildren) / Public/psc/bbb
* LIST (\HasChildren) / Public/public
* LIST (\HasNoChildren) / Public/public/ccc
. OK List completed.

. list  Public/%
* LIST (\HasChildren) / Public/psc
* LIST (\HasChildren) / Public/public
. OK List completed.

Shared folders:

. lsub  Shared/*
* LSUB () / Shared/dot.user/dot_shared
* LSUB () / Shared/dot.user/
* LSUB () / Shared/
* LSUB () / Shared/ixogux/ixshare
. OK Lsub completed.

. lsub  Shared/%
* LSUB (\Noselect) / Shared/dot.shared
* LSUB () / Shared/
* LSUB (\Noselect) / Shared/ixogux
. OK Lsub completed.


. list  Shared/*
* LIST (\Noselect \HasChildren) / Shared/ixogux
* LIST (\Noselect \HasChildren) / Shared/dot.user
* LIST (\HasNoChildren) / Shared/ixogux/ixshare
* LIST (\HasNoChildren) / Shared/dot.user/dot_shared
. OK List completed.

. list  Shared/%
* LIST (\Noselect \HasChildren) / Shared/ixogux
* LIST (\Noselect \HasChildren) / Shared/dot.user
. OK List completed.





Re: [Dovecot] Maildir over NFS

2010-08-06 Thread Noel Butler
On Fri, 2010-08-06 at 13:31 -0600, CJ Keist wrote:


 
 For our new mail server I'm looking to switch to the Maildir format.  
 Some years ago I remember reading that it was not recommended to run 
 Maildir format over NFS.  Now I'm looking at several posts that seem to 
 indicate that Maildir should run fine over NFS.  I'm a little concerned 


Maildir was designed with NFS in mind, it is, always has been, and
always will be, perfectly suited to any mail based system.
It was,  is, and likely always will be,  mbox  that is dangerous to use
over NFS.


 about running Maildir over NFS, especially from the howto conversion 
 pages I read would move all messages over to the User ~/Maildir folder 
 including the inbox.  So having every single mail transaction going over 
 NFS doesn't seem the smart thing to do.
 


Actually you will not notice any difference. How do you think all the
big boys do it now :)  Granted some opted for the SAN approach over NAS,
but for mail, NAS is better way to go IMHO and plenty of large services,
ISP, corporations, and universities etc, all use NAS.

One thing I strongly suggest however, for added security, is to use an
internal private RFC1918 based LAN for NFS using your second ethernet
port.


 So question I have for the dovecot team, does running Maildir over NFS 



For years, safely and happily.


 We have about 3400 users, doing about 30k mail deliveries daily.  Some 
 users have 10's of thousands of mail messages in hundreds of mail folders.
 


Run systems where multiple front end MTA's each processing 1.1million
messages a day, and that's accepted messages each, not counting rejected
connections, along with the several pop3 and webmail servers, all
talking to this same mail system, best to use a dedicated device like a
NetApp filer as the NAS though, not a garden variety server, but, even
so, so long as the hardware is good, I can't see how you could go wrong
with even that.

Oh, and I trust you are using a virtual users and not system users,
might be a good time to at least think about that if your still using
system users, since you can expand to multiple servers easily, in fact,
with only 2 minutes effort.

Cheers

attachment: stock_smiley-1.png

Re: [Dovecot] Maildir over NFS

2010-08-06 Thread Noel Butler
On Fri, 2010-08-06 at 16:27 -0400, Patrick Domack wrote:

 .
 
 Looking at the new methods for v2.0, still on the fence though with them.
 


Yeah, know what ya mean, I've decided, if it aint broke, dont break
it :)

attachment: stock_smiley-1.png

Re: [Dovecot] Maildir over NFS

2010-08-06 Thread Timo Sirainen
On 6.8.2010, at 20.31, CJ Keist wrote:

 So question I have for the dovecot team, does running Maildir over NFS work 
 well?  Or would you recommend that all user mail folders be stored locally on 
 the mail server when using Maildir?

As long as you have only a single Dovecot server accessing mails at the same 
time (that includes Dovecot LDA, but not non-Dovecot LDA), there won't be any 
reliability problems. For better performance you could then also put index 
files on local disk.

If you have multiple servers accessing mails at the same time, I recommend v2.0 
with director enabled.



Re: [Dovecot] Making both folder and .folder available to dovecot-lda but not imap

2010-08-06 Thread Stand H


--- On Fri, 8/6/10, Timo Sirainen t...@iki.fi wrote:

 From: Timo Sirainen t...@iki.fi
 Subject: Re: [Dovecot] Making both folder and .folder available to 
 dovecot-lda but not imap
 To: Stand H hstan...@yahoo.com
 Cc: dovecot@dovecot.org
 Date: Friday, August 6, 2010, 4:32 AM
 On 6.8.2010, at 3.37, Stand H wrote:
 
  Hi,
  
  I'm looking for a way to deliver mail to both 'folder'
 and '.folder'. I put LAYOUT=fs to mail_location, sieve
 recognize both 'folder' and '.folder',
 
 Okay..
 
  but I don't want dovecot-imap to show 'folder' to imap
 client. The purpose is to send some emails to 'folder' and
 don't let user to see the folder and email in it.
 
 This makes less sense to me. Are you talking about just one
 folder or all folders that don't begin with a '.'? If just
 one, you could use ACLs to remove user's access to it. If
 all, probably easier to just change the code.
 
 

Hi Timo,

I just need one 'folder'. I try ACL and it works. Thanks.

Stand



  



Re: [Dovecot] Searching dovecot Maildir

2010-08-06 Thread emdeex
Thanks Timo, upgrading to v2.0 seems like a good move, and thanks for the
example of doveadm, that makes me even happier I'm using Dovecot.

Do you know if Mandriva has released a v2.0 rpm package ?

regards

On 6 August 2010 21:36, Timo Sirainen t...@iki.fi wrote:

 On 6.8.2010, at 4.16, emdeex wrote:

  I want to search my Sent mail folder for all messages with a certain
  subject, then grep out a certain line that has a dollar ($) figure, and
  add up those figures.  The idea is to just add up all the values of
 quotes
  I've sent in a month.

 a) Do it via IMAP protocol by using some IMAP library for
 Perl/Python/whatever.

 b) Upgrade to Dovecot v2.0.0 and do it via doveadm:
 doveadm fetch body mailbox Sent subject something body $ | grep '\$' | etc
 script processing




Re: [Dovecot] Searching dovecot Maildir

2010-08-06 Thread Timo Sirainen
Hmm. Last I heard, Mandriva died.. 
http://www.osnews.com/story/23276/Mandriva_S_A_For_Sale

If something happened since then, I've no idea.

On 7.8.2010, at 3.53, emdeex wrote:

 Thanks Timo, upgrading to v2.0 seems like a good move, and thanks for the 
 example of doveadm, that makes me even happier I'm using Dovecot.
 
 Do you know if Mandriva has released a v2.0 rpm package ?
 
 regards
 
 On 6 August 2010 21:36, Timo Sirainen t...@iki.fi wrote:
 On 6.8.2010, at 4.16, emdeex wrote:
 
  I want to search my Sent mail folder for all messages with a certain
  subject, then grep out a certain line that has a dollar ($) figure, and
  add up those figures.  The idea is to just add up all the values of quotes
  I've sent in a month.
 
 a) Do it via IMAP protocol by using some IMAP library for 
 Perl/Python/whatever.
 
 b) Upgrade to Dovecot v2.0.0 and do it via doveadm:
 doveadm fetch body mailbox Sent subject something body $ | grep '\$' | etc 
 script processing