[Dovecot] Courier-to-Dovecot-migration: Outlook downloads all Mails again

2010-01-29 Thread Werner
Hi everybody,

I'm currently playing through the migration from Courier to dovecot. I've 
converted
the User's Maildir with 'courier-dovecot-migrate.pl'. Outlook 2003 is configured
to access the Mailbox via POP3, the option "Leave a copy of messages on the 
server"
is activated.

But: after the migration Outlook 2000 redownloads all mails again :-(

Could it be, that Outlook 2000 "thinks" (after changing the POP3/SMTP-Server in
the Outlook configuration pointing to my testsystem) this is a new system and 
starts to
download the messages again?

If so, Outlook 2000 won't download all messages again if we do the migration 
because
POP3/SMTP-Server remains the same. Can anybody confirm this?

We do not experience this issue with Thunderbird for example.

Thank you,
Werner




Re: [Dovecot] Courier-to-Dovecot-migration: Outlook downloads all Mails again

2010-01-29 Thread Werner

> If so, Outlook 2000 won't download all messages again if we do the migration 
> because
> POP3/SMTP-Server remains the same. Can anybody confirm this?

Hi again,

Found on the dovecot-Website:

"Some clients re-download all mails if you change the hostname in the client 
configuration. Be aware of this when testing."

Is this also relevant for Outlook 2000 ?

Thanks,
Werner






[Dovecot] Dovecot design-question

2010-02-01 Thread Werner
Hi everybody,

we're currently in the process of drafting our new mailserver-setup.
Instead of a single-server-setup we'd like to have two equal servers
behind a loadbalancer like LVS and shared mailhomes on NFS.

We'd like to use dovecot for POP/IMAP, dovecot-deliver as LDA.

- It's probably the best idea to direct SMTP and POP/IMAP always to
the same server behind the loadbalancer (because dovecot-deliver is
used which updates indexes?)

- If we think of a "active/passive" setup: dovecot index-files locally
or on the nfs-share?

- Is it possible to activate loadbalancing for SMTP in this environment
if dovecot index-files are held locally on each machine (POP/IMAP is
directed only to one of the two servers?)

Any comments welcome :-)
Werner


Re: [Dovecot] Dovecot design-question

2010-02-04 Thread Werner
Hi,

> - It's probably the best idea to direct SMTP and POP/IMAP always to
> the same server behind the loadbalancer (because dovecot-deliver is
> used which updates indexes?)

like mentioned on the website, but "would it be possible without nasty
errors" ?

> - If we think of a "active/passive" setup: dovecot index-files locally
> or on the nfs-share?

what's the better approach here?

thank you,
Werner


Re: [Dovecot] Dovecot design-question

2010-02-16 Thread Werner
Hi,

>>> - It's probably the best idea to direct SMTP and POP/IMAP always to
>>> the same server behind the loadbalancer (because dovecot-deliver is
>>> used which updates indexes?)
>>
>> like mentioned on the website, but "would it be possible without nasty
>> errors" ?
> 
> If both servers access index files at the same time, it's going to cause
> errors.

I'm currently running Tests for concurrent delivery via dovecot-deliver to
a mailbox on a nfs-share with postal. And so far, i did not notice any problems
when incoming SMTP is directed via LVS to two Mailservers which in parallel
drop messages with dovecot-deliver to the users mailbox and updates dovecots
index.files (btw. dovecot 1.2.10 in use, mail_nfs_storage = yes, mail_nfs_index 
= yes).

The only thing I've found so far:

Feb 16 17:33:46 cmx2 postfix/pipe[24221]: DD3F118A22A: to=, 
relay=dovecot, delay=3.4, delays=0.75/0/0/2.6, dsn=4.3.0,
status=deferred (temporary failure. Command output: Internal error occurred. 
Refer to server log for more information. [2010-02-16 17:33:43])

This message was delivered in the next run to the users mailbox.

> active/passive is guaranteed to work at least. Or any setup where a
> user's indexes aren't accessed at the same time by two machines.

We'd like to direct IMAP/IMAPS/POP/POPS/HTTP/HTTPS to one machine only but SMTP
should be directed via LVS to both servers in parallel. And regarding to the
mentioned tests - i assume this will work.

Any notes/annotations from you guys ? Why don't I experience NFS/Index-issues?

Regards,
Werner


Re: [Dovecot] Dovecot design-question

2010-02-17 Thread Werner
Hi Timo,

>> I'm currently running Tests for concurrent delivery via dovecot-deliver to
>> a mailbox on a nfs-share with postal. And so far, i did not notice any 
>> problems
>> when incoming SMTP is directed via LVS to two Mailservers which in parallel
>> drop messages with dovecot-deliver to the users mailbox and updates dovecots
>> index.files (btw. dovecot 1.2.10 in use, mail_nfs_storage = yes, 
>> mail_nfs_index = yes).
> 
> How heavily were you stress testing it?

Well, I've initated the test with the double amount of email that's currently 
handeled by
the current system. Tests have been initiated from external servers with postal:

srv1: postal -t 20 -r 100 -m 4192 -s 10 lvsmail.example.com user-list
srv2: postal -t 20 -r 100 -m 4192 -s 10 lvsmail.example.com user-list

(20 parallel sessions, 100 messages per Minute, maximal size of one email 4MB, 
one Mailbox)
After the Test I ran pflogsumm on the Mailserver-Nodes behind the LVS (before 
I've started
the Benchmark, Logs have been cleared). Bandwith on the Storage-Side was quite 
heavy
(83Mbit/s IN, 37MBit/s OUT) but LOAD (max 0.5) and CPU-USAGE (max 10%) of the 
Storage was
really OK.

In summary, I've admitted about 19841 Messages over 2 Nodes to the users 
mailbox. Dovecot
Deliver only had 5 times a problem (like mentioned) and deferred those 
messages. More Detailed
Pflogsumm-Output for the two MX-Nodes is found under [1] and [2].


>> The only thing I've found so far:
>>
>> Feb 16 17:33:46 cmx2 postfix/pipe[24221]: DD3F118A22A: 
>> to=, relay=dovecot, delay=3.4, delays=0.75/0/0/2.6, 
>> dsn=4.3.0,
>> status=deferred (temporary failure. Command output: Internal error occurred. 
>> Refer to server log for more information. [2010-02-16 17:33:43])
>
> That looks like exactly the kind of error I was talking about. Looking at 
> Dovecot's log would show what the internal error was.

sadly, I did not find any more specific hints in the Maillog (mail_debug=yes) 
than this line :-(
So, I assume it could work to have to servers for incoming SMTP active, even if 
dovecot-deliver
is used as LDA?

kind regards,
Werner


[1] Node1: (pflogsumm counts incoming mails twice because of smtpd_proxy_filter)


Grand Totals

messages

9656 received
4821 delivered
0 forwarded
4 deferred (4 deferrals)
9898m bytes received
9902m bytes delivered

Per-Hour Traffic Summary
time received delivered deferred bounced rejected

1700-1800 2872 1434 2 0 64
1800-1900 3622 1809 1 0 42
1900-2000 3162 1578 1 0 37

message deferral detail
---
pipe (total: 4)
1 04:03]
1 33:43]
1 43:46]
1 49:00]


[2] Node2: (pflogsumm counts incoming mails twice because of smtpd_proxy_filter)


Grand Totals

messages

30052 received
15020 delivered
0 forwarded
1 deferred (1 deferrals)
30576m bytes received
30614m bytes delivered

Per-Hour Traffic Summary
time received delivered deferred bounced rejected

1700-1800 9166 4573 0 0 46
1800-1900 11297 5651 0 0 98
1900-2000 9589 4796 1 0 79


message deferral detail
---
pipe (total: 1)
1 24:10]


Re: [Dovecot] Dovecot design-question

2010-02-17 Thread Werner
Hi,

> It really should have logged something. http://wiki.dovecot.org/LDA#logging 
> and/or http://wiki.dovecot.org/Logging may give hints.

I will set "log_path = /var/log/dovecot-deliver-errors.log" within the 
LDA-Section and will produce the temporary
failure again. I will get back to you.

>> So, I assume it could work to have to servers for incoming SMTP active, even 
>> if dovecot-deliver
>> is used as LDA?
> 
> Well, it's not error free, as you said you got 5 errors already. But if you 
> can live with random errors, sure..

I think, it's not really a "bad, nasty" error - the email is just deferred - 
and by the next delivery-attempt
it's successfully delivered.

Regards,
Werner


Re: [Dovecot] Dovecot design-question

2010-02-17 Thread Werner
Hi,

> I will set "log_path = /var/log/dovecot-deliver-errors.log" within the 
> LDA-Section and will produce the temporary
> failure again. I will get back to you.

Done - I've reproduced the error, here's the output from dovecot-deliver for 
those temporary Failures in the maillog:

2010-02-17 17:52:21 deliver(wer...@example.com): Error: Corrupted transaction 
log file /mailhome/wernertest/dovecot.index.log seq 24: Invalid
transaction log size (67988 vs 68080): /mailhome/wernertest/dovecot.index.log 
(sync_offset=67988)

Is this something to worry about ?

Thanks,
Werner


Re: [Dovecot] wish now I'd not upgraded...

2010-02-19 Thread Werner
Am 15.02.10 15:18, schrieb Timo Sirainen:
> On 15.2.2010, at 16.14, Stan Hoeppner wrote:
> 
>> Upgraded from Debian Dovecot 1.0.15 to Debian Dovecot 1.2.10-1~bpo50+1.
>>
>> Problem:  Instantly noticed in TB 3.0.1 Win32 that all emails in all folders
>> were marked as unread.
> 
> This is a Thunderbird bug and there have been several threads about this 
> here. Basically the fix is to disable CONDSTORE support in Thunderbird until 
> 3.0.2 is released.
> 

But this should not happen with POP3? I'm asking because I want to migrate from
courier to dovecot. In the Lab we've converted the mailbox to dovecot-format
BUT when using POP3, TB wants to download all Mails again.

So is this also related to the TB-Bug?

Thanks,
Werner


Re: [Dovecot] Dovecot design-question

2010-02-20 Thread Werner
Hi Timo,

>> 2010-02-17 17:52:21 deliver(wer...@example.com): Error: Corrupted 
>> transaction log file /mailhome/wernertest/dovecot.index.log seq 24: Invalid
>> transaction log size (67988 vs 68080): 
>> /mailhome/wernertest/dovecot.index.log (sync_offset=67988)
>>
>> Is this something to worry about ?
> 
> Probably not. You might lose the latest change from index, but then
> again since you're using Maildir, Dovecot finds out about the change
> soon anyway.

Great news - I think all problems/points are now solved so far and we can
start the migration =))

Seize the day,
Werner


[Dovecot] 2.0.16 - auth with vpopmail won´t work anymore

2011-11-29 Thread Werner Schöller

Hi,

after upgrading from 2.0.15 to 2.0.16 authentication with vpopmail won´t 
work anymore.


2.0.x and 1.2.x works (this output is from 2.0.15):

Nov 28 18:29:21 mail dovecot: auth: Debug: auth client connected (pid=3855)
Nov 28 18:29:21 mail dovecot: auth: Debug: client in: AUTH 1 PLAIN 
service=imap secured lip=10.114.57.11 rip=10.114.57.11 lport=143 
rport=37693 
resp=d3NjaG9lbGxlckBodGwtcGVyZy5hYy5hdAB3c2Nob2VsbGVyQGh0bC1wZXJnLmFjLmF0AGRpYWJsbw==
Nov 28 18:29:21 mail dovecot: auth-worker: Debug: 
vpopmail(wschoel...@htl-perg.ac.at,10.114.57.11): lookup user=wschoeller 
domain=htl-perg.ac.at
Nov 28 18:29:21 mail dovecot: auth: Debug: client out: OK 1 
user=wschoel...@htl-perg.ac.at
Nov 28 18:29:21 mail dovecot: auth: Debug: master in: REQUEST 4001103873 
3855 1 7a21a4d39cc6b187b3b14dc4cfbf077a
Nov 28 18:29:21 mail dovecot: auth-worker: Debug: 
vpopmail(wschoel...@htl-perg.ac.at,10.114.57.11): lookup user=wschoeller 
domain=htl-perg.ac.at
Nov 28 18:29:21 mail dovecot: auth: Debug: master out: USER 4001103873 
wschoel...@htl-perg.ac.at uid=89 gid=89 
home=/var/vpopmail/domains/htl-perg.ac.at/wschoeller
Nov 28 18:29:21 mail dovecot: imap-login: Login: 
user=, method=PLAIN, rip=10.114.57.11, 
lip=10.114.57.11, mpid=3856, secured
Nov 28 18:29:21 mail dovecot: imap(wschoel...@htl-perg.ac.at): 
Disconnected: Logged out bytes=29/405

Nov 28 18:29:21 mail dovecot: auth: Debug: auth client connected (pid=3858)


2.0.16 doesn´t work:

Nov 28 18:43:15 mail dovecot: auth: Debug: Loading modules from 
directory: /usr/lib/dovecot/auth
Nov 28 18:43:15 mail dovecot: auth: Debug: auth client connected 
(pid=27392)
Nov 28 18:43:15 mail dovecot: auth: Debug: client in: AUTH 1 PLAIN 
service=imap secured lip=10.114.57.11 rip=10.114.57.11 lport=143 
rport=42768 
resp=d3NjaG9lbGxlckBodGwtcGVyZy5hYy5hdAB3c2Nob2VsbGVyQGh0bC1wZXJnLmFjLmF0AGRpYWJsbw==
Nov 28 18:43:15 mail dovecot: auth-worker: Debug: Loading modules from 
directory: /usr/lib/dovecot/auth
Nov 28 18:43:15 mail dovecot: auth-worker: Debug: 
vpopmail(wschoel...@htl-perg.ac.at,10.114.57.11): lookup user=wschoeller 
domain=htl-perg.ac.at
Nov 28 18:43:15 mail dovecot: auth-worker: 
vpopmail(wschoel...@htl-perg.ac.at,10.114.57.11): Password mismatch
Nov 28 18:43:15 mail dovecot: auth-worker: Error: 
md5_verify(wschoel...@htl-perg.ac.at): Not a valid MD5-CRYPT or 
PLAIN-MD5 password
Nov 28 18:43:15 mail dovecot: auth-worker: Error: 
smd5_verify(wschoel...@htl-perg.ac.at): SMD5 password too short
Nov 28 18:43:15 mail dovecot: auth-worker: Error: 
ssha_verify(wschoel...@htl-perg.ac.at): SSHA password too short
Nov 28 18:43:15 mail dovecot: auth-worker: Error: 
ssha256_verify(wschoel...@htl-perg.ac.at): SSHA256 password too short
Nov 28 18:43:15 mail dovecot: auth-worker: Error: 
ssha512_verify(wschoel...@htl-perg.ac.at): SSHA512 password too short
Nov 28 18:43:15 mail dovecot: auth-worker: Warning: Invalid OTP data in 
passdb
Nov 28 18:43:15 mail dovecot: auth-worker: Debug: 
vpopmail(wschoel...@htl-perg.ac.at,10.114.57.11): CLEARTEXT(mypassword) 
!= '', try OTP scheme instead
Nov 28 18:43:17 mail dovecot: auth: Debug: client out: FAIL 1 
user=wschoel...@htl-perg.ac.at
Nov 28 18:43:17 mail dovecot: imap-login: Aborted login (auth failed, 1 
attempts): user=, method=PLAIN, 
rip=10.114.57.11, lip=10.114.57.11, secured


Dovecot -n:
# 2.0.15: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.36-gentoo-r8 i686 Gentoo Base System release 1.12.14
auth_debug = yes
auth_debug_passwords = yes
disable_plaintext_auth = no
first_valid_uid = 89
listen = *
mail_location = maildir:~/.maildir
namespace {
  hidden = no
  inbox = yes
  list = yes
  location =
  prefix = INBOX.
  separator = .
  type = private
}
passdb {
  args = webmail=127.0.0.1
  driver = vpopmail
}
service auth {
  user = root
}
ssl_cert = http://hg.dovecot.org/dovecot-2.0/rev/b99da8b1ecef

Thanks for any suggestions.

Best regards,
Werner



[Dovecot] Segfault in dovecot 1.2rc2 with quota + public namespace enabled

2009-04-07 Thread Markus Werner
Hi,

I have configured a public namespace ("#Shared"). Since dovecot 1.2rc2
(1.1.11 worked fine) I get a segfault, if I try to access a folder
under this namespace when quota plugin is enabled. When the quota
plugin is disabled, accessing those folders works.


$ dovecot -n

# 1.2.rc2: /opt/dovecot/etc/dovecot.conf
# OS: Linux 2.6.26-1-686 i686 Debian 5.0
base_dir: /var/run/dovecot
protocols: imap pop3
listen: 127.0.0.1,192.168.128.151
ssl_listen: 192.168.128.151
ssl_ca_file: /opt/dovecot/etc/certs/cacert.pem
ssl_cert_file: /opt/dovecot/etc/certs/asterixCert.pem
ssl_key_file: /opt/dovecot/etc/certs/asterixKey.pem
ssl_parameters_regenerate: 0
ssl_cipher_list: ALL:!LOW:!SSLv2
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /opt/dovecot/libexec/dovecot/imap-login
login_executable(imap): /opt/dovecot/libexec/dovecot/imap-login
login_executable(pop3): /opt/dovecot/libexec/dovecot/pop3-login
login_user: dovecotl
login_process_per_connection: no
login_processes_count: 1
login_max_processes_count: 3
max_mail_processes: 100
mail_max_userip_connections: 8
first_valid_uid: 2000
last_valid_uid: 2000
first_valid_gid: 2000
last_valid_gid: 2000
mail_access_groups: dovecot
mail_uid: 2000
mail_gid: 2000
mail_location: maildir:~/Maildir
mail_debug(default): yes
mail_debug(imap): yes
mail_debug(pop3): no
mail_executable(default): /opt/dovecot/libexec/dovecot/imap
mail_executable(imap): /opt/dovecot/libexec/dovecot/imap
mail_executable(pop3): /opt/dovecot/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota acl imap_acl fts fts_squat
mail_plugins(imap): quota imap_quota acl imap_acl fts fts_squat
mail_plugins(pop3):
mail_plugin_dir(default): /opt/dovecot/lib/dovecot/imap
mail_plugin_dir(imap): /opt/dovecot/lib/dovecot/imap
mail_plugin_dir(pop3): /opt/dovecot/lib/dovecot/pop3
pop3_no_flag_updates(default): no
pop3_no_flag_updates(imap): no
pop3_no_flag_updates(pop3): yes
namespace:
  type: private
  separator: /
  prefix: INBOX/
  inbox: yes
  list: yes
  subscriptions: yes
namespace:
  type: public
  separator: /
  prefix: #Shared/
  location: 
maildir:/var/spool/dovecot/sharedfolders:INDEX=~/Maildir/index/public:CONTROL=~/Maildir/control/public
  list: yes
  subscriptions: yes
namespace:
  type: shared
  separator: /
  prefix: #User/%%u/
  location: maildir:%%h/Maildir:INDEX=~/Maildir/index/shared/%%u
  list: yes
auth default:
  mechanisms: plain login
  user: dovecota
  worker_max_count: 3
  passdb:
driver: passwd-file
args: /opt/dovecot/etc/passwd
  userdb:
driver: passwd-file
args: /opt/dovecot/etc/passwd
  socket:
type: listen
client:
  path: /var/run/dovecot/auth-client
  mode: 432
  user: postfix
  group: postfix
master:
  path: /var/run/dovecot/auth-master
  mode: 432
  user: dovecota
  group: dovecot
plugin:
  sieve: ~/.dovecot/.dovecot.sieve
  acl: vfile:/opt/dovecot/etc/dovecot-acls
  acl_shared_dict: file:/var/lib/dovecot/shared-mailboxes.db
  acl_anyone: allow
  quota: dict:user::file:%h/Maildir/dovecot-quota
  quota_rule: *:storage=10G:messages=50
  fts: squat
  fts_squat: partial=4 full=10


$ gdb /opt/dovecot/libexec/dovecot/imap /var/spool/dovecot/users/markus/core

GNU gdb 6.8-debian
Copyright (C) 2008 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 "i486-linux-gnu"...

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/i686/cmov/libdl.so.2
Reading symbols from /lib/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /opt/dovecot/lib/dovecot/imap/lib01_acl_plugin.so...done.
Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib01_acl_plugin.so
Reading symbols from
/opt/dovecot/lib/dovecot/imap/lib02_imap_acl_plugin.so...done.
Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib02_imap_acl_plugin.so
Reading symbols from /opt/dovecot/lib/dovecot/imap/lib10_quota_plugin.so...done.
Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib10_quota_plugin.so
Reading symbols from
/opt/dovecot/lib/dovecot/imap/lib11_imap_quota_plugin.so...done.
Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib11_imap_quota_plugin.so
Reading symbols from /opt/dovecot/lib/dovecot/imap/lib20_fts_plugin.so...done.
Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib20_fts_plugin.so
Reading symbols from
/opt/dovecot/lib/dovecot/imap/lib21_fts_squat_plugin.so...done.
Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib21_fts_squat_plugin.so
Reading symbols from /lib/i686/cmov/libnss_compat.so.2...done.
Loaded symbols for /lib/i686/cmov/libnss_compat.so.2
Readin

Re: [Dovecot] Segfault in dovecot 1.2rc2 with quota + public namespace enabled

2009-04-07 Thread Markus Werner
Hi Timo,

On Tue, Apr 07, 2009 at 12:27:24PM -0400, Timo Sirainen wrote:
> On Tue, 2009-04-07 at 15:53 +0200, Markus Werner wrote:
> > I have configured a public namespace ("#Shared"). Since dovecot 1.2rc2
> > (1.1.11 worked fine) I get a segfault, if I try to access a folder
> > under this namespace when quota plugin is enabled. When the quota
> > plugin is disabled, accessing those folders works.
> 
> This should fix it: http://hg.dovecot.org/dovecot-1.2/rev/f38765916f6d

Not yet:

#0  0xb7f683f1 in acl_mailbox_get_aclobj (box=0x85ad440) at acl-mailbox.c:49
49  struct acl_mailbox *abox = ACL_CONTEXT(box);
(gdb) bt full
#0  0xb7f683f1 in acl_mailbox_get_aclobj (box=0x85ad440) at acl-mailbox.c:49
No locals.
#1  0xb7dfbc89 in cmd_myrights (cmd=0x85a5bd8) at imap-acl-plugin.c:305
storage = (struct mail_storage *) 0x85a35a8
box = (struct mailbox *) 0x85ad440
mailbox = 0x85aace0 "#Shared/System"
real_mailbox = 0x85932c0 "System"
rights = 
str = 
#2  0x0806700c in client_command_input (cmd=0x85a5bd8) at client.c:603
client = (struct client *) 0x85a5948
command = 
__PRETTY_FUNCTION__ = "client_command_input"
#3  0x080670a9 in client_command_input (cmd=0x85a5bd8) at client.c:652
client = (struct client *) 0x85a5948
command = 
__PRETTY_FUNCTION__ = "client_command_input"
#4  0x080676ed in client_handle_input (client=0x85a5948) at client.c:693
_data_stack_cur_id = 3
ret = 
remove_io = 
handled_commands = true
#5  0x08067ba3 in client_input (client=0x85a5948) at client.c:748
cmd = 
output = (struct ostream *) 0x85a5afc
bytes = 
__PRETTY_FUNCTION__ = "client_input"
#6  0x080f73f0 in io_loop_handler_run (ioloop=0x859eae8) at ioloop-epoll.c:208
ctx = (struct ioloop_handler_context *) 0x859ebf0
event = (const struct epoll_event *) 0x859ec30
list = (struct io_list *) 0x85a5b80
io = (struct io_file *) 0x85a5b58
tv = {tv_sec = 4, tv_usec = 999835}
t_id = 2
msecs = 
ret = 1
i = 0
j = 0
call = 
#7  0x080f6880 in io_loop_run (ioloop=0x859eae8) at ioloop.c:338
No locals.
#8  0x080704c5 in main (argc=Cannot access memory at address 0xc
) at main.c:320
No locals.


Re: [Dovecot] Segfault in dovecot 1.2rc2 with quota + public namespace enabled

2009-04-07 Thread Markus Werner
On Tue, Apr 07, 2009 at 02:42:43PM -0400, Timo Sirainen wrote:
> On Tue, 2009-04-07 at 20:31 +0200, Markus Werner wrote:
> > #0  0xb7f683f1 in acl_mailbox_get_aclobj (box=0x85ad440) at acl-mailbox.c:49
> > 49  struct acl_mailbox *abox = ACL_CONTEXT(box);
> > (gdb) bt full
> > #0  0xb7f683f1 in acl_mailbox_get_aclobj (box=0x85ad440) at acl-mailbox.c:49
> > No locals.
> > #1  0xb7dfbc89 in cmd_myrights (cmd=0x85a5bd8) at imap-acl-plugin.c:305
> 
> Another fix: http://hg.dovecot.org/dovecot-1.2/rev/4907cc591449
> 

This fixes the problem. Thanks.


[Dovecot] Segfault in ACL Plugin + user shared folders

2009-04-07 Thread Markus Werner
Hi Timo,

I have another problem, this time with user shared folders:

User "markus" shared the folder "ForTest" to test:

SETACL "INBOX/ForTest" test akxeilrwts

dovecot-acl and shared-mailboxes.db have been successfully updated.

As user "test" the folder (and "#User" namespace) is not visible.
When I configure the shared namespace with "list = yes", the namespace
and folder became visible and accessible, but lines like this are logged:

Apr  7 22:08:58 asterix dovecot: IMAP(test): acl vfile: reading file 
/var/spool/dovecot/users/test/Maildir/.Shared/dovecot-acl
Apr  7 22:09:03 asterix dovecot: IMAP(test): Invalid namespace prefix %u/ vs %
Apr  7 22:09:03 asterix dovecot: IMAP(test): auth input: uid=2000
Apr  7 22:09:03 asterix dovecot: IMAP(test): auth input: gid=2000
Apr  7 22:09:03 asterix dovecot: IMAP(test): auth input: 
home=/var/spool/dovecot/users/markus
Apr  7 22:09:03 asterix dovecot: IMAP(test): maildir: 
data=/var/spool/dovecot/users/markus/Maildir:INDEX=~/Maildir/index/shared/markus
Apr  7 22:09:03 asterix dovecot: IMAP(test): maildir++: 
root=/var/spool/dovecot/users/markus/Maildir, 
index=/var/spool/dovecot/users/markus/Maildir, 
index=/var/spool/dovecot/users/test/Maildir/index/shared/markus, control=, 
inbox=/var/spool/dovecot/users/markus/Maildir
Apr  7 22:09:03 asterix dovecot: IMAP(test): acl: initializing backend with 
data: vfile
Apr  7 22:09:03 asterix dovecot: IMAP(test): acl: acl username = test
Apr  7 22:09:03 asterix dovecot: IMAP(test): acl: owner = 0
Apr  7 22:09:03 asterix dovecot: IMAP(test): acl vfile: Global ACL directory: 
(null)
Apr  7 22:09:03 asterix dovecot: IMAP(test): acl vfile: reading file 
/var/spool/dovecot/users/markus/Maildir/.ForTest/dovecot-acl
Apr  7 22:09:08 asterix dovecot: IMAP(test): Invalid namespace prefix %u/ vs 
markus


When I try to access the folder directly with "list = children" set, then
dovecot segfaults. Last lines in logfile:

Apr  7 22:28:04 asterix dovecot: IMAP(test): acl: initializing backend with 
data: vfile
Apr  7 22:28:04 asterix dovecot: IMAP(test): acl: acl username = test
Apr  7 22:28:04 asterix dovecot: IMAP(test): acl: owner = 0
Apr  7 22:28:04 asterix dovecot: IMAP(test): acl vfile: Global ACL directory: 
(null)
Apr  7 22:28:04 asterix dovecot: child 5441 (imap) killed with signal 11 (core 
dumped)


The backtrace looks like the one I got with your first quota fix, but
quota works now and this error is reproducible with or without the quota
plugin:


GNU gdb 6.8-debian
Copyright (C) 2008 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 "i486-linux-gnu"...

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/i686/cmov/libdl.so.2
Reading symbols from /lib/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /opt/dovecot/lib/dovecot/imap/lib01_acl_plugin.so...done.
Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib01_acl_plugin.so
Reading symbols from 
/opt/dovecot/lib/dovecot/imap/lib02_imap_acl_plugin.so...done.
Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib02_imap_acl_plugin.so
Reading symbols from /opt/dovecot/lib/dovecot/imap/lib10_quota_plugin.so...done.
Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib10_quota_plugin.so
Reading symbols from 
/opt/dovecot/lib/dovecot/imap/lib11_imap_quota_plugin.so...done.
Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib11_imap_quota_plugin.so
Reading symbols from /opt/dovecot/lib/dovecot/imap/lib20_fts_plugin.so...done.
Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib20_fts_plugin.so
Reading symbols from 
/opt/dovecot/lib/dovecot/imap/lib21_fts_squat_plugin.so...done.
Loaded symbols for /opt/dovecot/lib/dovecot/imap/lib21_fts_squat_plugin.so
Reading symbols from /lib/i686/cmov/libnss_compat.so.2...done.
Loaded symbols for /lib/i686/cmov/libnss_compat.so.2
Reading symbols from /lib/i686/cmov/libnsl.so.1...done.
Loaded symbols for /lib/i686/cmov/libnsl.so.1
Reading symbols from /lib/i686/cmov/libnss_nis.so.2...done.
Loaded symbols for /lib/i686/cmov/libnss_nis.so.2
Reading symbols from /lib/i686/cmov/libnss_files.so.2...done.
Loaded symbols for /lib/i686/cmov/libnss_files.so.2
Core was generated by `imap'.
Program terminated with signal 11, Segmentation fault.
[New process 5441]
#0  0xb7ee43f1 in acl_mailbox_get_aclobj (box=0x8693488) at acl-mailbox.c:49
49  struct acl_mailbox *abox = ACL_CONTEXT(box);
(gdb) bt full
#0  0xb7ee43f1 in acl_mailbox_get_aclobj (box=0x8693488) at acl-mailbox.c:49
No locals.
#1  0xb7d77c89 in cmd_myrights (cmd=0x8658b90) at imap-acl-plugin.c:305
storage =

Re: [Dovecot] Segfault in ACL Plugin + user shared folders

2009-04-07 Thread Markus Werner
Hi Timo,

>
> http://hg.dovecot.org/dovecot-1.2/rev/7d484e0f0789
> http://hg.dovecot.org/dovecot-1.2/rev/3a30d73fc463
> http://hg.dovecot.org/dovecot-1.2/rev/b6abc84440df
>

With "list = children" the namespace ist still not listed, but that's no
problem for me. With "list = all" now there is a folder named "%"
listed, directly under "#User/", additionaly to "mar...@example.com".

Accessing the folder "mar...@example.com/ForTest" with Thunderbird results
in a segfault. Mutt works.
(FYI: I changed the usernames, now they include @domain, if that matters)

Apr  8 00:50:41 asterix dovecot: imap-login: Login: user=, 
method=PLAIN, rip=192.168.128.151, lip=192.168.128.151, secured
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): Loading modules from 
directory: /opt/dovecot/lib/dovecot/imap
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): Module loaded: 
/opt/dovecot/lib/dovecot/imap/lib01_acl_plugin.so
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): Module loaded: 
/opt/dovecot/lib/dovecot/imap/lib02_imap_acl_plugin.so
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): Module loaded: 
/opt/dovecot/lib/dovecot/imap/lib10_quota_plugin.so
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): Module loaded: 
/opt/dovecot/lib/dovecot/imap/lib11_imap_quota_plugin.so
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): Module loaded: 
/opt/dovecot/lib/dovecot/imap/lib20_fts_plugin.so
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): Module loaded: 
/opt/dovecot/lib/dovecot/imap/lib21_fts_squat_plugin.so
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): Effective uid=2000, 
gid=2000, home=/var/spool/dovecot/users/example.com/test
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): Quota root: name=user 
backend=dict 
args=:file:/var/spool/dovecot/users/example.com/test/Maildir/dovecot-quota
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): Quota rule: root=user 
mailbox=* bytes=2147483648 messages=5
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): dict quota: 
user=t...@example.com, 
uri=file:/var/spool/dovecot/users/example.com/test/Maildir/dovecot-quota, 
noenforcing=0
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): Namespace: 
type=private, prefix=INBOX/, sep=/, inbox=yes, hidden=no, list=yes, 
subscriptions=yes
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): maildir: data=~/Maildir
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): maildir++: 
root=/var/spool/dovecot/users/example.com/test/Maildir, index=, control=, 
inbox=/var/spool/dovecot/users/example.com/test/Maildir
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl: initializing 
backend with data: vfile
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl: acl username = 
t...@example.com
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl: owner = 1
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl vfile: Global ACL 
directory: (null)
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): Namespace: 
type=public, prefix=#Shared/, sep=/, inbox=no, hidden=no, list=yes, 
subscriptions=yes
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): maildir: 
data=/var/spool/dovecot/sharedfolders:INDEX=~/Maildir/index/public:CONTROL=~/Maildir/control/public
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): maildir++: 
root=/var/spool/dovecot/sharedfolders, 
index=/var/spool/dovecot/users/example.com/test/Maildir/index/public, 
control=/var/spool/dovecot/users/example.com/test/Maildir/control/public, inbox=
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl: initializing 
backend with data: vfile
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl: acl username = 
t...@example.com
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl: owner = 0
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): acl vfile: Global ACL 
directory: (null)
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): Namespace: 
type=shared, prefix=#User/%u/, sep=/, inbox=no, hidden=no, list=yes, 
subscriptions=no
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): shared: root=, index=, 
control=, inbox=
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): dict quota: 
user=mar...@example.com, 
uri=file:/var/spool/dovecot/users/example.com/test/Maildir/dovecot-quota, 
noenforcing=0
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): auth input: uid=2000
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): auth input: gid=2000
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): auth input: 
home=/var/spool/dovecot/users/example.com/markus
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): auth input: 
quota_rule=*:storage=20G:messages=50
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): maildir: 
data=/var/spool/dovecot/users/example.com/markus/Maildir:INDEX=~/Maildir/index/shared/mar...@example.com
Apr  8 00:50:41 asterix dovecot: IMAP(t...@example.com): maildir++: 
root=/va

Re: [Dovecot] Segfault in ACL Plugin + user shared folders

2009-04-08 Thread Markus Werner
Another one:

#0  0xb7fbf424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7e7a640 in raise () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#2  0xb7e7c018 in abort () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#3  0x080ee9a5 in default_fatal_finish (type=, status=0) 
at failures.c:161
backtrace = 0x8282480 "imap [0x80ee991] -> imap [0x80eea12] -> imap 
[0x80ee399] -> imap [0x80b50eb] -> imap(shared_storage_get_namespace+0x2bf) 
[0x8075fff] -> imap [0x80757d7] -> imap [0x8063034] -> 
imap(cmd_list_full+0x514"...
#4  0x080eea12 in i_internal_fatal_handler (type=LOG_TYPE_PANIC, status=0, 
fmt=0x810632c "file %s: line %d (%s): assertion failed: (%s)",
args=0xbfbda674 "\017\v\021\b\036") at failures.c:441
No locals.
#5  0x080ee399 in i_panic (format=0x810632c "file %s: line %d (%s): assertion 
failed: (%s)") at failures.c:208
No locals.
#6  0x080b50eb in mail_user_init (username=0x829854e "") at mail-user.c:30
user = 
pool = 
__PRETTY_FUNCTION__ = "mail_user_init"
#7  0x08075fff in shared_storage_get_namespace (_storage=0x82929d0, 
_name=0xbfbda724, ns_r=0xbfbda728) at shared-storage.c:224
user = (struct mail_user *) 0x828e270
ns = (struct mail_namespace *) 0x0
owner = 
domain = 0x0
username = 0x829854e ""
userdomain = 0x829854e ""
name = 0x810fc97 "INBOX"
p = 
dest = 
error = 
prefix = (string_t *) 0x82823b0
location = 
ret = 
static_tab = {{key = 117 'u', value = 0x0, long_key = 0x8110b32 
"user"}, {key = 110 'n', value = 0x0, long_key = 0x8109830 "username"}, {
key = 100 'd', value = 0x0, long_key = 0x8109839 "domain"}, {key = 104 'h', 
value = 0x0, long_key = 0x8109807 "home"}, {key = 0 '\0', value = 0x0,
long_key = 0x0}}
__PRETTY_FUNCTION__ = "shared_storage_get_namespace"
#8  0x080757d7 in shared_list_join_refpattern (list=0x8292dd8, ref=0x8298548 
"#User/", pattern=0x8298550 "*") at shared-list.c:148
ns = 
ns_ref = 0x829854e ""
prefix = 0x8292998 "#User/"
#9  0x08063034 in cmd_list_continue (cmd=0x8293448) at cmd-list.c:672
_data_stack_cur_id = 4
ctx = (struct cmd_list_context *) 0x82934e0
#10 0x08063a04 in cmd_list_full (cmd=0x8293448, lsub=false) at cmd-list.c:903
client = (struct client *) 0x82931b8
args = (const struct imap_arg *) 0x82984e8
arg = 
ctx = (struct cmd_list_context *) 0x82934e0
patterns = {arr = {buffer = 0x8293508, element_size = 4}, v = 
0x8293508, v_modifiable = 0x8293508}
pattern = 0x8298550 "*"
#11 0x08063d09 in cmd_list (cmd=0x8293448) at cmd-list.c:918
No locals.
#12 0x0806700c in client_command_input (cmd=0x8293448) at client.c:603
client = (struct client *) 0x82931b8
command = 
__PRETTY_FUNCTION__ = "client_command_input"
#13 0x080670a9 in client_command_input (cmd=0x8293448) at client.c:652
client = (struct client *) 0x82931b8
command = 
__PRETTY_FUNCTION__ = "client_command_input"
#14 0x080676ed in client_handle_input (client=0x82931b8) at client.c:693
_data_stack_cur_id = 3
ret = 
remove_io = 
handled_commands = false
#15 0x08067ba3 in client_input (client=0x82931b8) at client.c:748
cmd = 
output = (struct ostream *) 0x829336c
bytes = 
__PRETTY_FUNCTION__ = "client_input"
#16 0x080f73a0 in io_loop_handler_run (ioloop=0x828aae0) at ioloop-epoll.c:208
ctx = (struct ioloop_handler_context *) 0x828abe8
event = (const struct epoll_event *) 0x828ac28
list = (struct io_list *) 0x82933f0
io = (struct io_file *) 0x82933c8
tv = {tv_sec = 1799, tv_usec = 999778}
t_id = 2
msecs = 
ret = 1
i = 0
j = 0
call = 
#17 0x080f6830 in io_loop_run (ioloop=0x828aae0) at ioloop.c:338
No locals.
#18 0x080704c5 in main (argc=Cannot access memory at address 0x4c2f
) at main.c:320


Re: [Dovecot] Segfault in ACL Plugin + user shared folders

2009-04-16 Thread Markus Werner
On Thu, Apr 16, 2009 at 07:49:17PM -0400, Timo Sirainen wrote:
> On Wed, 2009-04-08 at 14:40 +0200, Markus Werner wrote:
> > #6  0x080b50eb in mail_user_init (username=0x829854e "") at mail-user.c:30
> 
> Fixed, although I don't really understand why any IMAP client would do
> that.

That fixed it. Thanks. Just for your information: Felamimail, the
mail client of EGroupware, seems to do that.


Re: [Dovecot] Segfault in ACL Plugin + user shared folders

2009-04-16 Thread Markus Werner
On Thu, Apr 16, 2009 at 08:10:00PM -0400, Timo Sirainen wrote:
> > With "list = children" the namespace ist still not listed, but that's no
> > problem for me. With "list = all" now there is a folder named "%"
> > listed, directly under "#User/", additionaly to "mar...@example.com".
> 
> Neither should be happening.. What does shared-mailboxes.db file
> contain?


shared/shared-boxes/user/mar...@example.com/t...@example.com
1
shared/shared-boxes/user/t...@example.com/mar...@example.com
1


> > Accessing the folder "mar...@example.com/ForTest" with Thunderbird results
> > in a segfault. Mutt works.
> 
> Oh. This was a stupid bug. Fixed:
> http://hg.dovecot.org/dovecot-1.2/rev/d7847f03ae65

Thanks.


[Dovecot] Shared folders and subscriptions

2009-04-17 Thread Markus Werner
Hi,

I've got a problem with user shared folders and subscriptions. When I try to
subscribe a folder, dovecot returns "OK Subscribe completed", but the newly
subscribed folder is not listed with LSUB:

a1 login t...@example.com ***
a1 OK [CAP.
a2 list "" "*"
* LIST (\HasChildren) "/" "INBOX"
* LIST (\Noselect \HasChildren) "/" "#User"
* LIST (\Noselect \HasChildren) "/" "#User/mar...@example.com"
* LIST (\HasNoChildren) "/" "#User/mar...@example.com/ForTest"
a3 subscribe "#User/mar...@example.com/ForTest"
a3 OK Subscribe completed.
a4 lsub "" "*"
* LSUB (\Noselect) "/" "#User/mar...@example.com"


Dovecot is 1.2-rc3, namespace configuration as follows:

namespace private {
separator = /
prefix = INBOX/
inbox = yes
subscriptions = yes
}

namespace public {
separator = /
prefix = "#Shared/"
location = 
maildir:/var/spool/dovecot/sharedfolders:INDEX=~/Maildir/index/public:CONTROL=~/Maildir/control/public
subscriptions = yes
}

namespace shared {
separator = /
prefix = "#User/%%u/"
location = 
maildir:%%h/Maildir:INDEX=~/Maildir/index/shared/%%u:CONTROL=~/Maildir/control/shared
subscriptions = yes
list = yes
}

I tried without CONTROL= directory in the shared namespace, but that made no 
difference.

Contents of the subscriptions (with CONTROL=) file after subscribing:

ForTestUser



Regards,
Markus


Re: [Dovecot] Shared folders and subscriptions

2009-04-17 Thread Markus Werner
On Fri, Apr 17, 2009 at 05:22:32PM -0400, Timo Sirainen wrote:
> On Fri, 2009-04-17 at 22:48 +0200, Markus Werner wrote:
> > namespace shared {
> > separator = /
> > prefix = "#User/%%u/"
> > location = 
> > maildir:%%h/Maildir:INDEX=~/Maildir/index/shared/%%u:CONTROL=~/Maildir/control/shared
> > subscriptions = yes
> > list = yes
> > }
> 
> The CONTROL must have also %%u in it, otherwise different shared users'
> control files get mixed together and everything breaks.

Thanks. I completely overlooked that missing part.

> Preferably you should also be using subscriptions=no so you wouldn't
> have to specify CONTROL at all, but for that you'd need to have a
> namespace with prefix="".

Would an additional namespace, for subscriptions only, work? I would
like to keep all subfolders of an Mailbox under INBOX/ .

> Anyway, this fixes subscriptions=yes:
> http://hg.dovecot.org/dovecot-1.2/rev/0dcb7e34a216

Works, thanks.


Re: [Dovecot] Shared folders and subscriptions

2009-04-17 Thread Markus Werner
On Fri, Apr 17, 2009 at 05:43:01PM -0400, Timo Sirainen wrote:
> It would be possible to do both. The INBOX/ could be set up as a hidden
> namespace and the "" namespace would be the default one. Or is there a
> reason why you wouldn't want "" namespace to show up anything?

Crying users, because suddenly something in their clients looks "very"
different :) I have many of those.

> Or you could also see if you could create a private namespace with
> prefix="#User/" and subscriptions=yes, perhaps with
> location=maildir:/var/lib/dovecot/empty:CONTROL=~/Maildir/shared where
> the empty directory would be a world-readable non-writable empty
> directory. That namespace should then catch subscriptions to shared
> mailboxes.

I tried this. The following is logged:

Apr 18 00:12:01 asterix dovecot: IMAP(mar...@example.com):
fchown(/var/spool/dovecot/users/example.com/markus/Maildir/control/shared/subscriptions.lock,
-1, 0) failed: Operation not permitted
Apr 18 00:12:01 asterix dovecot: IMAP(mar...@example.com):
file_dotlock_open() failed with subscription file
/var/spool/dovecot/users/example.com/markus/Maildir/control/shared/subscriptions:
Operation not permitted


Re: [Dovecot] Shared folders and subscriptions

2009-04-18 Thread Markus Werner
On Fri, Apr 17, 2009 at 07:07:49PM -0400, Timo Sirainen wrote:
>> I tried this. The following is logged:
>>
>> Apr 18 00:12:01 asterix dovecot: IMAP(mar...@example.com):
>> fchown(/var/spool/dovecot/users/example.com/markus/Maildir/control/ 
>> shared/subscriptions.lock,
>> -1, 0) failed: Operation not permitted
>
> It tries to preserve the group. Try chmod g+s to the empty directory.

That worked. Thanks again.


Re: [Dovecot] Segfault in ACL Plugin + user shared folders

2009-04-18 Thread Markus Werner
On Thu, Apr 16, 2009 at 08:10:00PM -0400, Timo Sirainen wrote:
> On Wed, 2009-04-08 at 01:03 +0200, Markus Werner wrote:
> > With "list = children" the namespace ist still not listed, but that's no
> > problem for me. With "list = all" now there is a folder named "%"
> > listed, directly under "#User/", additionaly to "mar...@example.com".

Talking IMAP manually, this looks like this:

a003 LIST "" "#User/%"
* LIST (\Noselect \HasChildren) "/" "#User/%"
* LIST (\Noselect \HasChildren) "/" "#User/t...@example.com"
* LIST (\Noselect \HasChildren) "/" "#User/stefa...@example.com"
a003 OK List completed.
a004 LIST "" "#User/%/%"
* LIST (\HasNoChildren) "/" "#User/t...@example.com/Shared"
* LIST (\HasNoChildren) "/" "#User/stefa...@example.com/Software"
* LIST (\HasNoChildren) "/" "#User/stefa...@example.com/Junk"
* LIST (\HasNoChildren) "/" "#User/stefa...@example.com/Apple"
a004 OK List completed.

or with "*":

a003 LIST "" "#User/*"
* LIST (\Noselect \HasChildren) "/" "#User/*"
* LIST (\Noselect \HasChildren) "/" "#User/t...@example.com"
* LIST (\Noselect \HasChildren) "/" "#User/stefa...@example.com"
* LIST (\HasNoChildren) "/" "#User/t...@example.com/Shared"
* LIST (\HasNoChildren) "/" "#User/stefa...@example.com/Software"
* LIST (\HasNoChildren) "/" "#User/stefa...@example.com/Junk"
* LIST (\HasNoChildren) "/" "#User/stefa...@example.com/Apple"
a003 OK List completed.
a004 LIST "" "#User/*/*"
* LIST (\HasNoChildren) "/" "#User/t...@example.com/Shared"
* LIST (\HasNoChildren) "/" "#User/stefa...@example.com/Software"
* LIST (\HasNoChildren) "/" "#User/stefa...@example.com/Junk"
* LIST (\HasNoChildren) "/" "#User/stefa...@example.com/Apple"
a004 OK List completed.


Re: [Dovecot] Segfault in ACL Plugin + user shared folders

2009-04-20 Thread Markus Werner
On Mon, Apr 20, 2009 at 01:28:47PM -0400, Timo Sirainen wrote:
> On Sat, 2009-04-18 at 14:46 +0200, Markus Werner wrote:
> > On Thu, Apr 16, 2009 at 08:10:00PM -0400, Timo Sirainen wrote:
> > > On Wed, 2009-04-08 at 01:03 +0200, Markus Werner wrote:
> > > > With "list = children" the namespace ist still not listed, but that's no
> 
> Fixed: http://hg.dovecot.org/dovecot-1.2/rev/163c3f85a3aa
> 
> > > > problem for me. With "list = all" now there is a folder named "%"
> > > > listed, directly under "#User/", additionaly to "mar...@example.com".
> > 
> > Talking IMAP manually, this looks like this:
> > 
> > a003 LIST "" "#User/%"
> > * LIST (\Noselect \HasChildren) "/" "#User/%"
> 
> Fixed: http://hg.dovecot.org/dovecot-1.2/rev/6a4cccf11702
> 

Both fixes work. Thanks.


[Dovecot] Incorrect listing of shared mailbox names

2009-04-20 Thread Markus Werner
After the LOGIN do STATUS "User/somemailbox":

a0007 STATUS "INBOX/Rechnung" (UIDNEXT UIDVALIDITY UNSEEN RECENT)
a0008 STATUS "User/li...@example.com/Announce" (UIDNEXT UIDVALIDITY UNSEEN 
RECENT)
a0009 STATUS "User/sys...@example.com/INBOX-root" (UIDNEXT UIDVALIDITY UNSEEN 
RECENT)
a0010 STATUS "User/t...@example.com/Shared" (UIDNEXT UIDVALIDITY UNSEEN RECENT)
a0011 STATUS "User/sys...@example.com/INBOX-mueller" (UIDNEXT UIDVALIDITY 
UNSEEN RECENT)
* STATUS "INBOX/Rechnung" (RECENT 0 UIDNEXT 82 UIDVALIDITY 1225738300 UNSEEN 0)
a0007 OK Status completed.
* STATUS "User/li...@example.com/Announce" (RECENT 0 UIDNEXT 103 UIDVALIDITY 
1240061761 UNSEEN 0)
a0008 OK Status completed.
* STATUS "User/sys...@example.com/INBOX-root" (RECENT 0 UIDNEXT 4 UIDVALIDITY 
1240060869 UNSEEN 0)
a0009 OK Status completed.
* STATUS "User/t...@example.com/Shared" (RECENT 0 UIDNEXT 3 UIDVALIDITY 
1225742113 UNSEEN 0)
a0010 OK Status completed.
* STATUS "User/sys...@example.com/INBOX-mueller" (RECENT 0 UIDNEXT 80 
UIDVALIDITY 1240060873 UNSEEN 0)
a0011 OK Status completed.


The first listing of "User/%" also lists the first folder of each user,
which has been polled by STATUS before. This seems to occur one time
(after the login) only.

a0012 LIST "" "%"
* LIST (\Noselect \HasChildren) "/" "User"
* LIST (\HasChildren) "/" "INBOX"
a0012 OK List completed.
a0013 LIST "" "User"
* LIST (\Noselect \HasNoChildren) "/" "User"
* LIST (\Noselect \HasChildren) "/" "User"
a0013 OK List completed.
a0014 LIST "" "User/%"
* LIST (\Noselect \HasChildren) "/" "User/Shared"
* LIST (\Noselect \HasChildren) "/" "User/Announce"
* LIST (\Noselect \HasChildren) "/" "User/INBOX-root"
* LIST (\Noselect \HasChildren) "/" "User/t...@example.com"
* LIST (\Noselect \HasChildren) "/" "User/li...@example.com"
* LIST (\Noselect \HasChildren) "/" "User/sys...@example.com"
a0014 OK List completed.



Used namespace configuration:

namespace private {
separator = /
prefix = INBOX/
inbox = yes
subscriptions = yes
}

namespace private {
separator = /
prefix = User/
location = maildir:/var/lib/dovecot/empty:CONTROL=~/Maildir/control/shared
subscriptions = yes
hidden = yes
list = no
}

namespace shared {
separator = /
prefix = User/%%u/
location = maildir:%%h/Maildir:INDEX=~/Maildir/index/shared/%%u
subscriptions = no
list = yes
}


Re: [Dovecot] Incorrect listing of shared mailbox names

2009-04-29 Thread Markus Werner
On Wed, Apr 29, 2009 at 02:26:58PM -0400, Timo Sirainen wrote:
> On Tue, 2009-04-21 at 08:21 +0200, Markus Werner wrote:
> > The first listing of "User/%" also lists the first folder of each user,
> > which has been polled by STATUS before. This seems to occur one time
> > (after the login) only.
> 
> Fixed: http://hg.dovecot.org/dovecot-1.2/rev/739c4e372140
> 
> Hopefully that's the final bug in there. :)
> 

Bugfix works.


Re: [Dovecot] Bare bones Debian vmWare appliance?

2013-03-14 Thread Werner Detter
Hi,

> Does anyone know of a decent bare-bones debian vmWare appliance I can
> download to play with?

I don't but: a base installation of Debian within VMWare with the
netinstall image takes approximately 5 Minutes ...

regards,
WErner




[Dovecot] ManageSieve doe not work

2010-01-20 Thread Mike Werner
Hi, 

I use MailScanner 4.74.16 (Ubuntu karmic). I convigured ManageSieve as
discribed in http://wiki.dovecot.org/ManageSieve/Configuration. But sieve
scripts are not applied to incoming mail. How can I determin what went
wrong?



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



[Dovecot] Migration from Courier to dovecot

2010-01-20 Thread Werner Detter
hi list,

I've just registered to the list, so please be tolerant ;) I'm currently
in the process of planning the migration from courier to dovecot as
POP/IMAP-Server. I'm migration from Courier 0.58 (Debian-Etch-packages)
to Dovecot 1.1.13 (Debian Lenny Backport).

The conversion of the Mailbox from Courier to Dovecot will be done with
"courier-dovecot-migrate.pl"-script[1], which works fine. However after
running "courier-dovecot-migrate.pl" the Courier-Files still remain in
the Maildir.

Can i just delete those Courier-specific-files or does dovecot need them
somehow (do you normally get rid of these after conversion)?

It's about these files:
courierimapacl
courierimapsubscribed
courierimapuiddb
courierpop3dsizelist

And those directories:
courierimaphieracl
courierimaphieracl

Can i simply delete those with "find" ? Furthermore: is it possible to
convert back from Dovecot-Format to Courier-Format?

Thanks in advance,
Werner

[1] http://www.dovecot.org/tools/courier-dovecot-migrate.pl



Re: [Dovecot] Migration from Courier to dovecot

2010-01-20 Thread Werner Detter

> The conversion of the Mailbox from Courier to Dovecot will be done with
> "courier-dovecot-migrate.pl"-script[1], which works fine. However after
> running "courier-dovecot-migrate.pl" the Courier-Files still remain in
> the Maildir.

expressed unlucky :-)

sure, dovecot doesn't need these files after the migration. I have to
test, if it's possible to convert from a previously "courier to
dovecot migrated maildir" back to courier-format.





Re: [Dovecot] Migration from Courier to dovecot

2010-01-20 Thread Werner Detter
Am 20.01.10 23:35, schrieb Timo Sirainen:

> Some version of the script can do dovecot -> courier migration, without the 
> courier* files,
> but perhaps unsurprisingly I've never been interested in writing or testing 
> that code, so in 
> the recent versions that I've modified it's probably broken.

Thanks for the info. I've asked because the convert-script offers the 
"--to-courier"-option,
I've tried that and it didn't work for me =)

regards,
Werner


[Dovecot] INBOX stored in AFS

2008-10-20 Thread Hans-Werner Paulsen
Hello,
currently we are storing the incoming mail in the user's home directory,
which is within a distributed filesystem called AFS (OpenAFS).
Accessing the "mbox" file directly (using the distributed filesystem)
works fine with mutt, thunderbird, ...
To access the INBOX from a machine, which does not have access to this
distributed filesystem, we are using IMAP (UW-imap).
Now I wanted to check if dovecot can do the job (maybe faster than UW),
and I had the following problem:
This is my configuration:
---
# 1.1.4: /opt/dovecot-1.1.4/etc/dovecot.conf
log_path: /var/log/dovecot
ssl_cert_file: /etc/ssl/certs/imapd.pem
ssl_key_file: /etc/ssl/keys/imapd.pem
login_dir: /var/run/dovecot/login
login_executable: /opt/dovecot-1.1.4/libexec/dovecot/imap-login
first_valid_uid: 100
mail_location: mbox:~/Mail:INBOX=~/.maildir/incoming
mail_debug: yes
mmap_disable: yes
mail_nfs_storage: yes
mail_nfs_index: yes
mbox_write_locks: fcntl
mbox_dirty_syncs: no
mbox_lazy_writes: no
mail_executable: /opt/dovecot-1.1.4/libexec/dovecot/afs-token 
/opt/dovecot-1.1.4/libexec/dovecot/imap
auth default:
  verbose: yes
  debug: yes
  passdb:
driver: pam
args: setcred=yes session=yes dovecot
  userdb:
driver: passwd
---
When I start my imap-client, I see the content of the INBOX, and I can
read, delete, ... the different entries. But when new mail arrives dovecot
(and my imap-client) will never notice this. And when I quit my imap-client
the dovecot imap server will write back its view of the INBOX, and delete
this new mail.
This seems to be a problem related to AFS. I poked in the dovecot code and
have the following theory: dovecot opens the INBOX R/W, dovecot calls "stat"
on the INBOX file periodically to look for modifications. But this does
not work, because this machine will stat the local copy (AFS cache) of the
INBOX as long as this file is still open R/W.
My questions:
Is it possible to have a configuration, that the INBOX file is not left open
when stat-ing this file?
Or is it possible to open the INBOX file R/W only when it us locked?
Or is it necessary to modify the code?

Thank you for any help,
HW 

-- 
Hans-Werner Paulsen [EMAIL PROTECTED]
MPI für Astrophysik Tel 089-3-2602
Karl-Schwarzschild-Str. 1   Fax 089-3-2235  
D-85741 Garching


Re: [Dovecot] INBOX stored in AFS

2008-10-30 Thread Hans-Werner Paulsen
On Mon, Oct 20, 2008 at 06:56:55PM +0300, Timo Sirainen wrote:
> On Mon, 2008-10-20 at 16:16 +0200, Hans-Werner Paulsen wrote:
> > When I start my imap-client, I see the content of the INBOX, and I can
> > read, delete, ... the different entries. But when new mail arrives dovecot
> > (and my imap-client) will never notice this. And when I quit my imap-client
> > the dovecot imap server will write back its view of the INBOX, and delete
> > this new mail.
> > This seems to be a problem related to AFS. I poked in the dovecot code and
> > have the following theory: dovecot opens the INBOX R/W, dovecot calls "stat"
> > on the INBOX file periodically to look for modifications. But this does
> > not work, because this machine will stat the local copy (AFS cache) of the
> > INBOX as long as this file is still open R/W.
> 
> I'd have thought that the local view was updated at least after fcntl
> locking the mailbox.
> 
> > My questions:
> > Is it possible to have a configuration, that the INBOX file is not left open
> > when stat-ing this file?
> > Or is it possible to open the INBOX file R/W only when it us locked?
> > Or is it necessary to modify the code?
> 
> It's necessary to modify the code. Probably not difficult (maybe in
> mbox_unlock()), but I'd rather not change that code permanently since
> this is a pretty AFS-specific problem..
> 

I checked flock (fcntl locking is not working at all) semantics on the AFS
filesystem with some small test programs:
Calling flock does NOT update the local view of the AFS file, if it is
opened R/W. But, status information seems to be up-to-date if the file
is opened R/O.
Now I want to modify the dovecot code for mbox processing in the following
way:
open the mbox R/O
before modifying the mbox file: close it, dot-lock the file and open it R/W
after modifying the mbox file: close it, remove the dot-lock, and open it R/O

Any hints in which files I have to look for the necessary modifications?

Thank you for your help,
HW

-- 
Hans-Werner Paulsen [EMAIL PROTECTED]
MPI für Astrophysik Tel 089-3-2602
Karl-Schwarzschild-Str. 1   Fax 089-3-2235  
D-85741 Garching


Replication .dovecot-sync.lock

2014-10-24 Thread Hans-Werner Paulsen
Hello all,
I have set up two servers with dovecot and replication. The mail location is
mail_location = sdbox:/var/spool/mail/%u
Everything works fine when I override the homedirectories
userdb {
  driver = passwd
  override_fields = home=/var/spool/mail/%u
}
But, when I do not override the homedirectories, replication does not work,
and the following error is logged:
Oct 24 14:40:45 dsync-local(hans): Error: Couldn't create lock 
/afs/mpa/home/hans/.dovecot-sync.lock: Permission denied

With a self-written module an IMAP user can get access to his homedirectory:
protocol imap {
  mail_plugins = afsToken
}
The user has to type in his password. Obviously this does not work for
replication.
Is there a way to specify a different location for the lockfile?
Isn't better to use the maildirectory but the homedirectory?
Is there a way to set the homedirectory differently for replication?

Thank you for any help.
HW

-- 
Hans-Werner Paulsen h...@mpa-garching.mpg.de
MPI für Astrophysik Tel 089-3-2602
Karl-Schwarzschild-Str. 1   Fax 089-3-2235  
D-85741 Garching


Dovecot Separator change

2019-05-16 Thread Oliver Werner via dovecot
Hi community,

actually we are using dovecot 2.2.27 without shares mailboxes.

Now  we would like to implement it.

So the problem is that our separator is dot „.“ and the username like 
„firstname.surname“.
That’s doesn’t works with shared mailboxes.

Are there a migration guide for changing „.“ to „/„ or it's not possible?


kind regards
Oliver