Duplicate messages

2014-12-12 Thread absolutely_f...@libero.it
Hi,
I just moved mail spool to a different network storage.
Now, several users are complaining about duplicate message that are fetched by 
their clients (Outlook, Microsoft Outlook).
What is the reason?

This is my conf:

# dovecot -n
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-71.el6.x86_64 x86_64 CentOS release 6.6 (Final)
auth_mechanisms = plain login digest-md5 cram-md5
disable_plaintext_auth = no
first_valid_gid = 89
first_valid_uid = 89
mail_gid = 89
mail_location = maildir:/coraid-s2l2/domains
mail_uid = 89
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date imapflags notify
mbox_write_locks = fcntl
namespace {
  inbox = yes
  location =
  prefix = INBOX.
  separator = .
  type = private
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
passdb {
  args = /etc/dovecot/dovecot-sql-crypt.conf.ext
  driver = sql
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  sieve_extensions = +notify +imapflags
  sieve_max_script_size = 1M
}
protocols = imap pop3 lmtp sieve
ssl_cert = /etc/nginx/ssl/wildcard.server.net.crt
ssl_key = /etc/nginx/ssl/wildcard.server.net.key
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocol lmtp {
  mail_plugins =
}
protocol lda {
  mail_plugins =
}


Re: Duplicate messages

2014-12-12 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 12 Dec 2014, absolutely_f...@libero.it wrote:


Hi,
I just moved mail spool to a different network storage.
Now, several users are complaining about duplicate message that are fetched by 
their clients (Outlook, Microsoft Outlook).
What is the reason?


How did you moved the message to the other network storage?


mail_location = maildir:/coraid-s2l2/domains


- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBVIqq2Xz1H7kL/d9rAQJqJgf/ZYLDY6IwdTcSUFXRdFlvyv37QW/R0fm0
Ki8izVuOHRNK2/YEubN2+TVouOD7X3COkYa8RCu8XSoWRiFKSl0PMHNsVqUIocA1
fEQOnY54nmdERsZ/+w8xLW5UZ2jKH12X3gqjMSFXUvMbvlhOCZFgvlckCx/DStC+
yjCM5yoOR711KXrhEzikr1lmxyR+kikh1N+MTLNkC3uQp0vFmWJR3HoXd3x+p+Dv
y0PkOZmna+B8a1ElGDYA8SyGVvVl2VT+YzGt7IPhZPB5j/CrW2Kcwm2j9OW0IWnE
rPuhY/5xqZoSUuGBGNXeA6bLy0gidnnZO7NpkMJgZcP6OnK612tMgw==
=qlBd
-END PGP SIGNATURE-


Re: Error: mremap_anon(###) failed: Cannot allocate memory

2014-12-12 Thread Teemu Huovila
On 12/11/2014 08:49 PM, Andy Dills wrote:
 Thanks for your suggestion. I checked the output of doveconf, and by default 
 it appears the vsz_limit is set to
 18446744073709551615B for each of the services, and 256M for 
 default_vsz_limit.
 
 I checked a user in question, and their index.cache was indeed large, 123M. 
 Seemingly needlessly so, as I deleted the dovecot
 files and reindexed, and now it's 6K.
 
 Thanks, I'll keep an eye on the users this affects and try to get their 
 index.cache in order.
Glad to hear that it is working now. In case the error reappears, please bear 
in mind that the 18446744073709551615 B
displayed in the config (Im assuming doveconf without switches) is the 
empty value, which actually means the value is not
set and the default_vsz_limit is used. 
http://wiki2.dovecot.org/Services#Service_limits

br,
Teemu Huovila


R: Re: Duplicate messages

2014-12-12 Thread absolutely_f...@libero.it
Hi Steffen,
with rsync 

Thank you


Messaggio originale
Da: skdove...@smail.inf.fh-brs.de
Data: 12/12/2014 9.44
A: absolutely_f...@libero.itabsolutely_f...@libero.it
Cc: dovecot@dovecot.org
Ogg: Re: Duplicate messages

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 12 Dec 2014, absolutely_f...@libero.it wrote:
 
 Hi,
 I just moved mail spool to a different network storage.
 Now, several users are complaining about duplicate message that are fetched 
by their clients (Outlook, Microsoft Outlook).
 What is the reason?

How did you moved the message to the other network storage?

 mail_location = maildir:/coraid-s2l2/domains

- -- 
Steffen Kaiser
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBVIqq2Xz1H7kL/d9rAQJqJgf/ZYLDY6IwdTcSUFXRdFlvyv37QW/R0fm0
Ki8izVuOHRNK2/YEubN2+TVouOD7X3COkYa8RCu8XSoWRiFKSl0PMHNsVqUIocA1
fEQOnY54nmdERsZ/+w8xLW5UZ2jKH12X3gqjMSFXUvMbvlhOCZFgvlckCx/DStC+
yjCM5yoOR711KXrhEzikr1lmxyR+kikh1N+MTLNkC3uQp0vFmWJR3HoXd3x+p+Dv
y0PkOZmna+B8a1ElGDYA8SyGVvVl2VT+YzGt7IPhZPB5j/CrW2Kcwm2j9OW0IWnE
rPuhY/5xqZoSUuGBGNXeA6bLy0gidnnZO7NpkMJgZcP6OnK612tMgw==
=qlBd
-END PGP SIGNATURE-



Re: R: Re: Duplicate messages

2014-12-12 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 12 Dec 2014, absolutely_f...@libero.it wrote:


with rsync


would you be more specific:

which command line, how did you shut users out etc.pp.




Messaggio originale
Da: skdove...@smail.inf.fh-brs.de
Data: 12/12/2014 9.44
A: absolutely_f...@libero.itabsolutely_f...@libero.it
Cc: dovecot@dovecot.org
Ogg: Re: Duplicate messages

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 12 Dec 2014, absolutely_f...@libero.it wrote:


Hi,
I just moved mail spool to a different network storage.
Now, several users are complaining about duplicate message that are fetched

by their clients (Outlook, Microsoft Outlook).

What is the reason?


How did you moved the message to the other network storage?


mail_location = maildir:/coraid-s2l2/domains


- --
Steffen Kaiser
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBVIqq2Xz1H7kL/d9rAQJqJgf/ZYLDY6IwdTcSUFXRdFlvyv37QW/R0fm0
Ki8izVuOHRNK2/YEubN2+TVouOD7X3COkYa8RCu8XSoWRiFKSl0PMHNsVqUIocA1
fEQOnY54nmdERsZ/+w8xLW5UZ2jKH12X3gqjMSFXUvMbvlhOCZFgvlckCx/DStC+
yjCM5yoOR711KXrhEzikr1lmxyR+kikh1N+MTLNkC3uQp0vFmWJR3HoXd3x+p+Dv
y0PkOZmna+B8a1ElGDYA8SyGVvVl2VT+YzGt7IPhZPB5j/CrW2Kcwm2j9OW0IWnE
rPuhY/5xqZoSUuGBGNXeA6bLy0gidnnZO7NpkMJgZcP6OnK612tMgw==
=qlBd
-END PGP SIGNATURE-





- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBVIrK9Xz1H7kL/d9rAQL6BQgAjKW48XJ21iPtZ+fTZgxEC00uA7cjvwZM
EYV9wThONbvP6zCLsbjKPOCiWX4f9NwHobgkkTIBtGogF0obNvUY2tiIRWRzwGO0
31M/53iJ7ORNy9IZg3u5r1NPcklXhsjuy4cWyj13jN2FhY2xHJGqJWujtM5dCAe0
Qq3KDH0yvJQSMJIMF2Eb4M59xD6hvXMR7qSH3ShI8DxUa0JSg7hlSTKM4Ak54dPb
GObJBiAqR9TUJ5lBFvoxmt2EyAnl4h0YURdwfuCyv+vYkP0GVat5p9hHRUPDc3cU
k4MrgdcVDJI5+VMzKOhcovEZ3o2k5ChGXIdzHjvp79VB1VyZsvViyQ==
=QeMJ
-END PGP SIGNATURE-


PATCH - add username_format to the PAM auth module

2014-12-12 Thread Bradley Kite
Hi there,

Other auth modules (eg passwd-file) allow a username_format to be
specified, but not the PAM module.

The use-case, is where I want a static userdb configuration which takes the
domain into account but still want to use PAM for authentication, eg:

userdb {
  driver = static
  args = uid=8 gid=12 home=/mnt/storage/mail/vhosts/%d/%n
}

passdb {
  driver = pam
  args = username_format=%n allow_pam_transform=no dovecot
}

The global auth_username_format setting ends up changing the username, so
looses the ability to have different mailboxes based on domain.

There is also a new setting, allow_pam_transform which stops the username
being changed after a successful authentication. Normally, if PAM changes
the username, then dovecot must update its record of the username for
further processing - but in this use case we must disable this function.

--
Brad.
--- dovecot-2.2.10/src/auth/passdb-pam.c.orig   2014-12-11 22:48:47.861478049 
+
+++ dovecot-2.2.10/src/auth/passdb-pam.c2014-12-12 11:25:23.304742138 
+
@@ -41,12 +41,13 @@
 struct pam_passdb_module {
struct passdb_module module;
 
-   const char *service_name, *pam_cache_key;
+   const char *service_name, *pam_cache_key, *username_format;
unsigned int requests_left;
 
unsigned int pam_setcred:1;
unsigned int pam_session:1;
unsigned int failure_show_msg:1;
+   unsigned int pam_allow_transform:1;
 };
 
 struct pam_conv_context {
@@ -67,6 +68,13 @@
char *string;
int i;
 
+   const struct var_expand_table *table;
+   string_t *username;
+
+   username = t_str_new(256);
+   table = auth_request_get_var_expand_table(ctx-request, 
auth_request_str_escape);
+   var_expand(username, passdb-username_format, table);
+
*resp_r = NULL;
 
resp = calloc(num_msg, sizeof(struct pam_response));
@@ -82,7 +90,7 @@
case PAM_PROMPT_ECHO_ON:
/* Assume we're asking for user. We might not ever
   get here because PAM already knows the user. */
-   string = strdup(ctx-request-user);
+   string = strdup(str_c(username));
if (string == NULL)
i_fatal_status(FATAL_OUTOFMEM, Out of memory);
break;
@@ -108,12 +116,14 @@
}
 
free(resp);
+   str_free(username);
return PAM_CONV_ERR;
}
 
resp[i].resp_retcode = PAM_SUCCESS;
resp[i].resp = string;
}
+   str_free(username);
 
*resp_r = resp;
return PAM_SUCCESS;
@@ -231,7 +241,10 @@
   pam_strerror(pamh, status));
return status;
}
-   auth_request_set_field(request, user, item, NULL);
+   if (module-pam_allow_transform)
+   {
+   auth_request_set_field(request, user, item, NULL);
+   }
return PAM_SUCCESS;
 }
 
@@ -257,6 +270,11 @@
struct pam_conv conv;
enum passdb_result result;
int status, status2;
+   const struct var_expand_table *table;
+   string_t *username;
+
+struct passdb_module *_module = request-passdb-passdb;
+struct pam_passdb_module *module = (struct pam_passdb_module *)_module;
 
conv.conv = pam_userpass_conv;
conv.appdata_ptr = ctx;
@@ -265,10 +283,15 @@
ctx.request = request;
ctx.pass = password;
 
-   status = pam_start(service, request-user, conv, pamh);
+   username = t_str_new(256);
+   table = auth_request_get_var_expand_table(request, 
auth_request_str_escape);
+   var_expand(username, module-username_format, table);
+
+   status = pam_start(service, str_c(username), conv, pamh);
if (status != PAM_SUCCESS) {
auth_request_log_error(request, pam, pam_start() failed: %s,
   pam_strerror(pamh, status));
+   str_free(username);
return PASSDB_RESULT_INTERNAL_FAILURE;
}
 
@@ -277,6 +300,7 @@
if ((status2 = pam_end(pamh, status)) != PAM_SUCCESS) {
auth_request_log_error(request, pam, pam_end() failed: %s,
   pam_strerror(pamh, status2));
+   str_free(username);
return PASSDB_RESULT_INTERNAL_FAILURE;
}
 
@@ -300,6 +324,7 @@
auth_request_set_field(request, reason,
   ctx.failure_msg, NULL);
}
+   str_free(username);
return result;
 }
 
@@ -319,6 +344,7 @@
}
 
expanded_service = t_str_new(64);
+
var_expand(expanded_service, module-service_name,
   auth_request_get_var_expand_table(request, NULL));
service = str_c(expanded_service);
@@ -338,6 +364,8 @@
 

R: Re: R: Re: Duplicate messages

2014-12-12 Thread absolutely_f...@libero.it
Hi,

I mounted both network storage on this server.
After that, I used:

# nice -n 19 rsync -av --progress /mnt/old/domains/* /var/spool/pop/domains/


Messaggio originale
Da: skdove...@smail.inf.fh-brs.de
Data: 12/12/2014 12.01
A: absolutely_f...@libero.itabsolutely_f...@libero.it
Cc: dovecot@dovecot.org
Ogg: Re: R: Re: Duplicate messages

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 12 Dec 2014, absolutely_f...@libero.it wrote:

 with rsync

would you be more specific:

which command line, how did you shut users out etc.pp.


 Messaggio originale
 Da: skdove...@smail.inf.fh-brs.de
 Data: 12/12/2014 9.44
 A: absolutely_f...@libero.itabsolutely_f...@libero.it
 Cc: dovecot@dovecot.org
 Ogg: Re: Duplicate messages

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On Fri, 12 Dec 2014, absolutely_f...@libero.it wrote:

 Hi,
 I just moved mail spool to a different network storage.
 Now, several users are complaining about duplicate message that are 
fetched
 by their clients (Outlook, Microsoft Outlook).
 What is the reason?

 How did you moved the message to the other network storage?

 mail_location = maildir:/coraid-s2l2/domains

 - --
 Steffen Kaiser
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (GNU/Linux)

 iQEVAwUBVIqq2Xz1H7kL/d9rAQJqJgf/ZYLDY6IwdTcSUFXRdFlvyv37QW/R0fm0
 Ki8izVuOHRNK2/YEubN2+TVouOD7X3COkYa8RCu8XSoWRiFKSl0PMHNsVqUIocA1
 fEQOnY54nmdERsZ/+w8xLW5UZ2jKH12X3gqjMSFXUvMbvlhOCZFgvlckCx/DStC+
 yjCM5yoOR711KXrhEzikr1lmxyR+kikh1N+MTLNkC3uQp0vFmWJR3HoXd3x+p+Dv
 y0PkOZmna+B8a1ElGDYA8SyGVvVl2VT+YzGt7IPhZPB5j/CrW2Kcwm2j9OW0IWnE
 rPuhY/5xqZoSUuGBGNXeA6bLy0gidnnZO7NpkMJgZcP6OnK612tMgw==
 =qlBd
 -END PGP SIGNATURE-



- -- 
Steffen Kaiser
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBVIrK9Xz1H7kL/d9rAQL6BQgAjKW48XJ21iPtZ+fTZgxEC00uA7cjvwZM
EYV9wThONbvP6zCLsbjKPOCiWX4f9NwHobgkkTIBtGogF0obNvUY2tiIRWRzwGO0
31M/53iJ7ORNy9IZg3u5r1NPcklXhsjuy4cWyj13jN2FhY2xHJGqJWujtM5dCAe0
Qq3KDH0yvJQSMJIMF2Eb4M59xD6hvXMR7qSH3ShI8DxUa0JSg7hlSTKM4Ak54dPb
GObJBiAqR9TUJ5lBFvoxmt2EyAnl4h0YURdwfuCyv+vYkP0GVat5p9hHRUPDc3cU
k4MrgdcVDJI5+VMzKOhcovEZ3o2k5ChGXIdzHjvp79VB1VyZsvViyQ==
=QeMJ
-END PGP SIGNATURE-



R: Re: R: Re: Duplicate messages

2014-12-12 Thread absolutely_f...@libero.it
Sorry, I haven't shut users.
I simply copied data between two folders



Messaggio originale
Da: absolutely_f...@libero.it
Data: 12/12/2014 13.14
A: dovecot@dovecot.org
Ogg: R: Re: R: Re: Duplicate messages

Hi,

I mounted both network storage on this server.
After that, I used:

# nice -n 19 rsync -av --progress /mnt/old/domains/* /var/spool/pop/domains/


Messaggio originale
Da: skdove...@smail.inf.fh-brs.de
Data: 12/12/2014 12.01
A: absolutely_f...@libero.itabsolutely_f...@libero.it
Cc: dovecot@dovecot.org
Ogg: Re: R: Re: Duplicate messages

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 12 Dec 2014, absolutely_f...@libero.it wrote:

 with rsync

would you be more specific:

which command line, how did you shut users out etc.pp.


 Messaggio originale
 Da: skdove...@smail.inf.fh-brs.de
 Data: 12/12/2014 9.44
 A: absolutely_f...@libero.itabsolutely_f...@libero.it
 Cc: dovecot@dovecot.org
 Ogg: Re: Duplicate messages

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On Fri, 12 Dec 2014, absolutely_f...@libero.it wrote:

 Hi,
 I just moved mail spool to a different network storage.
 Now, several users are complaining about duplicate message that are 
fetched
 by their clients (Outlook, Microsoft Outlook).
 What is the reason?

 How did you moved the message to the other network storage?

 mail_location = maildir:/coraid-s2l2/domains

 - --
 Steffen Kaiser
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (GNU/Linux)

 iQEVAwUBVIqq2Xz1H7kL/d9rAQJqJgf/ZYLDY6IwdTcSUFXRdFlvyv37QW/R0fm0
 Ki8izVuOHRNK2/YEubN2+TVouOD7X3COkYa8RCu8XSoWRiFKSl0PMHNsVqUIocA1
 fEQOnY54nmdERsZ/+w8xLW5UZ2jKH12X3gqjMSFXUvMbvlhOCZFgvlckCx/DStC+
 yjCM5yoOR711KXrhEzikr1lmxyR+kikh1N+MTLNkC3uQp0vFmWJR3HoXd3x+p+Dv
 y0PkOZmna+B8a1ElGDYA8SyGVvVl2VT+YzGt7IPhZPB5j/CrW2Kcwm2j9OW0IWnE
 rPuhY/5xqZoSUuGBGNXeA6bLy0gidnnZO7NpkMJgZcP6OnK612tMgw==
 =qlBd
 -END PGP SIGNATURE-



- -- 
Steffen Kaiser
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBVIrK9Xz1H7kL/d9rAQL6BQgAjKW48XJ21iPtZ+fTZgxEC00uA7cjvwZM
EYV9wThONbvP6zCLsbjKPOCiWX4f9NwHobgkkTIBtGogF0obNvUY2tiIRWRzwGO0
31M/53iJ7ORNy9IZg3u5r1NPcklXhsjuy4cWyj13jN2FhY2xHJGqJWujtM5dCAe0
Qq3KDH0yvJQSMJIMF2Eb4M59xD6hvXMR7qSH3ShI8DxUa0JSg7hlSTKM4Ak54dPb
GObJBiAqR9TUJ5lBFvoxmt2EyAnl4h0YURdwfuCyv+vYkP0GVat5p9hHRUPDc3cU
k4MrgdcVDJI5+VMzKOhcovEZ3o2k5ChGXIdzHjvp79VB1VyZsvViyQ==
=QeMJ
-END PGP SIGNATURE-




Dsync issues between Cyrus and Dovecot

2014-12-12 Thread Ovidiu Moldovan
Hello,

I have some issues related with dsync when trying to perform two way 
synchronization between Cyrus and Dovecot.

1st time synchronization always works and email, folders, flags can be synced 
between these but once for example in dovecot side the user creates a folder, 
dsync fails with the following errors:

Debug: brain M: Other brain should change mailbox INBOX/dove GUID 
c77e7711be9a6c77fc845ea745963ddb - df0d180f71e38a544f9e8aa015be
Debug: brain M: out state=master_send_mailbox changed=1
Debug: brain S: in state=recv_mailbox_tree_deletes
Error: Can't create mailbox INBOX/dove: Mailbox already exists

INBOX/dove folder was created in Dovecot side and does not exist in Cyrus side. 
I have tried full sync or backup but without any luck. 

If I delete the folder from Dovecot side the sync works fine again.

I can post more info on the configuration if needed.

Thank you,
Ova


Re: Dsync issues between Cyrus and Dovecot

2014-12-12 Thread Robert Schetterer
Am 12.12.2014 um 13:59 schrieb Ovidiu Moldovan:
 Hello,
 
 I have some issues related with dsync when trying to perform two way 
 synchronization between Cyrus and Dovecot.
 
 1st time synchronization always works and email, folders, flags can be synced 
 between these but once for example in dovecot side the user creates a folder, 
 dsync fails with the following errors:
 
 Debug: brain M: Other brain should change mailbox INBOX/dove GUID 
 c77e7711be9a6c77fc845ea745963ddb - df0d180f71e38a544f9e8aa015be
 Debug: brain M: out state=master_send_mailbox changed=1
 Debug: brain S: in state=recv_mailbox_tree_deletes
 Error: Can't create mailbox INBOX/dove: Mailbox already exists
 
 INBOX/dove folder was created in Dovecot side and does not exist in Cyrus 
 side. I have tried full sync or backup but without any luck. 
 
 If I delete the folder from Dovecot side the sync works fine again.
 
 I can post more info on the configuration if needed.
 
 Thank you,
 Ova
 

dsync between cyrus and dovecot is not guaranteed to work, if in trouble
use imapsync


Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


[Dovecot] Doveadm sometimes failed to iterate through some users after upgrade to 2.2

2014-12-12 Thread David Davidov
  Yes, after an upgrade works fine.

Hello,

Unfortunately this issue hits again. I installed the latest stable
version 2.2.15 and got the following error

# doveadm expunge -u ^o^@dave.s484.qa-team.net mailbox 'INBOX.Junk
Mail' SAVEDBEFORE 7d
doveadm(^o^@dave.s484.qa-team.net): Error: userdb
lookup(^o^@dave.s484.qa-team.net): Disconnected unexpectedly
doveadm(^o^@dave.s484.qa-team.net): Fatal: User lookup failed: Internal
error occurred. Refer to server log for more information.

# echo $?
75

Our production servers run 2.2.13, where the situation is the same.

regards,
David Davidov
System administrator @ icdsoft.com

-- 
David Davidov | System Administrator | ICDSoft Ltd. 


Re: [Dovecot] Doveadm sometimes failed to iterate through some users after upgrade to 2.2

2014-12-12 Thread Robert Schetterer
Am 12.12.2014 um 14:45 schrieb David Davidov:
  Yes, after an upgrade works fine.
 
 Hello,
 
 Unfortunately this issue hits again. I installed the latest stable
 version 2.2.15 and got the following error
 
 # doveadm expunge -u ^o^@dave.s484.qa-team.net mailbox 'INBOX.Junk
 Mail' SAVEDBEFORE 7d
 doveadm(^o^@dave.s484.qa-team.net): Error: userdb
 lookup(^o^@dave.s484.qa-team.net): Disconnected unexpectedly
 doveadm(^o^@dave.s484.qa-team.net): Fatal: User lookup failed: Internal
 error occurred. Refer to server log for more information.
 
 # echo $?
 75
 
 Our production servers run 2.2.13, where the situation is the same.
 
 regards,
 David Davidov
 System administrator @ icdsoft.com
 

see

Refer to server log for more information.

char like ^ may invoke trouble


Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


Re: stacking istreams and ostreams

2014-12-12 Thread Philipp Brüll
Well, I've found the bug. I've got confused with the stream-stacking
function pointers. The encryption istream was stacked on top of the
parent and the ostream below the parent. That caused this very confusing
bug.

Best,
Philipp

Am 11.12.2014 um 12:16 schrieb Philipp Brüll:
 Hello,
 
 I'm developing an encryption plugin for dovecot and ran into a problem
 with the stacking of i/o-streams.
 
 The encryption i/o-streams are working fine on any kind of mail the test
 suite is passing through them. But as soon as the zlib plugin is enabled
 the logs show an cache error:
 
 failed: Cached message size larger than expected (214  206, box=INBOX,
 UID=1)
 
 I've already double-checked the return values of ostream's sendv and
 istream's read function. They seem correct (and equal).
 
 If the order of the streams are changed (by changing the number in the
 lib-filename libxx_scrambler.so); meaning that the encryption is done
 before the compression (which isn't efficient) both streams are working
 correct without any errors.
 
 Is there some way the zlib plugin changes the cached message size? Is
 there some behaviour of the zlib plugin that I'm missing? Any help would
 be very welcome.
 
 Best regards,
 Philipp
 



signature.asc
Description: OpenPGP digital signature


Re: stacking istreams and ostreams

2014-12-12 Thread Philipp Brüll
Here is my ugly solution for this:

static int plugin_mail_save_begin(
  struct mail_save_context *context,
  struct istream *input
) {
  ...

  if (mbox-super.save_begin(context, input)  0)
return -1;

  output = scrambler_ostream_create(
context-data.output-real_stream-parent,
suser-public_key); 

  o_stream_unref(context-data.output-real_stream-parent);

  context-data.output-real_stream-parent = output;

  return 0;
}

The solution is ugly, because it's only working if there is another
ostream (in my case the zlib ostream). It would be better to add the
scrambler ostream to the other side of the ostream chain, instead of
messing with the ostream's parent.

I've tried to re-order the plugin itself - which brings the ostreams in
order - but than the istream order is messed up.

What would be the right solution here? Maybe someone with deeper
insights into dovecot's architecture can help.

Kind regards,
Philipp

Am 12.12.2014 um 15:25 schrieb Philipp Brüll:
 Well, I've found the bug. I've got confused with the stream-stacking
 function pointers. The encryption istream was stacked on top of the
 parent and the ostream below the parent. That caused this very confusing
 bug.
 
 Best,
 Philipp
 
 Am 11.12.2014 um 12:16 schrieb Philipp Brüll:
 Hello,

 I'm developing an encryption plugin for dovecot and ran into a problem
 with the stacking of i/o-streams.

 The encryption i/o-streams are working fine on any kind of mail the test
 suite is passing through them. But as soon as the zlib plugin is enabled
 the logs show an cache error:

 failed: Cached message size larger than expected (214  206, box=INBOX,
 UID=1)

 I've already double-checked the return values of ostream's sendv and
 istream's read function. They seem correct (and equal).

 If the order of the streams are changed (by changing the number in the
 lib-filename libxx_scrambler.so); meaning that the encryption is done
 before the compression (which isn't efficient) both streams are working
 correct without any errors.

 Is there some way the zlib plugin changes the cached message size? Is
 there some behaviour of the zlib plugin that I'm missing? Any help would
 be very welcome.

 Best regards,
 Philipp

 



signature.asc
Description: OpenPGP digital signature


Re: Migrate with Dsync

2014-12-12 Thread Randall Gellens

At 6:14 PM +0100 12/11/14, Dominik Breu wrote:


 i have a simple and maybe stupid question but,
 read the guide on http://wiki2.dovecot.org/Migration/Dsync now i wonder
 where to put this configuration ? May i oversee something but i would
 appreciate any hint toward solving my problem.


Hi Dominik,

I'm not sure, but my guess is that it goes into a new file in 
'/etc/dovecot/conf.d/', perhaps with a name such as '90-dsync.conf'. 
I believe that it is also possible to not write this into a file but 
instead pass each option on the command line using '-o'.


I am trying to figure this out because I want to migrate lots of mail 
from an old IMAP server to dovecot, and I'd like to preserve the 
mailbox GUIDs and the message UIDs.


--
Randall Gellens
Opinions are personal;facts are suspect;I speak for myself only
-- Randomly selected tag: ---
Arithmetic is being able to count up to twenty without taking
off your shoes.


Is the mdbox format backwards compatible?

2014-12-12 Thread Orion Poplawski
I'm contemplating using dsync with dovecot-2.2.10 (el7) and then transferring
the resulting mdbox files to a dovecot-2.0.9 (el6) server.  Is the mdbox
format backwards compatible between the two versions?

Thanks,

  Orion

-- 
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA, Boulder/CoRA Office FAX: 303-415-9702
3380 Mitchell Lane   or...@nwra.com
Boulder, CO 80301   http://www.nwra.com


Convert sdbox to mdbox

2014-12-12 Thread anon_user

Hello,

I have few hundreds mailboxes in my installation using the lastest 
version of dovecot. I have performances issues due to the storage don't 
support the high flow of I/O.


I'm wondering if they are any chance to convert without downtime my 
sdboxes mailboxes to mdbox.


Thanks in advance.