Re: [Dovecot] Zlib plugin - when does it make sense?

2013-11-25 Thread René Neumann
Am 25.11.2013 14:12, schrieb Everton Foscarini:
 I have a relatively big installation here in the university, 1 mail
 server for 10.000 daily active accounts.
 
 I converted from maildir to mdbox + zlib in march, and these are my
 considerations:
 
 1. CPU is not a problem, even delivering more than 400 messages per
 minute (blade HS21 with 2xQuad E5430 from 2008)
 2. I used dsync to convert from maildir to mdbox, with dovecot 2.1 at
 the time.
 
 The biggest win is the file number reduction, from 27 million to 2 million.

But this is due to the conversion to mdbox and not the compression,
isn't it?

- René



Re: [Dovecot] Strange errors with imapc+acl in 2.2.x

2013-09-27 Thread René Neumann
Am 25.09.2013 03:42, schrieb Timo Sirainen:
 On 24.9.2013, at 19.16, René Neumann li...@necoro.eu wrote:
 
 after migrating to 2.2 (currently using 2.2.5), I see strange error
 messages when using imapc + public namespace + acl

 My setup: I create a public shared mailbox with imapc as location. Then
 I restrict this mailbox to one user only using ACLs.

 This works for this one special user, but for all others an error gets
 logged and they can't access their mailbox anymore:

 Sep 24 18:09:46 [dovecot] imap(other@my.domain): Error: user
 other@my.domain: Initialization failed: Namespace 'Gemeinsam.':
 Ambiguous mail location setting, don't know what to
 do with it: yes (try prefixing it with mbox: or maildir:)
 
 I can't reproduce this. Set mail_debug=yes and show what's in the logs?
 
 

Log for a non-working user is attached.

Also here is the userdb-query:

user_query = \
SELECT 1002 AS uid, 1005 AS gid, '/var/vmail/%d/%n' AS home, \
IF(imapc,'imapc:','') AS 'namespace/gemeinsam/location' \
FROM virtual_users \
WHERE user='%u'

From the logs it seems that '' is converted to 'yes'.

(So probably, ACL has nothing to do with the error.)

- René


Sep 27 10:56:18 [dovecot] imap-login: Login: user=other@my.domain, 
method=PLAIN, rip=dead::beef, lip=dead::beef, mpid=15210, secured, 
session=QJXkqFnn3AAqAykAAAI
AAQAc
Sep 27 10:56:18 [dovecot] imap: Debug: Loading modules from directory: 
/usr/lib64/dovecot
Sep 27 10:56:18 [dovecot] imap: Debug: Module loaded: 
/usr/lib64/dovecot/lib01_acl_plugin.so
Sep 27 10:56:18 [dovecot] imap: Debug: Module loaded: 
/usr/lib64/dovecot/lib02_imap_acl_plugin.so
Sep 27 10:56:18 [dovecot] imap: Debug: Module loaded: 
/usr/lib64/dovecot/lib90_antispam_plugin.so
Sep 27 10:56:18 [dovecot] imap: Debug: Added userdb setting: 
namespace/gemeinsam/location=yes
Sep 27 10:56:18 [dovecot] imap(other@my.domain): Debug: Effective uid=1002, 
gid=1005, home=/var/vmail/my.domain/other
Sep 27 10:56:18 [dovecot] imap(other@my.domain): Debug: acl: No acl_shared_dict 
setting - shared mailbox listing is disabled
Sep 27 10:56:18 [dovecot] imap(other@my.domain): Debug: Namespace inbox: 
type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes 
location=sdbox:/var/vmail
/necoro.eu/tum/
Sep 27 10:56:18 [dovecot] imap(other@my.domain): Debug: fs: 
root=/var/vmail/my.domain/other, index=, indexpvt=, control=, inbox=, alt=
Sep 27 10:56:18 [dovecot] imap(other@my.domain): Debug: acl: initializing 
backend with data: vfile:/etc/dovecot/global-acls:cache_secs=300
Sep 27 10:56:18 [dovecot] imap(other@my.domain): Debug: acl: acl username = 
other@my.domain
Sep 27 10:56:18 [dovecot] imap(other@my.domain): Debug: acl: owner = 1
Sep 27 10:56:18 [dovecot] imap(other@my.domain): Debug: acl vfile: Global ACL 
directory: /etc/dovecot/global-acls
Sep 27 10:56:18 [dovecot] imap(other@my.domain): Debug: Namespace gemeinsam: 
type=public, prefix=Gemeinsam., sep=., inbox=no, hidden=no, list=yes, 
subscriptions=no location=yes
Sep 27 10:56:18 [dovecot] imap(other@my.domain): Debug: sdbox autodetect: 
stat(yes/mailboxes) failed: No such file or directory
Sep 27 10:56:18 [dovecot] imap(other@my.domain): Debug: mdbox autodetect: 
stat(yes/storage) failed: No such file or directory
Sep 27 10:56:18 [dovecot] imap(other@my.domain): Debug: maildir autodetect: 
stat(yes/cur) failed: No such file or directory
Sep 27 10:56:18 [dovecot] imap(other@my.domain): Debug: sdbox autodetect: 
stat(yes/mailboxes) failed: No such file or directory
Sep 27 10:56:18 [dovecot] imap(other@my.domain): Error: user other@my.domain: 
Initialization failed: Namespace 'Gemeinsam.': Ambiguous mail location setting, 
don't know what to do 
with it: yes (try prefixing it with mbox: or maildir:)
Sep 27 10:56:18 [dovecot] imap(other@my.domain): Error: Invalid user settings. 
Refer to server log for more information.


[Dovecot] Strange errors with imapc+acl in 2.2.x

2013-09-24 Thread René Neumann
Hi,

after migrating to 2.2 (currently using 2.2.5), I see strange error
messages when using imapc + public namespace + acl

My setup: I create a public shared mailbox with imapc as location. Then
I restrict this mailbox to one user only using ACLs.

This works for this one special user, but for all others an error gets
logged and they can't access their mailbox anymore:

Sep 24 18:09:46 [dovecot] imap(other@my.domain): Error: user
other@my.domain: Initialization failed: Namespace 'Gemeinsam.':
Ambiguous mail location setting, don't know what to
 do with it: yes (try prefixing it with mbox: or maildir:)

Sep 24 18:09:46 [dovecot]
imap(other@my.domain): Error: Invalid user settings. Refer to server log
for more information.


My config (relevant parts):

-- Dovecot conf 

imapc_host = some_host
imapc_port = 143
imapc_user = some_user
imapc_password = some3$pwd
imapc_ssl = starttls
imapc_ssl_verify = no

namespace gemeinsam {
type = public
separator = .
location = imapc:
prefix = Gemeinsam.
subscriptions = no
}

# I also tried different combinations of hidden and list

plugin {
acl = vfile:/etc/dovecot/global-acls:cache_secs=300
}

- /etc/dovecot/global-acls/Gemeinsam ---

anyone
user=special@my.domain lrwstipekxa



Does anyone have any thoughts about this?

Thanks,
René


Re: [Dovecot] How to manually generate a password hash

2013-04-14 Thread René Neumann
Am 14.04.2013 04:10, schrieb David Murphy:
 Hi folks. I've recently set up a Postfix 2.9.6/Dovecot 2.0.19 IMAPS/SMTPS 
 setup on Ubuntu 12.04.2 (Mysql backend). I'm new to all this, so I apologize 
 if this is fairly basic. I've attempted to the best of my ability to search 
 for an answer, but no luck so far.
 
 What I'm trying to do is generate a password hash that I can inject directly 
 into my Mysql database (disaster recovery sort of situation). Towards that 
 goal, I'm trying to use 'doveadm pw' to generate a hash that matches a known 
 password in my database. Unfortunately, I'm coming up empty.
 
 My default_pass_scheme in dovecot-sql.conf is set to MD5-CRYPT, and the 
 passwords in the database have no scheme prefixes. I'm attempting to generate 
 a hash with:
 
   sudo doveadm pw -s 'MD5-CRYPT'
 
 but the hash generated does not match the user's password hash in the 
 database, which is known to be a good password.

*-CRYPT hashes are salted. Hence it is intended, that hashes differ.

$ doveadm pw -s 'MD5-CRYPT' -p test
{MD5-CRYPT}$1$s3UfgF6q$YRupP9GlEcaU5CYUOfkFl0
$ doveadm pw -s 'MD5-CRYPT' -p test
{MD5-CRYPT}$1$yVZQVf8U$aaguS/rkQOJXu29V76nUl/

 I've also tried using the -p flag and including the password in the command, 
 and that doesn't do it either, though it oddly gives a different response 
 than using the prompt. (What causes this? Newlines?)

I don't understand what you are trying to say here...

- René


[Dovecot] imapc: Restrict the number of connections

2012-07-13 Thread René Neumann
Hi,

I have managed to get an imapc connection to another server and bind its
contents to only one account (via global ACL).

The namespace itself is created as public, though it does not seem to
make a difference for this use case (i.e., it does not matter, whether
its type is 'public', 'shared', or 'private').

namespace {
  hidden = no
  list = children
  location = imapc:
  prefix = Gemeinsam.
  separator = .
  subscriptions = no
  type = public
}

One problem remains: Though there is only one account that is allowed to
use this imapc-connection, each imap-process opens a connection to the
imapc'd server.

Is this caused directly by the imapc_*-definitions in the config? Or is
there a way of restricting this to only the account which actually uses it.

Used dovecot version: 2.1.8

Thanks,
René


Re: [Dovecot] Dovecot performance under high load (vs. Courier)

2012-06-21 Thread René Neumann
Am 21.06.2012 22:22, schrieb Timo Sirainen:
 On Thu, 2012-06-21 at 13:05 -0700, email builder wrote: 
 Do you know what webmails are caching vs. non-caching?  
 
 Nearly all of them are non-caching. (I don't know of any caching ones.)

At least roundcube (v0.7.1 here) has some caching options:

--[excerpt from roundcubes main.inc.php]-
// Type of IMAP indexes cache. Supported values: 'db', 'apc' and 'memcache'.
$rcmail_config['imap_cache'] = null;

// Enables messages cache. Only 'db' cache is supported.
$rcmail_config['messages_cache'] = false;
-[end]

But I don't know, whether this is the sort of caching you are referring to.

- René



signature.asc
Description: OpenPGP digital signature


[Dovecot] imapc / namespace question

2012-04-13 Thread René Neumann
Hi,

I've got two questions regarding imapc and namespaces:

1) Is there a way of stating, that I only want part of the hierarchy on
the end of an imapc connection to be available here? My problem:

On the other end the layout is:

INBOX.Shared.{some,nice,folders}

If I mirror this into my dovecot hierarchy with prefix Gemeinsam I get
the following folder structure:

Gemeinsam.INBOX.Shared.{some,nice,folders}

But I want to ignore the two top-most parts of the hierarchy, i.e. I
want it to look:

Gemeinsam.{some,nice,folders}

Is this possible? I tried with 'location=imapc:INBOX.Shared.' but this
did not change anything.

2) Private namespaces only make sense, if location contains something
user-specific like %u or ~. Is this correct?
If yes: Is there some other way to make something like an imapc
connection only appear for one user, if there is nothing in the location
or imapc_user to denote the user it belongs to and hence I cannot use
private?
The only way I see currently is to use shared and set up ACLs to
forbid all users except one to access the namespace (which gets slightly
ugly as I have to use global ACLs, as -- I think -- there is no way to
store ACLs for an imapc storage).

Thanks,
René



signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] Folder name migration when moving from 2.0.x to 2.1.x?

2012-02-18 Thread René Neumann
Am 18.02.2012 19:59, schrieb Chris:
 Use something like Entwuerfe and not Entwürfe.

Come on ... software having problems with non-ASCII-stuff in 2012 is
just broken by design. Hence there should be no reason to use 'ue'
instead of ü anywhere.

- René

(P.S.: The intention of this mail was not to blame dovecot at all --
because at least until now, umlauts work exceptionally good here.)

 --
 Chris
 




signature.asc
Description: OpenPGP digital signature


[Dovecot] Capabilities of imapc

2012-01-24 Thread René Neumann
Hi *,

I can't find any decent information about the capabilities of imapc in
the planned future dovecot releases.

As I think about using imapc, I'll just give the two use-cases I see for
me. Will this be possible with imapc?

1) One (or more) folders in a mailbox which are proxied?
2) Proxy a whole mailbox _and use the folders in it as shared folders_.
That means account X on Server 1 (the dovecot box) is proxied via imapc
to Server 2 (some other server). The folders of this account on Server 1
are then shared with account Y. When account Y uses these folders they
are always up-to-date (so no action of account X is required).

The second use-case is just some (ugly) workaround in case the first one
is not possible.

Thanks,
René


Re: [Dovecot] Capabilities of imapc

2012-01-24 Thread René Neumann
Am 24.01.2012 10:31, schrieb Timo Sirainen:
 As I think about using imapc, I'll just give the two use-cases I see for
 me. Will this be possible with imapc?

 1) One (or more) folders in a mailbox which are proxied?
 
 Currently because imapc_* settings are global, you can't have more than one 
 imapc destination. This will be fixed at some point. Otherwise this works the 
 same way as other storage backends: You create namespace(s) for the folders 
 you want to proxy.

Ah - this sounds good. I'll try as soon as dovecot-2.1 is released
(because 2.0.17 does not include imapc, right?)

Thanks,
René


Re: [Dovecot] Sieve: Vacation, handle and variable

2011-09-21 Thread René Neumann
Am 21.09.2011 01:09, schrieb Stephan Bosch:
 Op 20-9-2011 23:48, René Neumann schreef:
 Am 20.09.2011 22:38, schrieb René Neumann:
 Hi *,

 I am adding a generic way for vacation-replies in my sieve setup. There
 I set the handle and the reason using variables (see end of mail). My
 simple question now is: Though variable expansion is not done for
 subject and reason, is it done for the handle? Because else there seems
 no way in configuring the vacation action via variables.
 Ok. I just learned about sieve-test. And this shows me:

 * send vacation message:
  =  seconds   : 604800
  =  subject: FooSubj
  =  from   : ...
  =  handle : ${vhandle}

 So the handle does not expand variables. Hence: Would it be possible to
 add for example a non-standard :expand list option to vacation, where
 'list' contains the names of the options where it is safe to do
 variable-expansion?
 
 No need. This is a violation of the standard and it was actually a long
 standing FIXME already. Fortunately, it was quite simple to repair:
 
 http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/fe6df3425850
 
 This will be included in the next release.
 
 Regards,
 
 Stephan
 

Thanks a lot. I'll try it out.

- René



signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] Sieve: Vacation, handle and variable

2011-09-21 Thread René Neumann
Am 21.09.2011 08:52, schrieb René Neumann:
 Am 21.09.2011 01:09, schrieb Stephan Bosch:

 http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/fe6df3425850

 This will be included in the next release.

 Regards,

 Stephan

 
 Thanks a lot. I'll try it out.
 
 - René
 

Ok ... seems to work like a charm :) (that is: pigeonhole-0.2.4 with the
above patch applied).

Thanks again,
René



signature.asc
Description: OpenPGP digital signature


[Dovecot] Sieve: Vacation, handle and variable

2011-09-20 Thread René Neumann
Hi *,

I am adding a generic way for vacation-replies in my sieve setup. There
I set the handle and the reason using variables (see end of mail). My
simple question now is: Though variable expansion is not done for
subject and reason, is it done for the handle? Because else there seems
no way in configuring the vacation action via variables.

I tried to read the code for this extension, but ... well ... the whole
sieve implementation is way more complicated then I figured ^^. Thus I
take the question to the list.

Thanks,
René

- default.sieve -

require [..., include, variables];

# set this to the text you want to get included in the vacation-mail
global [vacation, vhandle];

set vhandle ;
set vacation ;

[...]

include :personal vacation;

- vacation.sieve -

require [variables, include, vacation];

# this is set in the including script
global [vacation, vhandle];

if string :is ${vacation}  {
return;
}

# ensure we have a handle
if string :is ${vhandle}  {
set vhandle ${vacation};
}

if header :matches subject * {
set sbj Out of office [was: ${1}];

vacation :addresses [...]
 :from ... :days 7 :handle ${vhandle}
 :subject ${sbj} ${vacation};
}

-



signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] Sieve: Vacation, handle and variable

2011-09-20 Thread René Neumann
Am 20.09.2011 22:38, schrieb René Neumann:
 Hi *,
 
 I am adding a generic way for vacation-replies in my sieve setup. There
 I set the handle and the reason using variables (see end of mail). My
 simple question now is: Though variable expansion is not done for
 subject and reason, is it done for the handle? Because else there seems
 no way in configuring the vacation action via variables.

Ok. I just learned about sieve-test. And this shows me:

* send vacation message:
= seconds   : 604800
= subject: FooSubj
= from   : ...
= handle : ${vhandle}

So the handle does not expand variables. Hence: Would it be possible to
add for example a non-standard :expand list option to vacation, where
'list' contains the names of the options where it is safe to do
variable-expansion?

- René



signature.asc
Description: OpenPGP digital signature