Re: [Dovecot] Shared INBOX change in v2.1.6?

2012-04-30 Thread Robert Schetterer
Am 01.05.2012 02:21, schrieb Timo Sirainen:
> Previously Dovecot has shown shared INBOX like:
> 
> * LIST (\HasChildren) "/" "shared/tss2"
> * LIST (\HasNoChildren) "/" "shared/tss2/INBOX"
> * LIST (\HasNoChildren) "/" "shared/tss2/foo"
> 
> The last change in hg makes it return simply (same as with Cyrus):
> 
> * LIST (\HasChildren) "/" "shared/tss2"
> * LIST (\HasNoChildren) "/" "shared/tss2/foo"
> 
> This behavior could be made optional, but does anyone actually want it
> to work the old way (and why)? I'd rather not add an option that isn't
> useful to anyone.
> 
> I think older Dovecot versions have allowed opening both shared/tss2 and
> shared/tss2/INBOX, but at least in v2.1 that code was broken. With the
> last change it's still possible to open both of them, the
> shared/tss2/INBOX just isn't visible in LIST output.
> 
> 

what ever get patched, it should not brake existing installs
in the same version tree, unless there are urgent reasons for to do so
( security , bugfixes etc ), i am not sure what to decide in this case
at current i have it shown as
* LIST (\HasNoChildren) "/" "shared/tss2/INBOX"
and it looks ok to me
-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] question dovecot Inheritance global acl vs userfolder acl

2012-04-30 Thread Robert Schetterer
Am 01.05.2012 02:29, schrieb Timo Sirainen:
> On Mon, 2012-04-30 at 20:55 +0200, Robert Schetterer wrote:
>> Hi Timo
>> my tests resulted in
>> inheritance is given if a userfolder has set some acl to its new created
>> subfolder , which is nice
>>
>> if some userfolder has its acl from global acl
>> there is no inheritance to its new created subfolders,
>> that subfolders will always created with full owner rights
>>
>> i am not really sure if its a good idea
>> to have inheritance from global acl and
>> if its hackabel what is your idea to this ?
> 
> There is no ACL inheritance feature in Dovecot at all. The only thing
> that kind of appears as being inheritance is that when you create a new
> mailbox, its ACLs are copied from the parent's (but any future changes
> to parent ACLs won't change the child's.)
> 
> I've been planning on changing how global ACLs work though. The idea
> would be that you'd have a single dovecot-global-acl file that has
> fields:
> 
>  
> 
> So for example you could say:
> 
> foo user=tss lrw
> 
> This would work the same way as now. But you could also add:
> 
> foo/* user=admin lrwstipekxa
> 
> This would also apply to the children. Still, none of this is really
> "inheritance".
> 

Hi Timo, i would say this would be "good enough"
for new handling global acls , however if its not really
inheritance
-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] Dovecot/doveadm crash

2012-04-30 Thread Daniel L. Miller

On 4/30/2012 1:16 PM, Daniel L. Miller wrote:
Having a problem with a mailbox.  I've been trying to rebuild - but 
doveadm force-resync crashes.  This is mdbox with sis.



Here's a backtrace -

gdb --args doveadm force-resync -u msie...@amfes.com Sent
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 


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".
For bug reporting instructions, please see:
...
Reading symbols from /usr/local/bin/doveadm...done.
(gdb) run
Starting program: /usr/local/bin/doveadm force-resync -u 
msie...@amfes.com Sent

[Thread debugging using libthread_db enabled]
doveadm(msie...@amfes.com): Warning: mdbox 
/var/mail/amfes.com/msiegel/mdbox/storage: rebuilding indexes
doveadm(msie...@amfes.com): Panic: file istream.c: line 466 
(i_stream_grow_buffer): assertion failed: (stream->max_buffer_size > 0)
doveadm(msie...@amfes.com): Error: Raw backtrace: 
/usr/local/lib/dovecot/libdovecot.so.0(+0x4167a) [0x7765467a] -> 
/usr/local/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x32) 
[0x77654762] -> /usr/local/lib/dovecot/libdovecot.so.0(i_fatal+0) 
[0x7762c2a0] -> /usr/local/lib/dovecot/libdovecot.so.0(+0x4949b) 
[0x7765c49b] -> 
/usr/local/lib/dovecot/libdovecot.so.0(i_stream_get_buffer_space+0x82) 
[0x7765c522] -> /usr/local/lib/dovecot/libdovecot.so.0(+0x4b1c8) 
[0x7765e1c8] -> 
/usr/local/lib/dovecot/libdovecot.so.0(i_stream_read+0x69) 
[0x7765bb69] -> 
/usr/local/lib/dovecot/libdovecot.so.0(i_stream_read_next_line+0x1d) 
[0x7765c04d] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(dbox_file_metadata_read+0xd0) 
[0x778dd870] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(+0x3b958) 
[0x778da958] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(mdbox_storage_rebuild_in_context+0x2a9) 
[0x778daff9] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(mdbox_sync_begin+0x6b4) 
[0x778d97a4] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(mdbox_sync+0x34) 
[0x778d98d4] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(mdbox_storage_sync_init+0x87) 
[0x778d99b7] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(mailbox_sync_init+0x31) 
[0x77918871] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(mailbox_sync+0x27) 
[0x77918987] -> /usr/local/bin/doveadm() [0x40e2ff] -> 
/usr/local/bin/doveadm() [0x40e018] -> /usr/local/bin/doveadm() 
[0x40ea83] -> /usr/local/bin/doveadm(doveadm_mail_try_run+0x141) 
[0x40eef1] -> /usr/local/bin/doveadm(main+0x3c1) [0x415911] -> 
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff) [0x7729deff] 
-> /usr/local/bin/doveadm() [0x40de39]


Program received signal SIGABRT, Aborted.
0x772b2d05 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt full
#0  0x772b2d05 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x772b6ab6 in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2  0x77654688 in default_fatal_finish (type=out>, status=0) at failures.c:191
backtrace = 0x648140 
"/usr/local/lib/dovecot/libdovecot.so.0(+0x4167a) [0x7765467a] -> 
/usr/local/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x32) 
[0x77654762] -> /usr/local/lib/dovecot/libdovecot.so.0(i_fat"...
#3  0x77654762 in default_fatal_handler (ctx=0x7fffdc80, 
format=, args=)

at failures.c:205
status = 0
#4  0x7762c2a0 in i_panic (format=0x62b6 bounds>) at failures.c:263

ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0}
args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 
0x7fffdd50, reg_save_area = 0x7fffdc90}}
#5  0x7765c49b in i_stream_grow_buffer (stream=0x6c7590, 
bytes=) at istream.c:466

old_size = 
__FUNCTION__ = "i_stream_grow_buffer"
#6  0x7765c522 in i_stream_get_buffer_space (stream=0x6c7590, 
wanted_size=, size_r=)

at istream.c:500
__FUNCTION__ = "i_stream_get_buffer_space"
#7  0x7765e1c8 in i_stream_file_read (stream=0x6c7590) at 
istream-file.c:58

fstream = 0x6c7590
size = 
ret = 
__FUNCTION__ = "i_stream_file_read"
#8  0x7765bb69 in i_stream_read (stream=0x6c75f0) at istream.c:130
_stream = 0x6c7590
old_size = 8192
ret = 
__FUNCTION__ = "i_stream_read"
#9  0x7765c04d in i_stream_read_next_line (stream=0x6c75f0) at 
istream.c:382

line = 
#10 0x778dd870 in dbox_file_metadata_read_at (file=0x6c74a0) at 
dbox-file.c:661

line = 0x6c98d0 "BSent"
buf_size = 8192
ret = 0
#11 dbox_file_metadata_read (file=0x6c74a0)

[Dovecot] dovecot sasl with postfix: SASL LOGIN authentication failed: Connection lost to authentication server

2012-04-30 Thread David Jonas
When using dovecot (2.1.5) sasl with postfix (2.8.4) behind nginx smtp
proxy I am seeing a ton of errors of the form:

  postfix/smtpd[7731]: warning: unknown[192.168.0.6]: SASL LOGIN
  authentication failed: Connection lost to authentication server

Nothing is printed by dovecot in the logs regarding the error. It seems
that dovecot just hung up on postfix. (side note: no, can't use xclient
in nginx/postfix. But perhaps soon.)

After much digging I thought I solved it with:

  login_trusted_networks = 172.20.20.0/24
  mail_max_userip_connections = 0

This seems safe enough because dovecot is only providing sasl to
postfix, no connections to the outside world.

But the error is still happening.

# doveadm penalty
IP   penalty last_penaltylast_update
172.20.20.61   1 2012-04-30 19:15:56 19:15:56

strace on the anvil process shows a lot of GETs and INCs:

  18:54:06 read(14, "PENALTY-GET\t172.20.20.61\n", 397) = 25 <0.16>
  18:54:06 write(14, "1 1335837245\n", 13) = 13 <0.29>

A two minute survey showed penalty distribution:

 0: 60%
 1: 15%
 2: 18%
 3:  8%

Finally I just disabled penalties with the info from

 http://www.dovecot.org/list/dovecot/2011-December/062631.html

and that seemed to do it. Is there a better way?

This took me a long time to run down so I tried to make this message
detailed enough that others with similar problems will stumble upon it.


Re: [Dovecot] SETANNOTATION for Dovecot

2012-04-30 Thread Timo Sirainen
On Sat, 2012-04-28 at 18:09 +0200, Dieter Knopf wrote:

> i'm using kmail2 and for Folder Settings the SETANNOATION command is needed.
> 
> Is there any way to add this command to Dovecot?
> 
> I already found a dovecot-metadata-plugin 

That might do it, but it's not fully finished yet.

> but there is no Package available for Debian.

Nope.




Re: [Dovecot] 2.1.5: Panic: file mailbox-list-fs.c: line 156 (fs_list_get_path): assertion failed: (mailbox_list_is_valid_pattern(_list, name))

2012-04-30 Thread Timo Sirainen
On Fri, 2012-04-27 at 16:34 +1000, Nick Urbanik wrote:

> I upgraded to 2.1.5, and we have the same assertion failure, on the
> same mailbox:
> 
> Apr 27 16:02:03 imap(nu-imaptest00...@example.com): Panic: file 
> mailbox-list-fs.c: line 156 (fs_list_get_path): assertion failed: 
> (mailbox_list_is_valid_pattern(_list, name))
..
> Any suggestions welcome.
> 
> I guess enabling core dumps is a good start, I'll do that, but has
> anyone seen this before?

1) doveconf -n output

2) Can you show the list of all mailbox names? Or especially the one
that is causing this crash? (The raw backtrace indicates it happens
during quota recalculation, which gets a list of all mailboxes, so it
might not really be the same mailbox as what appears to be broken.)




Re: [Dovecot] [PATCH] Dovecot 2.1 compiling fix for AIX

2012-04-30 Thread Timo Sirainen
Committed: http://dovecot.org/pipermail/dovecot/2011-June/059987.html

On Fri, 2012-04-27 at 16:49 +0900, SATOH Fumiyasu wrote:
> Revised patch. Sorry.
> 
> At Fri, 27 Apr 2012 16:20:28 +0900,
> SATOH Fumiyasu wrote:
> > I'm trying to build Dovecot 2.1.5 on AIX 6.1 and got the following
> > build error:
> > 
> > $ ./configure
> > ...
> > $ make
> > ...
> > In file included from stats-connection.c:9:
> > stats-plugin.h:14: error: field 'user_cpu' has incomplete type
> > stats-plugin.h:14: error: field 'sys_cpu' has incomplete type
> > ...
> > 
> > The attached patch fixes this problem.
> 




Re: [Dovecot] lmtp proxy timeout while waiting for reply to DATA reply

2012-04-30 Thread Timo Sirainen
On Sat, 2012-04-28 at 13:00 +0200, Daniel Parthey wrote:

> we are experiencing similar sporadic data timeout issues with dovecot 2.0.20
> as in http://dovecot.org/pipermail/dovecot/2011-June/059807.html
> at least once a week. Some mails get temporarily deferred in the
> postfix queue since dovecot director lmtp refuses them and the
> mails are delivered at a later time.
..
> Shall I apply the following patches from
> http://dovecot.org/pipermail/dovecot/2011-June/059987.html
> or are they already included with version 2.0.20?

Those patches are already in v2.0.20. But what isn't in v2.0 is the
larger rewrite of the LMTP proxying code in v2.1, which I hope fixes
also this timeout problem.




Re: [Dovecot] Log messages

2012-04-30 Thread Timo Sirainen
On Mon, 2012-04-30 at 10:38 +0930, Stephen Davies wrote:

> I asked about log synch error back in March and have (repeatedly) deleted all 
> .imap files but the errors continue.
..
> Apr 30 09:00:12 server dovecot: imap(john): Error: Log synchronization error 
> at seq=2,offset=929952 for /home/john/Mail/INBOX/.imap/Archive/dovecot.index: 
> Extension header update points outside header size

You also deleted ~/Mail/INBOX/.imap/, not simply ~/Mail/.imap/? And
there weren't any imap sessions open at that time (which would recreate
them)?

The index file deletion should work. Also this has been fixed in v2.1.2
and newer.




Re: [Dovecot] restoring mails and directories

2012-04-30 Thread Timo Sirainen
On Mon, 2012-04-30 at 10:59 +0200, oni-n...@gmx.net wrote:
> Good day!
> 
> is there an easy way to restore e.g. deleted mails and/or mail directories?
> let me specify: I'm running dovecot 1.2.9 on a current ubuntu lts. It is set 
> to Maildir and I backup the folder with the users maildata nightly via rsync. 
> 
> now, when someone deletes a mail that they still need, and I copy it back 
> from the backup, it will not be visible to mail clients. When I change the 
> mailfile by a letter or so, it shows. that's easy enough, if not exactly 
> awesome ;-)

Sounds like the message gets its old IMAP UID back, but since IMAP isn't
designed for that, the clients don't realize it. By changing the
filename the message gets a new UID.

Although typically Dovecot should notice that and log an error and fix
the situation, except if you've disabled index files.

So..: Don't put the messages back to where you got them with the same
names.




Re: [Dovecot] Dovecot dsync mail replication issues

2012-04-30 Thread Timo Sirainen
On Mon, 2012-04-30 at 12:25 -0400, Michescu Andrei wrote:
> > tornado Maildir # doveadm sync -u lyn remote:r...@dustbowl.reub.net
> > dsync-local(lyn): Error: Can't rename mailbox
> > INBOX_7a86a62d465a974fb92f3b258734 to INBOX: Target mailbox already
> > exists
> The setup will run fine as long as you only update 1 server and the other
> one is backup. The current release does not handle well the master-master
> model (you'll endup with emails like the folders above: duplicated, with
> GUID appended to them etc etc)...

It does work, as long as you get the initial configuration to work
properly without adding the _GUIDs. The _GUIDs shouldn't be added if you
do the initial replication to the other side (to nonexistent Maildir!)
via dsync. I guess some plugins might also break this.

> Unfortunately the dsync is not working for the moment. Timo is in the
> process of redesigning it. So once it is release will know about it.

But yeah, the redesign is supposed to make all of this a lot easier and
more reliable. :) The new code can almost do the basics now, but still
needs some time.. I'm giving a talk about it in 3 weeks though, so I'm
planning on it being at least somewhat usable by then. :)




Re: [Dovecot] question dovecot Inheritance global acl vs userfolder acl

2012-04-30 Thread Timo Sirainen
On Mon, 2012-04-30 at 20:55 +0200, Robert Schetterer wrote:
> Hi Timo
> my tests resulted in
> inheritance is given if a userfolder has set some acl to its new created
> subfolder , which is nice
> 
> if some userfolder has its acl from global acl
> there is no inheritance to its new created subfolders,
> that subfolders will always created with full owner rights
> 
> i am not really sure if its a good idea
> to have inheritance from global acl and
> if its hackabel what is your idea to this ?

There is no ACL inheritance feature in Dovecot at all. The only thing
that kind of appears as being inheritance is that when you create a new
mailbox, its ACLs are copied from the parent's (but any future changes
to parent ACLs won't change the child's.)

I've been planning on changing how global ACLs work though. The idea
would be that you'd have a single dovecot-global-acl file that has
fields:

 

So for example you could say:

foo user=tss lrw

This would work the same way as now. But you could also add:

foo/* user=admin lrwstipekxa

This would also apply to the children. Still, none of this is really
"inheritance".



Re: [Dovecot] Single Instance Storage management

2012-04-30 Thread Timo Sirainen
On Mon, 2012-04-30 at 12:42 -0700, Daniel L. Miller wrote:
> Was there a doveadm command that checks the SIS files and removes any 
> not referenced?  Will the "doveadm purge -A" catch that?

Nope.




Re: [Dovecot] mdbox packing

2012-04-30 Thread Timo Sirainen
On Mon, 2012-04-30 at 12:43 -0700, Daniel L. Miller wrote:
> Is there a way to manually force an mdbox storage to be rebuilt into new 
> files?  Particularly files of the maximum size?

You could do it with dsync.




[Dovecot] Shared INBOX change in v2.1.6?

2012-04-30 Thread Timo Sirainen
Previously Dovecot has shown shared INBOX like:

* LIST (\HasChildren) "/" "shared/tss2"
* LIST (\HasNoChildren) "/" "shared/tss2/INBOX"
* LIST (\HasNoChildren) "/" "shared/tss2/foo"

The last change in hg makes it return simply (same as with Cyrus):

* LIST (\HasChildren) "/" "shared/tss2"
* LIST (\HasNoChildren) "/" "shared/tss2/foo"

This behavior could be made optional, but does anyone actually want it
to work the old way (and why)? I'd rather not add an option that isn't
useful to anyone.

I think older Dovecot versions have allowed opening both shared/tss2 and
shared/tss2/INBOX, but at least in v2.1 that code was broken. With the
last change it's still possible to open both of them, the
shared/tss2/INBOX just isn't visible in LIST output.




Re: [Dovecot] mdbox packing

2012-04-30 Thread Marcin Mirosław
W dniu 2012-04-30 21:43, Daniel L. Miller pisze:
> Is there a way to manually force an mdbox storage to be rebuilt into new
> files?  Particularly files of the maximum size?
> 

Hello,
probably doveadm purge should do it.
Regards,
Marcin


[Dovecot] Dovecot/doveadm crash

2012-04-30 Thread Daniel L. Miller
Having a problem with a mailbox.  I've been trying to rebuild - but 
doveadm force-resync crashes.  This is mdbox with sis.


doveadm purge -u dmil...@amfes.com
doveadm(dmil...@amfes.com): Panic: file istream.c: line 466 
(i_stream_grow_buffer): assertion failed: (stream->max_buffer_size > 0)
doveadm(dmil...@amfes.com): Error: Raw backtrace: 
/usr/local/lib/dovecot/libdovecot.so.0(+0x4167a) [0x7fb73465467a] -> 
/usr/local/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x32) 
[0x7fb734654762] -> /usr/local/lib/dovecot/libdovecot.so.0(i_fatal+0) 
[0x7fb73462c2a0] -> /usr/local/lib/dovecot/libdovecot.so.0(+0x4949b) 
[0x7fb73465c49b] -> 
/usr/local/lib/dovecot/libdovecot.so.0(i_stream_get_buffer_space+0x82) 
[0x7fb73465c522] -> /usr/local/lib/dovecot/libdovecot.so.0(+0x4b1c8) 
[0x7fb73465e1c8] -> 
/usr/local/lib/dovecot/libdovecot.so.0(i_stream_read+0x69) 
[0x7fb73465bb69] -> 
/usr/local/lib/dovecot/libdovecot.so.0(i_stream_read_next_line+0x1d) 
[0x7fb73465c04d] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(mdbox_purge+0x921) 
[0x7fb7348d7d71] -> doveadm() [0x40e1e6] -> doveadm() [0x40e018] -> 
doveadm() [0x40ea83] -> doveadm(doveadm_mail_try_run+0x141) [0x40eef1] 
-> doveadm(main+0x3c1) [0x415911] -> 
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff) [0x7fb73429deff] 
-> doveadm() [0x40de39]


--
Daniel


[Dovecot] mdbox packing

2012-04-30 Thread Daniel L. Miller
Is there a way to manually force an mdbox storage to be rebuilt into new 
files?  Particularly files of the maximum size?


--
Daniel


[Dovecot] Single Instance Storage management

2012-04-30 Thread Daniel L. Miller
Was there a doveadm command that checks the SIS files and removes any 
not referenced?  Will the "doveadm purge -A" catch that?


--
Daniel


[Dovecot] question dovecot Inheritance global acl vs userfolder acl

2012-04-30 Thread Robert Schetterer
Hi Timo
my tests resulted in
inheritance is given if a userfolder has set some acl to its new created
subfolder , which is nice

if some userfolder has its acl from global acl
there is no inheritance to its new created subfolders,
that subfolders will always created with full owner rights

i am not really sure if its a good idea
to have inheritance from global acl and
if its hackabel what is your idea to this ?
-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] Dovecot dsync mail replication issues

2012-04-30 Thread Michescu Andrei
Hello Reuben,

I'm having a very similar setup. The 2 main differences: all my users are
virtual and the "2nd server" is on a different continent (high latency
sync).

Unfortunately the dsync is not working for the moment. Timo is in the
process of redesigning it. So once it is release will know about it.

>
> drwx--  5 lyn lyn  4096 Apr 30 19:32
> .INBOX_7a86a62d465a974fb92f3b258734
>
> First question:  why is this random named directory being created in the
> origin Maildir?  Shouldn't the replication be more or less read-only in
> the origin Maildir?

- the number it is not random, but rather it is the GUID of the folder on
the other server. To get rid of this annoying problem you need to clean
your source of all these newly created folders, rsync your folders in
between the 2 machines, run dsync again (this time it will not mess up
with your folder structure)


> Second question:  If I re-attempt a doveadm sync a second time I get
> this error:
>
> tornado Maildir # doveadm sync -u lyn remote:r...@dustbowl.reub.net
> dsync-local(lyn): Error: Can't rename mailbox
> INBOX_7a86a62d465a974fb92f3b258734 to INBOX: Target mailbox already
> exists
> dsync-local(lyn): Error: Can't rename mailbox INBOX to
> INBOX_eb15f30ea563be4b70322bd68bb1: Renaming INBOX isn't supported.
> tornado Maildir #
>
> It's not clear if the second attempt has failed or succeeded, and it's a
> bit odd that it errors out on a directory that the dovecot sync process
> itself has created.
>

do the fix at Q1 and you will not run into this... it is not a permission
problem but rather a meta-info problem.

The setup will run fine as long as you only update 1 server and the other
one is backup. The current release does not handle well the master-master
model (you'll endup with emails like the folders above: duplicated, with
GUID appended to them etc etc)...

Wish Timo good luck and inspiration!

Best regards,
Andrei



Re: [Dovecot] Sieve doesn't find user scripts

2012-04-30 Thread Jochen Spieker
Timo Sirainen:
> On 30.4.2012, at 17.43, Jochen Spieker wrote:
> 
>> deliver(jrspie...@well-adjusted.de): Info: auth input: 
>> userdb_home=/srv/mail/home/well-adjusted.de/jrspieker
> 
> It should say "home" here, not "userdb_home".

Thanks, that's it!

dovecot-deliver.log now reads:

deliver(jrspie...@well-adjusted.de): Info: auth input: 
home=/srv/mail/home/well-adjusted.de/jrspieker
…
deliver(jrspie...@well-adjusted.de): Info: sieve: using sieve path for user's 
script: /srv/mail/home/well-adjusted.de/jrspieker/.dovecot.sieve
deliver(jrspie...@well-adjusted.de): Info: sieve: opening script 
/srv/mail/home/well-adjusted.de/jrspieker/.dovecot.sieve
deliver(jrspie...@well-adjusted.de): Info: sieve: executing compiled script 
/srv/mail/home/well-adjusted.de/jrspieker/.dovecot.sieve

Now I can finally start to migrate my .procmailrc.

J.
-- 
Driving behind lorries carrying hazardous chemicals makes me wish for a
simpler life.
[Agree]   [Disagree]
 


signature.asc
Description: Digital signature


Re: [Dovecot] Sieve doesn't find user scripts

2012-04-30 Thread Timo Sirainen
On 30.4.2012, at 17.43, Jochen Spieker wrote:

> deliver(jrspie...@well-adjusted.de): Info: auth input: 
> userdb_home=/srv/mail/home/well-adjusted.de/jrspieker

It should say "home" here, not "userdb_home".



Re: [Dovecot] Sieve doesn't find user scripts

2012-04-30 Thread Jochen Spieker
Stephan Bosch:
>> 
>> AFAICS, the sieve module is loaded and the home directory is correct.  The
>> content of this directory looks like this:
> 
> Could you enable mail_debug in your configuration? This will provide
> more detail on why it is not finding a script.

With globally enabled mail_debug and auth_debug I get this in mail.log:

postfix/qmgr[30005]: E306113C1E1: from=, size=1987, 
nrcpt=1 (queue active)
dovecot: auth(default): master in: USER   1   
jrspie...@well-adjusted.de  service=deliver
dovecot: auth(default): prefetch(jrspie...@well-adjusted.de): passdb didn't 
return userdb entries, trying the next userdb
dovecot: auth(default): sql(jrspie...@well-adjusted.de): SELECT u.storage || 
':' || d.basedir || u.userid as mail, 
'/srv/mail/home/well-adjusted.de/jrspieker' as userdb_home, 105 as uid, 109 as 
gid FROM mailuser u, domain d WHERE u.userid = 'jrspieker' AND u.domain = 
'well-adjusted.de' AND u.domain = d.name
dovecot: auth(default): master out: USER  1   
jrspie...@well-adjusted.de  
mail=maildir:/srv/mail/well-adjusted.de/jrspieker   
userdb_home=/srv/mail/home/well-adjusted.de/jrspieker   uid=105 gid=109
postfix/smtpd[5421]: disconnect from e177130134.adsl.alicedsl.de[85.177.130.134]
postfix/pipe[5428]: E306113C1E1: to=, 
relay=dovecot, delay=1.1, delays=0.6/0/0/0.5, dsn=2.0.0, status=sent (delivered 
via dovecot service)
postfix/qmgr[30005]: E306113C1E1: removed

and this in dovecot-deliver.log:

deliver(jrspie...@well-adjusted.de): Info: Loading modules from directory: 
/usr/lib/dovecot/modules/lda
deliver(jrspie...@well-adjusted.de): Info: Module loaded: 
/usr/lib/dovecot/modules/lda/lib10_quota_plugin.so
deliver(jrspie...@well-adjusted.de): Info: Module loaded: 
/usr/lib/dovecot/modules/lda/lib90_sieve_plugin.so
deliver(jrspie...@well-adjusted.de): Info: auth input: 
mail=maildir:/srv/mail/well-adjusted.de/jrspieker
deliver(jrspie...@well-adjusted.de): Info: auth input: 
userdb_home=/srv/mail/home/well-adjusted.de/jrspieker
deliver(jrspie...@well-adjusted.de): Info: auth input: uid=105
deliver(jrspie...@well-adjusted.de): Info: auth input: gid=109
deliver(jrspie...@well-adjusted.de): Info: Quota root: name=storage=512000 
backend=maildir args=
deliver(jrspie...@well-adjusted.de): Info: maildir: 
data=/srv/mail/well-adjusted.de/jrspieker
deliver(jrspie...@well-adjusted.de): Info: maildir++: 
root=/srv/mail/well-adjusted.de/jrspieker, index=, control=, 
inbox=/srv/mail/well-adjusted.de/jrspieker
deliver(jrspie...@well-adjusted.de): Info: sieve: user has no valid personal 
script
deliver(jrspie...@well-adjusted.de): Info: sieve: no scripts to execute: 
reverting to default delivery.
deliver(jrspie...@well-adjusted.de): Info: Namespace : Using permissions from 
/srv/mail/well-adjusted.de/jrspieker: mode=0755 gid=-1
deliver(jrspie...@well-adjusted.de): Info: 
msgid=<20120430142818.354b3...@manowar.wasteland.homelinux.net>: saved mail to 
INBOX

Doesn't look different than before, I had already enabled mail_debug
in the "protocol lda" section.

J.
-- 
I am not scared of death but terrified of people in Tommy Hilfiger
sweatshirts.
[Agree]   [Disagree]
 


signature.asc
Description: Digital signature


Re: [Dovecot] Sieve doesn't find user scripts

2012-04-30 Thread Stephan Bosch

On 4/29/2012 1:04 PM, Jochen Spieker wrote:

Hi,

I want to use Sieve filtering with my Dovecot 1.2 installation on Debian
squeeze. I have a virtual domain setup using Portgresql.

ManageSieve works fine so far, I can edit and activate/deactive scripts (using
Thunderbird + Plugin) and they show up in the filesystem where I expect them to
be, see below.

The problem is that LDA doesn't find the script. From
/var/log/dovecot-deliver.log:

| 2012-04-29 12:17:48 deliver(jrspie...@well-adjusted.de): Info: Loading 
modules from directory: /usr/lib/dovecot/modules/lda
| 2012-04-29 12:17:48 deliver(jrspie...@well-adjusted.de): Info: Module loaded: 
/usr/lib/dovecot/modules/lda/lib10_quota_plugin.so
| 2012-04-29 12:17:48 deliver(jrspie...@well-adjusted.de): Info: Module loaded: 
/usr/lib/dovecot/modules/lda/lib90_sieve_plugin.so
| 2012-04-29 12:17:48 deliver(jrspie...@well-adjusted.de): Info: auth input: 
mail=maildir:/srv/mail/well-adjusted.de/jrspieker
| 2012-04-29 12:17:48 deliver(jrspie...@well-adjusted.de): Info: auth input: 
userdb_home=/srv/mail/home/well-adjusted.de/jrspieker
| 2012-04-29 12:17:48 deliver(jrspie...@well-adjusted.de): Info: auth input: 
uid=105
| 2012-04-29 12:17:48 deliver(jrspie...@well-adjusted.de): Info: auth input: 
gid=109
| 2012-04-29 12:17:48 deliver(jrspie...@well-adjusted.de): Info: Quota root: 
name=storage=512000 backend=maildir args=
| 2012-04-29 12:17:48 deliver(jrspie...@well-adjusted.de): Info: maildir: 
data=/srv/mail/well-adjusted.de/jrspieker
| 2012-04-29 12:17:48 deliver(jrspie...@well-adjusted.de): Info: maildir++: 
root=/srv/mail/well-adjusted.de/jrspieker, index=, control=, inbox=
| 2012-04-29 12:17:48 deliver(jrspie...@well-adjusted.de): Info: sieve: user 
has no valid personal script
| 2012-04-29 12:17:48 deliver(jrspie...@well-adjusted.de): Info: sieve: no 
scripts to execute: reverting to default delivery.

AFAICS, the sieve module is loaded and the home directory is correct.  The
content of this directory looks like this:


Could you enable mail_debug in your configuration? This will provide 
more detail on why it is not finding a script.


Regards,

Stephan.


Re: [Dovecot] restoring mails and directories

2012-04-30 Thread Thierry de Montaudry
On 30 Apr 2012, at 10:59, oni-n...@gmx.net wrote:

> Good day!
> 
> is there an easy way to restore e.g. deleted mails and/or mail directories?
> let me specify: I'm running dovecot 1.2.9 on a current ubuntu lts. It is set 
> to Maildir and I backup the folder with the users maildata nightly via rsync. 
> 
> now, when someone deletes a mail that they still need, and I copy it back 
> from the backup, it will not be visible to mail clients. When I change the 
> mailfile by a letter or so, it shows. that's easy enough, if not exactly 
> awesome ;-)
> 
> But, if said person deletes a whole folder of mails, this way to make 
> restored mails show up becomes rather unreasonable. 
> 
> surely there is a better way to do this? I'd be glad for any and all hints! =)
> 
> best regards
> silvana
> -- 
> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

Hi,

Not sure about the availability on version 1.2.9, but the following command 
should do the trick: 
doveadm force-resync -u  

Regards,

Thierry



Re: [Dovecot] Refiltering mails without loosing flags

2012-04-30 Thread Stephan Bosch

On 4/28/2012 6:07 PM, Dieter Knopf wrote:

2011/12/12 Stephan Bosch:


Since last week, the new sieve-filter command line tool, which is intended
for just such a task, is part of the normal compile output for Pigeonhole
0.3.x for Dovecot v2.1. Unfortunately, it is not released yet, so I guess
you're stuck with your old getmail-based solution for now.

The tool is still experimental and I must say that I have not tested the
preservation of flags for some time and many changes were performed since
then. I will verify that later today. Also, the interaction with the new
editheader extension needs attention.

Is there any update about that? Would be really nice to have an nice
and easy way
like with procmail. Just via command line not via getmail/imap/


I didn't receive much feedback so far, so you may very well encounter 
some bugs. But I did test flag preservation just now and that just 
works. Pigeonhole v0.3.0 is released and contains all you need.


Just experiment with it a bit before you start using it for real mail.

Regards,

Stephan.


[Dovecot] Dovecot dsync mail replication issues

2012-04-30 Thread Reuben Farrelly

Hi,

I'm trying to set up some dsync based replication between two hosts on 
my network.  The current topology is a single server running Postfix 
with a single dovecot installation with a Maildir per user (only 4 users 
including myself).  No NFS, just local system users on ext4.  I am only 
using system users, ie no virtual users.  I am using dovecot deliver to 
deliver mails into the Maildir's.  This - being a very standard Maildir 
installation -  all works just fine.


I'm running dovecot-2.1.5 (release versions) x86_64 with Gentoo on both 
hosts and using key based ssh to transport the data using the root login.


What I would like to do is extend the design so as to replicate the 
Maildirs across a second machine and in the future be able to connect 
via IMAP into either machine to sync mail.  Two way dsync would be 
rather cool because I could then deliver via SMTP to either system and 
have changes automagically propagate - but initially just simple 
replication would be a good start.


I was hoping that dsync would allow me to do this, but I've run into 
quite a number of problems while getting this to work.


http://dovecot.org/list/dovecot/2012-March/064243.html
...was very useful and I've based my config on that.

Initially I've tried to sync up the user Maildirs, and this has more or 
less worked:


doveadm sync -u lyn remote:r...@dustbowl.reub.net

This succeeds without error on the initial sync.

However if I try to run the re-sync again (such as a use case of if the 
sync of another Maildir takes 4 hours so I want to resync up the earlier 
ones again) I end up with a mysteriously named INBOX folder in both the 
source and destination Maildirs:


drwx--  5 lyn lyn  4096 Apr 30 19:32 
.INBOX_7a86a62d465a974fb92f3b258734


It has the basic structure of a Maildir but is empty in terms of mails:

drwx--  2 lyn lyn 4096 Apr 30 19:32 cur
-rw---  1 lyn lyn  220 Apr 30 19:32 dovecot.index.log
-rw---  1 lyn lyn   51 Apr 30 19:32 dovecot-uidlist
-rw---  1 lyn lyn0 Apr 30 19:32 maildirfolder
drwx--  2 lyn lyn 4096 Apr 30 19:32 new
drwx--  2 lyn lyn 4096 Apr 30 19:32 tmp

First question:  why is this random named directory being created in the 
origin Maildir?  Shouldn't the replication be more or less read-only in 
the origin Maildir?


Second question:  If I re-attempt a doveadm sync a second time I get 
this error:


tornado Maildir # doveadm sync -u lyn remote:r...@dustbowl.reub.net
dsync-local(lyn): Error: Can't rename mailbox 
INBOX_7a86a62d465a974fb92f3b258734 to INBOX: Target mailbox already 
exists
dsync-local(lyn): Error: Can't rename mailbox INBOX to 
INBOX_eb15f30ea563be4b70322bd68bb1: Renaming INBOX isn't supported.

tornado Maildir #

It's not clear if the second attempt has failed or succeeded, and it's a 
bit odd that it errors out on a directory that the dovecot sync process 
itself has created.


Third question:  Upon starting Dovecot lots of ugliness is logged in the 
mail log:


Apr 30 19:44:59 tornado dovecot: master: Dovecot v2.1.5 starting up 
(core dumps disabled)
Apr 30 19:44:59 tornado dovecot: doveadm(mozsync): Error: user mozsync: 
Initialization failed: Namespace '': 
mkdir(/var/www/xxx/server-full/Maildir) failed: Permission denied 
(euid=1016(mozsync) egid=1016() missing +w perm: 
/var/www/xxx/server-full, dir owned by 0:0 mode=0755)
Apr 30 19:44:59 tornado dovecot: doveadm(mozsync): Error: sync: User 
init failed
Apr 30 19:44:59 tornado dovecot: doveadm(mozsync): Warning: I/O leak: 
0x414190 (line 102, fd 16)
Apr 30 19:44:59 tornado dovecot: dsync-local(cisco): Error: remote: 
doveadm(cisco): Fatal: User doesn't exist
Apr 30 19:44:59 tornado dovecot: dsync-local(cisco): Error: read() from 
worker server failed: EOF


Users mozsync and cisco are not valid mail users and it's not 
appropriate that Dovecot tries to create a Maildir for either of them. 
The users are system unprivileged users only, and do not ever send or 
receive mail.


And - I/O leak? ;)

Also, user cisco is local to one box only, and does not exist (nor does 
it need to) on the remote host.  So any complaints about this user are 
invalid and dovecot needs to ignore replication for this user anyway.



Fourth question, upon starting dovecot again, mail.log then spews 
several hundred of these messages:


Apr 30 19:45:06 tornado dovecot: dsync-local(reuben): Error: msg-get 
failed: box=Trash uid=114863 
guid=1335382569.M98089P29952.tornado,S=6479,W=6625


Before aborting entirely with:

Apr 30 19:45:09 tornado dovecot: imap: Server shutting down. in=328 out=2042

It seems to me that a a few of those problems logged could be solved by 
being able to specify which system users to synchronise, rather than 
Dovecot making a blind assumption that all users actually have valid 
Maildirs that need to be created, and all need to be sync'd between two 
hosts.


Subsequent delivery based sync'ing fails silently (pending more 
investigation) but I'd like to try and fix the

[Dovecot] restoring mails and directories

2012-04-30 Thread oni-neko
Good day!

is there an easy way to restore e.g. deleted mails and/or mail directories?
let me specify: I'm running dovecot 1.2.9 on a current ubuntu lts. It is set to 
Maildir and I backup the folder with the users maildata nightly via rsync. 

now, when someone deletes a mail that they still need, and I copy it back from 
the backup, it will not be visible to mail clients. When I change the mailfile 
by a letter or so, it shows. that's easy enough, if not exactly awesome ;-)

But, if said person deletes a whole folder of mails, this way to make restored 
mails show up becomes rather unreasonable. 

surely there is a better way to do this? I'd be glad for any and all hints! =)

best regards
silvana
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de