Re: [Dovecot] doveadm delete folders ? / unsubscribe ?

2024-02-19 Thread Aki Tuomi via dovecot


> On 19/02/2024 22:17 EET Ryan Ford  wrote:
> 
>  
> Hello,
> Would you be able to show what you did in order to make this command
> unsubscribe as well? The link provided with the answer, no longer works.
> 
> Thank you, Ryan
> 

doveadm mailbox unsubscribe -u  

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: [Dovecot] doveadm delete folders ? / unsubscribe ?

2024-02-19 Thread Ryan Ford

Hello,
Would you be able to show what you did in order to make this command
unsubscribe as well? The link provided with the answer, no longer works.

Thank you, Ryan

___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


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

2021-05-03 Thread Robert Dinse
I am having the same issue with 2.3.11.3



Re: Dovecot/doveadm quota

2020-02-12 Thread Martynas Bendorius
In webhosting customers usually see their physical disk usage used (quota on 
filesystem), and it causes a lot of confusion when numbers don't match with 
doveadm quota at all.

What's your opinion on these:
1) Should indexes (including FTS indexes stored in Maildir) be counted in the 
mail quota?
2) Shouldn't doveadm quota have a flag for real disk usage, so that if emails 
are compressed, their real size would be quoted?
3) Shouldn't dovecot rely on st_blocks instead of fstat's st_size? (a benefit 
for this: in this case converted maildir files without S=... would still be 
counted into the space used)

A short yes/no to 1, 2, 3 would be appreciated.

Thank you!

--
Best regards,
Martynas Bendorius


> On 2020-02-12, at 14:21, Aki Tuomi  wrote:
> 
> I think that most admins do not really care about physical disk usage as
> long as it's not exceeded, and most service providers prefer calculating
> quota against apparent usage instead of real usage, so they can charge
> you for that.
> 
> Aki
> 
> On 8.2.2020 18.16, Martynas Bendorius wrote:
>> Doesn't it currently confuse them? Because they'd reach their quota, while 
>> actually there would be a lot of disk space left :) + their whole mailbox 
>> could take a lot more space due to indexes and other files in the 
>> filesystem, and quota would not be reached.
>> 
>> Also, I've dovecot is using fstat's st_size parameter. This is not 
>> "correct", in that the actual space used on disk is always higher.
>> 
>> If we count the number of 512B blocks used (st_blocks), and multiply by 512 
>> to get the true disk usage.
>> 
>> I'll be looking forward for your feedback/ideas.
>> 
>> Thank you!
>> 
>> --
>> Best regards,
>> Martynas Bendorius
>> 
>> 
>>> On 2020-02-08, at 17:57, Max Kostikov  wrote:
>>> 
>>> I think these changes will confuse users because calculated quota wouldn't 
>>> be equals with total messages sizes.
>>> 
>>> Marsistynas Bendorius писал 2020-02-07 11:07:
 Is there any reason why dovecot relies on S= instead of real disk size
 email takes?
 1) compressed mails take less than than the S= specified
 2) we could avoid using "S=" for the lookups and count every file
 there, including indexes and mails without S=... if we'd read
 filesizes
>>> 
>>> -- 
>>> With best regards,
>>> Max Kostikov
>>> 
>>> W: https://kostikov.co | DeltaChat: m...@eprove.net



Re: Dovecot/doveadm quota

2020-02-12 Thread Aki Tuomi
I think that most admins do not really care about physical disk usage as
long as it's not exceeded, and most service providers prefer calculating
quota against apparent usage instead of real usage, so they can charge
you for that.

Aki

On 8.2.2020 18.16, Martynas Bendorius wrote:
> Doesn't it currently confuse them? Because they'd reach their quota, while 
> actually there would be a lot of disk space left :) + their whole mailbox 
> could take a lot more space due to indexes and other files in the filesystem, 
> and quota would not be reached.
>
> Also, I've dovecot is using fstat's st_size parameter. This is not "correct", 
> in that the actual space used on disk is always higher.
>
> If we count the number of 512B blocks used (st_blocks), and multiply by 512 
> to get the true disk usage.
>
> I'll be looking forward for your feedback/ideas.
>
> Thank you!
>
> --
> Best regards,
> Martynas Bendorius
>
>
>> On 2020-02-08, at 17:57, Max Kostikov  wrote:
>>
>> I think these changes will confuse users because calculated quota wouldn't 
>> be equals with total messages sizes.
>>
>> Marsistynas Bendorius писал 2020-02-07 11:07:
>>> Is there any reason why dovecot relies on S= instead of real disk size
>>> email takes?
>>> 1) compressed mails take less than than the S= specified
>>> 2) we could avoid using "S=" for the lookups and count every file
>>> there, including indexes and mails without S=... if we'd read
>>> filesizes
>>
>> -- 
>> With best regards,
>> Max Kostikov
>>
>> W: https://kostikov.co | DeltaChat: m...@eprove.net


Re: Dovecot/doveadm quota

2020-02-08 Thread Martynas Bendorius
Doesn't it currently confuse them? Because they'd reach their quota, while 
actually there would be a lot of disk space left :) + their whole mailbox could 
take a lot more space due to indexes and other files in the filesystem, and 
quota would not be reached.

Also, I've dovecot is using fstat's st_size parameter. This is not "correct", 
in that the actual space used on disk is always higher.

If we count the number of 512B blocks used (st_blocks), and multiply by 512 to 
get the true disk usage.

I'll be looking forward for your feedback/ideas.

Thank you!

--
Best regards,
Martynas Bendorius


> On 2020-02-08, at 17:57, Max Kostikov  wrote:
> 
> I think these changes will confuse users because calculated quota wouldn't be 
> equals with total messages sizes.
> 
> Marsistynas Bendorius писал 2020-02-07 11:07:
>> Is there any reason why dovecot relies on S= instead of real disk size
>> email takes?
>> 1) compressed mails take less than than the S= specified
>> 2) we could avoid using "S=" for the lookups and count every file
>> there, including indexes and mails without S=... if we'd read
>> filesizes
> 
> 
> -- 
> With best regards,
> Max Kostikov
> 
> W: https://kostikov.co | DeltaChat: m...@eprove.net



Re: Dovecot/doveadm quota

2020-02-08 Thread Max Kostikov
I think these changes will confuse users because calculated quota 
wouldn't be equals with total messages sizes.


Marsistynas Bendorius писал 2020-02-07 11:07:

Is there any reason why dovecot relies on S= instead of real disk size
email takes?

1) compressed mails take less than than the S= specified
2) we could avoid using "S=" for the lookups and count every file
there, including indexes and mails without S=... if we'd read
filesizes



--
With best regards,
Max Kostikov

W: https://kostikov.co | DeltaChat: m...@eprove.net


signature.asc
Description: OpenPGP digital signature


Dovecot/doveadm quota

2020-02-07 Thread Martynas Bendorius
Hello,

Is there any reason why dovecot relies on S= instead of real disk size email 
takes?

1) compressed mails take less than than the S= specified
2) we could avoid using "S=" for the lookups and count every file there, 
including indexes and mails without S=... if we'd read filesizes

Eample:
# ls -l '1567026317.M331058P4751.testing.server.com,S=3086,W=3148:2,S'
-rw--- 1 dev mail 1274 Aug 29 00:05 
1567026317.M331058P4751.testing.server.com,S=3086,W=3148:2,S

Proposed patch (solves #1, not sure about your opinion on #2):
--- src/plugins/quota/quota-maildir.c.orig  2020-02-05 19:21:08.582998417 
-0700
+++ src/plugins/quota/quota-maildir.c   2020-02-05 19:21:22.184998798 -0700
@@ -84,7 +84,7 @@
 
p = strstr(dp->d_name, ",S=");
num = (uoff_t)-1;
-   if (p != NULL) {
+   if (0 && p != NULL) {
/* ,S=[:,] */
p += 3;
for (num = 0; *p >= '0' && *p <= '9'; p++)
@@ -104,7 +104,7 @@
str_truncate(path, len);
str_append(path, dp->d_name);
if (stat(str_c(path), &st) == 0) {
-   *total_bytes += st.st_size;
+   *total_bytes += st.st_blocks * 512;
*total_count += 1;
} else if (errno != ENOENT && errno != ESTALE) {
*error_r = t_strdup_printf(

Thank you!

--
Best regards,
Martynas Bendorius




Migrating from external server to Dovecot (doveadm sync issues)

2019-04-12 Thread Sven Strickroth via dovecot
Hi,

I'm experiencing serious issues when using doveadm sync not working at
all or do not properly sync. I wanted to use this for migrating external
mailboxes to my server (in order to overcome the time when some
servers/clients still use the old server and some already the my server).

I tried to find a few steps in order to replicate this:
For testing purposes I simulate both the remote and local server on my
Dovecot instance. I created rem...@domain.tld and lo...@domain.tld both
use mdbox and are empty (i.e., the mail_location is still non-existent).

Then I send two mails to rem...@domail.tld (Subjects: Test1 and Test2).

Start backup remote IMAP account (rem...@domain.tld) to local account
(lo...@domain.tld):
* doveadm -o imapc_user="rem...@domain.tld" -o imapc_password="PW" -o
imapc_host="localhost" -o mail_prefetch_count=20 -o
imapc_features="rfc822.size fetch-headers" backup -R -u lo...@domain.tld
imapc:
(without this I often got errors such as "Error: Backend didn't update
mailbox Trash GUID" on sync runs, which seems to be an unrecoverable error).

Now the two mailboxes seem to be the same (can confirm this when logging
into the two mailboxes).

Now, run first sync:
* doveadm -o imapc_user="rem...@domain.tld" -o imapc_password="PW" -o
imapc_host="localhost" -o mail_prefetch_count=20 -o
imapc_features="rfc822.size fetch-headers" sync -R -u lo...@domain.tld
imapc:

Seems to work and does nothing at the moment.

Deliver one message to lo...@domain.tld (Subject Test3).

* doveadm -o imapc_user="rem...@domain.tld" -o imapc_password="PW" -o
imapc_host="localhost" -o mail_prefetch_count=20 -o
imapc_features="rfc822.size fetch-headers" sync -R -u lo...@domain.tld
imapc:
Now Test1,2,3 are in both mailboxes (further runs do change nothing).
Everything OK up the here.

Now deliver one messages to rem...@domain.tld (Test4) and delete one old
message (Test3). Deliver two messages to lo...@domain.tld (Subjects
Test5 and Test6) and delete one message (Test2).
In sum both mailboxes look like this:
rem...@domain.tld has Test1,2,4 and lo...@domain.tld has 1,3,5,6.

Now sync:
* doveadm -o imapc_user="rem...@domain.tld" -o imapc_password="PW" -o
imapc_host="localhost" -o mail_prefetch_count=20 -o
imapc_features="rfc822.size fetch-headers" sync -R -u lo...@domain.tld
imapc:
dsync(lo...@domain.tld): Warning: Mailbox changes caused a desync. You
may want to run dsync again: 3 UIDs changed due to UID conflicts

Rerun again and see that mails start duplicating and deletings are not
synced: rem...@domain.tld: Test1,2,4,3,5,6,5,6,6,5,3,4 (12 mails) and
lo...@domain.tld: 1,6,4,3,5,6,4,3,5,6,5 (11 mails)

When I re-run again I sometimes see the above error message again, mails
keep duplicating in both mailboxes and the mailboxes are not synced at all.

Am I using doveadm sync wrongly? Is there a way to use "sync" directly
w/o backup from the beginning (i.e., how to get rid of the error "Error:
Backend didn't update mailbox Trash GUID").

Context:
# 2.2.27 (c0f36b0): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.16 (fed8554)
# OS: Linux 4.9.0-8-amd64 x86_64 Debian 9.8
imap_client_workarounds = delay-newmail

I can't upgrade to latest Dovecot right now. :(

-- 
Best regards,
 Sven Strickroth
 PGP key id F5A9D4C4 @ any key-server


Re: Dovecot (doveadm, ssl, sync) - SSL error

2019-01-08 Thread Philipp Faeustlin

Zitat von Arkadiusz Majewski :


Hello!



dsync SSL still doesn't work for replication, so I've disabled it and tried
to sync without.

But I have a problem with temp directory.



Is it possible to change path to temp folder?

I don't want to set permissions but change temporary folder for replication.

Thanks in advance.





dovecot: doveadm: Error: safe_mkstemp(/tmp/dovecot.doveadm.) failed:
Permission denied





Arkadiusz Majewski



From: Arkadiusz Majewski 
Sent: Sunday, December 3, 2017 7:38 PM
To: 'dovecot@dovecot.org' 
Subject: Dovecot (doveadm, ssl, sync) - SSL error



Hello!

I've got a problem to run syncing between both dovecot services on the
separate servers.
The error indicates to the problem with SSL.

Directly using openssl command to connect from one server to other and vice
versa is passed without any errors.



OS: FreeBSD 11.1-RELEASE-p4

Dovecot: 2.2.33.2_2 and the older one dovecot-2.2.32.1_1 (or similar) -
build by ports.

OpenSSL: 1.0.2k-freebsd 26 Jan 2017



dovecot: doveadm(10.18.1.15): Error: doveadm client disconnected before
handshake: SSL_accept() failed: error:140760FC:SSL
routines:SSL23_GET_CLIENT_HELLO:unknown protocol


I had the same error, some days ago, while testing replication.

For me with dovecot 2.2.36 the solution was, to change the  
mail_replica address from


mail_replica = tcp:HOSTNAME:PORT

to

mail_replica = tcps:HOSTNAME:PORT

Best regards

Philipp




dovecot.conf (on both servers):



mail_plugins = $mail_plugins notify replication



service replicator {

  process_min_avail = 1

}



service aggregator {

  fifo_listener replication-notify-fifo {

user = dovecot

  }

  unix_listener replication-notify {

user = dovecot

  }

}



service replicator {

  unix_listener replicator-doveadm {

mode = 0600

  }

}



replication_max_conns = 10



service doveadm {

  inet_listener {

port = 12130

ssl = yes

  }

}



ssl = required
ssl_protocols = SSLv3 TLSv1 TLSv1.1 TLSv1.2
ssl_cert = 



RE: Dovecot (doveadm, ssl, sync) - SSL error

2018-03-03 Thread Arkadiusz Majewski
Hello!

 

dsync SSL still doesn't work for replication, so I've disabled it and tried
to sync without.

But I have a problem with temp directory.

 

Is it possible to change path to temp folder?

I don't want to set permissions but change temporary folder for replication.

Thanks in advance.

 

 

dovecot: doveadm: Error: safe_mkstemp(/tmp/dovecot.doveadm.) failed:
Permission denied

 

 

Arkadiusz Majewski

 

From: Arkadiusz Majewski  
Sent: Sunday, December 3, 2017 7:38 PM
To: 'dovecot@dovecot.org' 
Subject: Dovecot (doveadm, ssl, sync) - SSL error

 

Hello!

I've got a problem to run syncing between both dovecot services on the
separate servers.
The error indicates to the problem with SSL.

Directly using openssl command to connect from one server to other and vice
versa is passed without any errors.

 

OS: FreeBSD 11.1-RELEASE-p4

Dovecot: 2.2.33.2_2 and the older one dovecot-2.2.32.1_1 (or similar) -
build by ports.

OpenSSL: 1.0.2k-freebsd 26 Jan 2017

 

dovecot: doveadm(10.18.1.15): Error: doveadm client disconnected before
handshake: SSL_accept() failed: error:140760FC:SSL
routines:SSL23_GET_CLIENT_HELLO:unknown protocol

 

dovecot.conf (on both servers):

 

mail_plugins = $mail_plugins notify replication

 

service replicator {

  process_min_avail = 1

}

 

service aggregator {

  fifo_listener replication-notify-fifo {

user = dovecot

  }

  unix_listener replication-notify {

user = dovecot

  }

}

 

service replicator {

  unix_listener replicator-doveadm {

mode = 0600

  }

}

 

replication_max_conns = 10

 

service doveadm {

  inet_listener {

port = 12130

ssl = yes

  }

}

 

ssl = required
ssl_protocols = SSLv3 TLSv1 TLSv1.1 TLSv1.2
ssl_cert = 

Dovecot (doveadm, ssl, sync) - SSL error

2017-12-03 Thread Arkadiusz Majewski
Hello!

I've got a problem to run syncing between both dovecot services on the
separate servers.
The error indicates to the problem with SSL.

Directly using openssl command to connect from one server to other and vice
versa is passed without any errors.

 

OS: FreeBSD 11.1-RELEASE-p4

Dovecot: 2.2.33.2_2 and the older one dovecot-2.2.32.1_1 (or similar) -
build by ports.

OpenSSL: 1.0.2k-freebsd 26 Jan 2017

 

dovecot: doveadm(10.18.1.15): Error: doveadm client disconnected before
handshake: SSL_accept() failed: error:140760FC:SSL
routines:SSL23_GET_CLIENT_HELLO:unknown protocol

 

dovecot.conf (on both servers):

 

mail_plugins = $mail_plugins notify replication

 

service replicator {

  process_min_avail = 1

}

 

service aggregator {

  fifo_listener replication-notify-fifo {

user = dovecot

  }

  unix_listener replication-notify {

user = dovecot

  }

}

 

service replicator {

  unix_listener replicator-doveadm {

mode = 0600

  }

}

 

replication_max_conns = 10

 

service doveadm {

  inet_listener {

port = 12130

ssl = yes

  }

}

 

ssl = required
ssl_protocols = SSLv3 TLSv1 TLSv1.1 TLSv1.2
ssl_cert = 

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


[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 index - Bug or expected behaviour?

2014-06-13 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 5 Jun 2014, Bruno Galindro da Costa wrote:


My ldap config is using the variable %d in base search for domain
replacement when dovecot will search for users in LDAP. Its works fine 

for

dovecot operation.

But, for doveadm index, not. It ignores that variable and tries to 

pass a

base search without domain. So, the search will not working.

This is the command:
# doveadm -v index -A  INBOX


This is my config:
# cat /etc/dovecot/dovecot-ldap-userdb.conf
hosts = 10.0.0.1
tls = no
auth_bind = no
ldap_version = 3
base = ou=%d,ou=mail,ou=services,dc=domain
scope = subtree
deref = never
user_filter = (& (cn=%n)(objectclass=nisMailAlias)(ContaAtiva=TRUE) )
user_attrs =


cn=rfc822mailmember,EmailQuota=quota_rule=*:storage=%$M,EmailQuotaSpecial=quota_rule=*:storage=%$M,eduPersonPrincipalName=eppn


Do you use rfc822mailmember and eppn somewhere? They are no Dovecot
field names, IMHO. Same question applies to EmailQuota and
EmailQuotaSpecial as they both expand to quota_rule.


iterate_filter =
(&(objectclass=nisMailAlias)(ContaAtiva=TRUE)(!(EmailQuota=0)))
iterate_attrs = rfc822mailmember=user


Does rfc822mailmember contain the domain?

- -- 
Steffen Kaiser

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

iQEVAwUBU5r7KHz1H7kL/d9rAQJtdwf/Z9dG1F16zPtRLyKnBWZM/G2hnrwhP43+
bWoVzcsRxSaP1U/Wku+mOsgJT+4tH/KjOgZHxgKn+/O91zlRWwQJwOGn+t3Qq+lH
L3uiW0iZ93rvEbfTXYyxiSutJNCRMjVv9CU6ZfuR7wo0mqUhu6PNE4mJYplQ65ym
1nS1w2HTkCf+BixDJg1ZZ5vsW44T+da18dSu3bqzdWOEGybuJDknNk6W2hLjElQk
oyxi5KISWzIimB7UJom1577I3Xzt7II6wOf/Wq9Rqg4jNn6Fwmy4lFuDcSScv9H+
GGC3TvtqmVLbOgEYkRSKgnx2MBpoXln1IhRTmpH6dPO97E3WCq9YGQ==
=q2h+
-END PGP SIGNATURE-


Re: [Dovecot] doveadm index - Bug or expected behaviour?

2014-06-06 Thread Bruno Galindro da Costa
ok tks!


2014-06-06 3:16 GMT-03:00 Steffen Kaiser :

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> On Thu, 5 Jun 2014, Bruno Galindro da Costa wrote:
>
>  My ldap config is using the variable %d in base search for domain
>> replacement when dovecot will search for users in LDAP. Its works fine for
>> dovecot operation.
>>
>
> When an user logs into Dovecot, the login process can extract the domain
> part from the login username.
>
>
>  But, for doveadm index, not. It ignores that variable and tries to pass a
>> base search without domain. So, the search will not working.
>>
>> This is the command:
>> # doveadm -v index -A  INBOX
>>
>
> If you iterate all users (-A), doveadm would need to guess all domains and
> iterate through them. So, in your case you cannot use -A. However, -u
> should work. That is, you call the command for each single user that you've
> iterated from LDAP via script.
>
>  base = ou=%d,ou=mail,ou=services,dc=domain
>>
> [...]
>
>  iterate_filter =
>> (&(objectclass=nisMailAlias)(ContaAtiva=TRUE)(!(EmailQuota=0)))
>> iterate_attrs = rfc822mailmember=user
>>
>
> - -- Steffen Kaiser
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.11 (GNU/Linux)
>
> iQEVAwUBU5Fcynz1H7kL/d9rAQI7IggAitRJlAU4olmkTzUqXxrxxPAtF0FMcm0c
> PqWdByrNM0aLr1WTIShN7y83OnTwFhznuuTg6oVO6s72KZ6Izo9COOK70kLvoGzZ
> G4TyNu9S671hDVWsasuI+FvChGZURM+6E4G+ctsqTSjY8N8MV6hEdwrNhxBWbbfE
> nQ0BEMDDaM0Qeycyiy59nhlOkLiSkv40P2NnOekkSvogxb3rpxt9FQ6vIrBkCxJd
> K1xlwAWzg7Hr4LIUw3PJm0YjT7T4H+1AmiIm7iaAnT8My/9SSB9WCtmFQpzFNWOD
> tpKc3RcQJykJMpC4oKjgTi0Vh6PTl6g3xMdA9yJ2jmgpLVqpU2fNKw==
> =l3yY
> -END PGP SIGNATURE-
>



-- 
Att.
Bruno Galindro da Costa


Re: [Dovecot] doveadm index - Bug or expected behaviour?

2014-06-05 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 5 Jun 2014, Bruno Galindro da Costa wrote:


My ldap config is using the variable %d in base search for domain
replacement when dovecot will search for users in LDAP. Its works fine for
dovecot operation.


When an user logs into Dovecot, the login process can extract the domain 
part from the login username.



But, for doveadm index, not. It ignores that variable and tries to pass a
base search without domain. So, the search will not working.

This is the command:
# doveadm -v index -A  INBOX


If you iterate all users (-A), doveadm would need to guess all domains and 
iterate through them. So, in your case you cannot use -A. However, -u 
should work. That is, you call the command for each single user that 
you've iterated from LDAP via script.



base = ou=%d,ou=mail,ou=services,dc=domain

[...]

iterate_filter =
(&(objectclass=nisMailAlias)(ContaAtiva=TRUE)(!(EmailQuota=0)))
iterate_attrs = rfc822mailmember=user


- -- 
Steffen Kaiser

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

iQEVAwUBU5Fcynz1H7kL/d9rAQI7IggAitRJlAU4olmkTzUqXxrxxPAtF0FMcm0c
PqWdByrNM0aLr1WTIShN7y83OnTwFhznuuTg6oVO6s72KZ6Izo9COOK70kLvoGzZ
G4TyNu9S671hDVWsasuI+FvChGZURM+6E4G+ctsqTSjY8N8MV6hEdwrNhxBWbbfE
nQ0BEMDDaM0Qeycyiy59nhlOkLiSkv40P2NnOekkSvogxb3rpxt9FQ6vIrBkCxJd
K1xlwAWzg7Hr4LIUw3PJm0YjT7T4H+1AmiIm7iaAnT8My/9SSB9WCtmFQpzFNWOD
tpKc3RcQJykJMpC4oKjgTi0Vh6PTl6g3xMdA9yJ2jmgpLVqpU2fNKw==
=l3yY
-END PGP SIGNATURE-


[Dovecot] doveadm index - Bug or expected behaviour?

2014-06-05 Thread Bruno Galindro da Costa
My ldap config is using the variable %d in base search for domain
replacement when dovecot will search for users in LDAP. Its works fine for
dovecot operation.

But, for doveadm index, not. It ignores that variable and tries to pass a
base search without domain. So, the search will not working.

This is the command:
# doveadm -v index -A  INBOX


This is my config:
# cat /etc/dovecot/dovecot-ldap-userdb.conf
hosts = 10.0.0.1
tls = no
auth_bind = no
ldap_version = 3
base = ou=%d,ou=mail,ou=services,dc=domain
scope = subtree
deref = never
user_filter = (& (cn=%n)(objectclass=nisMailAlias)(ContaAtiva=TRUE) )
user_attrs =
cn=rfc822mailmember,EmailQuota=quota_rule=*:storage=%$M,EmailQuotaSpecial=quota_rule=*:storage=%$M,eduPersonPrincipalName=eppn
iterate_filter =
(&(objectclass=nisMailAlias)(ContaAtiva=TRUE)(!(EmailQuota=0)))
iterate_attrs = rfc822mailmember=user


This is the error reported by doveadm index:
doveadm(root): Error: User listing returned failure
doveadm: Error: Failed to iterate through some users


If you put a tcpdump to monitor the search, you i'll see 3 packets. The
first is the LDAP searchRequest message, with this content:
LDAPMessage searchRequest(3) "*ou=,*ou=mail,ou=services,dc=domain"
wholeSubtree


If I change the base parameter of config file to this, it works perfectly:
base = ou=net.domain,ou=mail,ou=services,dc=domain

tcpdump:
LDAPMessage searchRequest(3)
"*ou=**net.domain**,*ou=mail,ou=services,dc=domain"
wholeSubtree


# dovecot -n

# 2.2.13 (5c877bca95e5): /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-63-virtual x86_64 Ubuntu 12.04.4 LTS zfs
auth_cache_negative_ttl = 1 mins
auth_cache_size = 1 k
auth_cache_ttl = 10 mins
auth_username_chars =
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@~
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_gid = mail
mail_home = /var/mail/mailboxes/%d/%n/home
mail_location =
maildir:/var/mail/mailboxes/%d/%n:INDEX=/var/mail.indexes/%d/%n
mail_privileged_group = mail
mail_uid = vmail
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 ihave
namespace inbox {
  inbox = yes
  location =
  prefix =
  type = private
}
namespace spam {
  list = yes
  location = maildir:/var/mail.spam/%d/%n
  mailbox Filtrados {
auto = subscribe
  }
  prefix = SPAM.
  subscriptions = yes
  type = private
}
passdb {
  args = /etc/dovecot/passdb.v3.1.sh
  driver = checkpassword
}
plugin {
  mail_log_events = delete undelete expunge copy mailbox_delete
mailbox_rename flag_change save mailbox_create
  mail_log_fields = uid box msgid from subject size vsize
  quota = maildir:DefaultQuota
  quota_exceeded_message = O destinatario desta mensagem esta com a caixa
postal cheia. A sua mensagem so pode ser entregue se o destinatario apagar
algumas das mensagens.
  quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95 %u
  quota_warning2 = storage=90%% /usr/local/bin/quota-warning.sh 90 %u
  sieve = /var/mail/sieve_scripts/%d/%n/.dovecot.sieve
  sieve_after = /etc/dovecot/sieve/default.sieve
  sieve_dir = /var/mail/sieve_scripts/%d/%n/sieve
  sieve_global_dir = /etc/dovecot/sieve
  sieve_global_path = /etc/dovecot/sieve/default.sieve
  trash = /etc/dovecot/dovecot-trash.conf
}
protocols = imap sieve pop3
service anvil {
  client_limit = 1603
}
service auth {
  client_limit = 1600
  unix_listener auth-client {
mode = 0660
  }
  unix_listener auth-master {
group = mail
mode = 0600
user = vmail
  }
  user = root
  vsz_limit = 256 M
}
service imap-login {
  client_limit = 1500
  inet_listener imap {
address = *,[::]
port = 143
  }
  inet_listener imaps {
address = *,[::]
port = 993
  }
  process_limit = 500
  service_count = 0
  user = dovecot
  vsz_limit = 256 M
}
service imap {
  process_limit = 2048
  vsz_limit = 450 M
}
service managesieve-login {
  client_limit = 1500
  executable = /usr/lib/dovecot/managesieve-login
  process_limit = 500
  service_count = 0
  user = dovecot
  vsz_limit = 256 M
}
service managesieve {
  executable = /usr/lib/dovecot/managesieve
  process_limit = 2048
  vsz_limit = 450 M
}
service pop3-login {
  client_limit = 1500
  inet_listener pop3s {
address = *,[::]
port = 2221
  }
  process_limit = 500
  service_count = 0
  user = dovecot
  vsz_limit = 256 M
}
service pop3 {
  process_limit = 2048
  vsz_limit = 450 M
}
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-ldap-userdb.conf
  driver = ldap
}
protocol imap {
  mail_fsync = never
  mail_max_userip_connections = 2048
  mail_plugins = quota imap_quota trash zlib mail_log notify
  ssl_ca = 

[Dovecot] "doveadm fetch" fetches mails twice?

2014-06-01 Thread Peer Heinlein
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



As far as I understood

fetch -u p.heinl...@jpberlin.de hdr mailbox-guid [...]93d5 uid 58175

should fetch exactly the header of the specified mail. But on my
Dovecot 2.2.12 it fetches the header *twice* (same with body, same
with text).


hdr:
Return-Path: 
Delivered-To: 
[...]



hdr:
Return-Path: 
Delivered-To: 
[...]


Peer




- -- 
Heinlein Support GmbH
Schwedter Str. 8/9b, 10119 Berlin

http://www.heinlein-support.de

Tel: 030 / 405051-42
Fax: 030 / 405051-19

Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht
Berlin-Charlottenburg,
Geschäftsführer: Peer Heinlein -- Sitz: Berlin
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTi4ttAAoJEAOLLpq5E82HL/MIAIx1WBDdzP/u5fI/VuyfSzYO
gj8M5WL8MkamOpziOfADBdRR1qZwsuS8EjFmdNSrdqrLFM1tle/0Umaa3buJBeyF
OuTIodbkv5prgoF/YDxsOKXMSCDx8JP3o5twNbTQfdMT+rYww80GGqDbAFv5VMzJ
vNAOQZ3Le1S45da1wL526UcPSHNBXwMMbpCS3LY60iKRbHaURXJuotbXb4DemD0J
En2ZjQzmstIBbyFL7X3JfiyiEe3Dmdq5u0XJC5j2Xo3U9mfHB2FBmbEE9KdKPXgu
wL2cihep5lDExS2N89ne9Zp6n/Ff104Gki1gwQu0mSBPS8OGFSIJ5iGDBdWIEGk=
=4smt
-END PGP SIGNATURE-


[Dovecot] doveadm fts optimize CRASH

2014-05-30 Thread Larry Rosenman
thebighonker.lerctr.org /home/ler $ gdb -c doveadm.core `which doveadm`

GNU gdb 6.1.1 [FreeBSD]

Copyright 2004 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain
conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB.  Type "show warranty" for details.

This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols
found)...

Core was generated by `doveadm'.

Program terminated with signal 6, Aborted.

Reading symbols from /lib/libz.so.6...(no debugging symbols found)...done.

Loaded symbols for /lib/libz.so.6

Reading symbols from /lib/libcrypt.so.5...(no debugging symbols
found)...done.

Loaded symbols for /lib/libcrypt.so.5

Reading symbols from /usr/local/lib/dovecot/libdovecot-storage.so.0...(no
debugging symbols found)...done.

Loaded symbols for /usr/local/lib/dovecot/libdovecot-storage.so.0

Reading symbols from /usr/local/lib/dovecot/libdovecot.so.0...(no debugging
symbols found)...done.

Loaded symbols for /usr/local/lib/dovecot/libdovecot.so.0

Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.

Loaded symbols for /lib/libc.so.7

Reading symbols from /usr/local/lib/dovecot/lib20_fts_plugin.so...(no
debugging symbols found)...done.

Loaded symbols for /usr/local/lib/dovecot/lib20_fts_plugin.so

Reading symbols from
/usr/local/lib/dovecot/lib21_fts_lucene_plugin.so...(no debugging symbols
found)...done.

Loaded symbols for /usr/local/lib/dovecot/lib21_fts_lucene_plugin.so

Reading symbols from /usr/local/lib/libclucene-core.so.1...(no debugging
symbols found)...done.

Loaded symbols for /usr/local/lib/libclucene-core.so.1

Reading symbols from /usr/local/lib/libclucene-shared.so.1...(no debugging
symbols found)...done.

Loaded symbols for /usr/local/lib/libclucene-shared.so.1

Reading symbols from /usr/lib/libc++.so.1...(no debugging symbols
found)...done.

Loaded symbols for /usr/lib/libc++.so.1

Reading symbols from /lib/libcxxrt.so.1...(no debugging symbols
found)...done.

Loaded symbols for /lib/libcxxrt.so.1

Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.

Loaded symbols for /lib/libm.so.5

Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols
found)...done.

Loaded symbols for /lib/libgcc_s.so.1

Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done.

Loaded symbols for /lib/libthr.so.3

Reading symbols from /usr/local/lib/dovecot/lib90_stats_plugin.so...(no
debugging symbols found)...done.

Loaded symbols for /usr/local/lib/dovecot/lib90_stats_plugin.so

Reading symbols from
/usr/local/lib/dovecot/doveadm/lib10_doveadm_sieve_plugin.so...(no
debugging symbols found)...done.

Loaded symbols for
/usr/local/lib/dovecot/doveadm/lib10_doveadm_sieve_plugin.so

Reading symbols from
/usr/local/lib/dovecot-2.2-pigeonhole/libdovecot-sieve.so.0...(no debugging
symbols found)...done.

Loaded symbols for
/usr/local/lib/dovecot-2.2-pigeonhole/libdovecot-sieve.so.0

Reading symbols from /usr/local/lib/dovecot/libdovecot-lda.so.0...(no
debugging symbols found)...done.

Loaded symbols for /usr/local/lib/dovecot/libdovecot-lda.so.0

Reading symbols from
/usr/local/lib/dovecot/doveadm/lib20_doveadm_fts_lucene_plugin.so...(no
debugging symbols found)...done.

Loaded symbols for
/usr/local/lib/dovecot/doveadm/lib20_doveadm_fts_lucene_plugin.so

Reading symbols from
/usr/local/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.so...(no debugging
symbols found)...done.

Loaded symbols for
/usr/local/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.so

Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols
found)...done.

Loaded symbols for /libexec/ld-elf.so.1

#0  0x0008013cc0da in kill () from /lib/libc.so.7

[New Thread 801c2b800 (LWP 101632/doveadm)]

(gdb) bt

#0  0x0008013cc0da in kill () from /lib/libc.so.7

#1  0x0008013ca809 in abort () from /lib/libc.so.7

#2  0x000802cf7b39 in __cxa_pure_virtual () from /lib/libcxxrt.so.1

#3  0x0008025159dc in
lucene::store::BufferedIndexOutput::~BufferedIndexOutput () from
/usr/local/lib/libclucene-core.so.1

#4  0x00080251717a in
lucene::store::FSDirectory::FSIndexOutput::FSIndexOutput () from
/usr/local/lib/libclucene-core.so.1

#5  0x000802518983 in lucene::store::FSDirectory::createOutput ()

   from /usr/local/lib/libclucene-core.so.1

#6  0x000802544c9d in lucene::index::CompoundFileWriter::close ()

   from /usr/local/lib/libclucene-core.so.1

#7  0x000802558b32 in lucene::index::SegmentMerger::createCompoundFile
()

   from /usr/local/lib/libclucene-core.so.1

#8  0x000802566b2d in lucene::index::IndexWriter::mergeMiddle ()

   from /usr/local/lib/libclucene-core.so.1

#9  0x0008025620f8 in lucene::index::IndexWriter::merge ()

   from /usr/local/lib/libclucene-core.so.1

#10 0x000802527738 in lucene::index::SerialMer

[Dovecot] doveadm fts: mbox/lucene-indexes, and other errors

2014-05-27 Thread Larry Rosenman
I turned on fts_autoindex today, and wanted to rescan all my mailboxes

Ran doveadm -Dv fts rescan, and garnered:

thebighonker.lerctr.org /home/ler/mail $ doveadm -Dv fts rescan
doveadm(ler): Debug: Loading modules from directory:
/usr/local/lib/dovecot

doveadm(ler): Debug: Module loaded:
/usr/local/lib/dovecot/lib20_fts_plugin.so

doveadm(ler): Debug: Module loaded:
/usr/local/lib/dovecot/lib21_fts_lucene_plugin.so

doveadm(ler): Debug: Module loaded:
/usr/local/lib/dovecot/lib90_stats_plugin.so

doveadm(ler): Debug: Loading modules from directory:
/usr/local/lib/dovecot/doveadm

doveadm(ler): Debug: Skipping module doveadm_acl_plugin, because dlopen()
failed: /usr/local/lib/dovecot/doveadm/lib10_doveadm_acl_plugin.so:
Undefined symbol "acl_user_module" (this is usually intentional, so just
ignore this message)

doveadm(ler): Debug: Skipping module doveadm_expire_plugin, because
dlopen() failed:
/usr/local/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so: Undefined
symbol "expire_set_lookup" (this is usually intentional, so just ignore
this message)

doveadm(ler): Debug: Skipping module doveadm_quota_plugin, because dlopen()
failed: /usr/local/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so:
Undefined symbol "quota_user_module" (this is usually intentional, so just
ignore this message)

doveadm(ler): Debug: Module loaded:
/usr/local/lib/dovecot/doveadm/lib10_doveadm_sieve_plugin.so

doveadm(ler): Debug: Module loaded:
/usr/local/lib/dovecot/doveadm/lib20_doveadm_fts_lucene_plugin.so

doveadm(ler): Debug: Module loaded:
/usr/local/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.so

doveadm(ler): Debug: Effective uid=1002, gid=1002, home=/home/ler

doveadm(ler): Debug: Namespace inbox: type=private, prefix=, sep=,
inbox=yes, hidden=no, list=yes, subscriptions=yes
location=mbox:~/mail:INBOX=~/mail/INBOX

doveadm(ler): Debug: fs: root=/home/ler/mail, index=, indexpvt=, control=,
inbox=/home/ler/mail/INBOX, alt=

doveadm(ler): Debug: Namespace archive: type=private, prefix=#ARCHIVE/,
sep=/, inbox=no, hidden=no, list=no, subscriptions=yes
location=mbox:~/MAILARCHIVE

doveadm(ler): Debug: mbox: INBOX defaulted to /home/ler/MAILARCHIVE/inbox

doveadm(ler): Debug: fs: root=/home/ler/MAILARCHIVE, index=, indexpvt=,
control=, inbox=/home/ler/MAILARCHIVE/inbox, alt=

doveadm(ler): Error: Couldn't get mailbox
lucene-indexes/dovecot-expunges.log GUID: Mailbox isn't a valid mbox file

doveadm(ler): Error: Couldn't get mailbox lucene-indexes/_a1.cfs GUID:
Mailbox isn't a valid mbox file

doveadm(ler): Error: Couldn't get mailbox lucene-indexes/_9t.cfs GUID:
Mailbox isn't a valid mbox file

doveadm(ler): Error: Couldn't get mailbox lucene-indexes/_9z.cfs GUID:
Mailbox isn't a valid mbox file

doveadm(ler): Error: Couldn't get mailbox lucene-indexes/_9t_1.del GUID:
Mailbox isn't a valid mbox file

doveadm(ler): Error: Couldn't get mailbox lucene-indexes/segments.gen GUID:
Mailbox isn't a valid mbox file

doveadm(ler): Error: Couldn't get mailbox lucene-indexes/_9u.cfs GUID:
Mailbox isn't a valid mbox file

doveadm(ler): Error: Couldn't get mailbox lucene-indexes/_a0.cfs GUID:
Mailbox isn't a valid mbox file

doveadm(ler): Error: Couldn't get mailbox lucene-indexes/_9x.cfs GUID:
Mailbox isn't a valid mbox file

doveadm(ler): Error: Couldn't get mailbox lucene-indexes/_9v.cfs GUID:
Mailbox isn't a valid mbox file

doveadm(ler): Error: Couldn't get mailbox lucene-indexes/segments_ke GUID:
Mailbox isn't a valid mbox file

doveadm(ler): Error: Couldn't get mailbox lucene-indexes/_9w.cfs GUID:
Mailbox isn't a valid mbox file

doveadm(ler): Error: Couldn't get mailbox lucene-indexes/_9y.cfs GUID:
Mailbox isn't a valid mbox file

doveadm(ler): Error: Couldn't get mailbox lucene-indexes/_5w.cfs GUID:
Mailbox isn't a valid mbox file

doveadm(ler): Error: Couldn't get mailbox lucene-indexes/_5w_1.del GUID:
Mailbox isn't a valid mbox file

doveadm(ler): Error: lucene: Couldn't open mailbox (error in mailbox with
GUID=21ba3234186a11537658bbe98eac): Internal error occurred. Refer to
server log for more information. [2014-05-27 14:59:45]

doveadm(ler): Error: lucene: Couldn't open mailbox (error in mailbox with
GUID=77614b1bb0383a530fb3bbe98eac): Internal error occurred. Refer to
server log for more information. [2014-05-27 14:59:45]

doveadm(ler): Error: lucene: Couldn't open mailbox (error in mailbox with
GUID=c77d8c12ac6b11534859bbe98eac): Internal error occurred. Refer to
server log for more information. [2014-05-27 14:59:45]

doveadm(ler): Error: lucene: Couldn't open mailbox (error in mailbox with
GUID=d07d8c12ac6b11534859bbe98eac): Internal error occurred. Refer to
server log for more information. [2014-05-27 14:59:45]

doveadm(ler): Error: fts rescan failed

thebighonker.lerctr.org /home/ler/mail $


1) w

Re: [Dovecot] "doveadm penalty -a" doesn't work?

2014-05-11 Thread Timo Sirainen
On 10.5.2014, at 13.23, Peer Heinlein  wrote:

> We're running multiple instances on the same server.
> 
> While doveadm penalty works:
> 
> root@host:/etc/dovecot# doveadm penalty
> IP   penalty last_penaltylast_update
> 93.180.xxx.xxx 4 2014-05-10 12:21:08 12:21:08
> 80.153.xxx.xxx 0 2014-05-10 12:21:12 12:21:12
> 
> a seperate anvil-Socket doesn't work at all:
> 
> 
> root@host:/etc/dovecot# doveadm penalty -a /var/run/dovecot-example/anvil
> doveadm penalty [-a ] []
> 
> It just shows up the help message.

Fixed: http://hg.dovecot.org/dovecot-2.2/rev/2ea729128dbe


[Dovecot] "doveadm penalty -a" doesn't work?

2014-05-10 Thread Peer Heinlein
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


We're running multiple instances on the same server.

While doveadm penalty works:

root@host:/etc/dovecot# doveadm penalty
IP   penalty last_penaltylast_update
93.180.xxx.xxx 4 2014-05-10 12:21:08 12:21:08
80.153.xxx.xxx 0 2014-05-10 12:21:12 12:21:12

a seperate anvil-Socket doesn't work at all:


root@host:/etc/dovecot# doveadm penalty -a /var/run/dovecot-example/anvil
doveadm penalty [-a ] []

It just shows up the help message.

(Dovecot 2.2.12)

Peer



- -- 
Heinlein Support GmbH
Schwedter Str. 8/9b, 10119 Berlin

http://www.heinlein-support.de

Tel: 030 / 405051-42
Fax: 030 / 405051-19

Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht
Berlin-Charlottenburg,
Geschäftsführer: Peer Heinlein -- Sitz: Berlin
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTbf41AAoJEAOLLpq5E82H/h4H/2VpFfrqG+dcW73dS8CAWXVM
thWcj5/GKUDaE/MYKsATDmNenlPuKIHsC8+hM7pyB3kfA0d7EDP/aNcaOWdw16XE
fq7PSoLWiPJcsTG6ArzyuJMYiCwb2TuFIimFjjlZWVqnB+iAVv0y7ESJ9De/dmzM
eE3ct/JmuY+0MrRAKSNdDX/Dbaakh03/JQ3/GvAwYeTFgviCfa3D5hsYCfhDZbPC
2vE3A9D46SqhmrediuWdtnj6rAhYwfjS+77jXaK6NyYru0WtYf9ozgtt5pbb89Hd
EKzdNyKdKsZEnQ1ubv7cj5671OwL1ikp/d8tJr3/l4tgRHWf2+BmuGJIoo8AFwE=
=2gZD
-END PGP SIGNATURE-


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

2014-05-09 Thread Alessio Cecchi

Il 09/05/2014 11:50, Timo Sirainen ha scritto:

On 9.5.2014, at 10.21, Alessio Cecchi  wrote:


I'm running every week in cron "doveadm expunge -A mailbox Spam before 30d" and monthly 
"doveadm quota recalc -A".

After the upgrade to dovecot 2.2.12 (from 2.1.17), "doveadm -A" sometimes exit 
with this error:

doveadm(u...@domain.com): Error: User listing returned failure
doveadm: Error: Failed to iterate through some users
# echo $?
75


This should be fixed in v2.2.13.



Yes, after an upgrade works fine.

--
Alessio Cecchi is:
@ ILS -> http://www.linux.it/~alessice/
on LinkedIn -> http://www.linkedin.com/in/alessice
Assistenza Sistemi GNU/Linux -> http://www.cecchi.biz
Cloud Email Hosting -> http://www.qboxmail.com
@ PLUG -> ex-Presidente, adesso senatore a vita, http://www.prato.linux.it


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

2014-05-09 Thread Timo Sirainen
On 9.5.2014, at 10.21, Alessio Cecchi  wrote:

> I'm running every week in cron "doveadm expunge -A mailbox Spam before 30d" 
> and monthly "doveadm quota recalc -A".
> 
> After the upgrade to dovecot 2.2.12 (from 2.1.17), "doveadm -A" sometimes 
> exit with this error:
> 
> doveadm(u...@domain.com): Error: User listing returned failure
> doveadm: Error: Failed to iterate through some users
> # echo $?
> 75

This should be fixed in v2.2.13.


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

2014-05-09 Thread Alessio Cecchi

Hi,

I'm running every week in cron "doveadm expunge -A mailbox Spam before 
30d" and monthly "doveadm quota recalc -A".


After the upgrade to dovecot 2.2.12 (from 2.1.17), "doveadm -A" 
sometimes exit with this error:


doveadm(u...@domain.com): Error: User listing returned failure
doveadm: Error: Failed to iterate through some users
# echo $?
75

If I re-run the same command the user where doveadm stops changeing 
(always in alphabetical order):


info@
mario@
pippo@
zazza@

and finally, after 3 or 4 run, ends with success.

I have enable debug (via doveadm -D and auth/mail debub in 
10-logging.con) but there are no errors or difference in the log when 
doveadm exit with the error (error code is 75).


If I run

# doveadm expunge -A mailbox Spam savedbefore 30d

doveadm works fine

Can somebody help me?

Here is my configuration:

# dovecot -n
# 2.2.12: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.9
auth_debug = yes
auth_master_user_separator = *
auth_verbose = yes
deliver_log_format = msgid=%m, from=%f, subject="%s": %$
dict {
  expire = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
disable_plaintext_auth = no
dotlock_use_excl = no
first_valid_gid = 89
first_valid_uid = 89
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep tb-lsub-flags
imap_idle_notify_interval = 29 mins
imap_logout_format = in=%i out=%o session=<%{session}>
last_valid_gid = 89
last_valid_uid = 89
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
listen = *
mail_debug = yes
mail_fsync = always
mail_location = maildir:~/Maildir
mail_nfs_index = yes
mail_nfs_storage = yes
mail_plugins = quota expire
maildir_very_dirty_syncs = yes
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope 
encoded-character subaddress comparator-i;ascii-numeric relational regex 
imap4flags copy include variables body enotify environment mailbox date 
ihave vnd.dovecot.duplicate

mmap_disable = yes
namespace {
  list = children
  location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
  prefix = shared/%%n/
  separator = /
  subscriptions = no
  type = shared
}
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Spam {
auto = subscribe
special_use = \Junk
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  prefix =
  separator = /
}
passdb {
  args = username_format=%Ld /etc/dovecot/extra/alias-domains-denylogin.txt
  deny = yes
  driver = passwd-file
}
passdb {
  args = /etc/dovecot/extra/master-users
  driver = passwd-file
  master = yes
  pass = yes
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  expire = Trash
  expire2 = Spam
  expire_dict = proxy::expire
  quota = maildir:UserQuota
  quota2 = dict:Quota Usage::noenforcing:proxy::sqlquota
  quota_grace = 10M
  quota_rule2 = Trash:storage=+100M
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
  sieve = ~/.dovecot.sieve
  sieve_before = /etc/dovecot/sieve/before.sieve
  sieve_dir = ~/sieve
  sieve_extensions = +vnd.dovecot.duplicate -vacation
}
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s, 
bytes=%i/%o, session=<%{session}>

protocols = imap pop3 sieve
service auth-worker {
  process_limit = 1000
}
service auth {
  client_limit = 5500
  unix_listener auth-userdb {
group = vchkpw
mode = 0660
user = vpopmail
  }
}
service dict {
  process_limit = 300
  unix_listener dict {
group = vchkpw
mode = 0660
user = vpopmail
  }
}
service imap-login {
  process_min_avail = 4
  service_count = 0
}
service imap {
  process_limit = 4000
  service_count = 100
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
}
service pop3-login {
  service_count = 0
}
service pop3 {
  process_limit = 1023
  service_count = 100
}
service quota-warning {
  executable = script /etc/dovecot/scripts/quota-warning.sh
  unix_listener quota-warning {
user = vpopmail
  }
  user = vpopmail
}
ssl_cert =  http://www.linux.it/~alessice/
on LinkedIn -> http://www.linkedin.com/in/alessice
Assistenza Sistemi GNU/Linux -> http://www.cecchi.biz
Cloud Email Hosting -> http://www.qboxmail.com
@ PLUG -> ex-Presidente, adesso senatore a vita, http://www.prato.linux.it


Re: [Dovecot] doveadm auth and the "nologin" extra field

2014-05-05 Thread Axel Luttgens

Le 5 mai 2014 à 15:25, Timo Sirainen a écrit :

> Not intentional, and since it can cause confusion I removed it: 
> http://hg.dovecot.org/dovecot-2.2/rev/3a5304b63f88

Hmmm... this was a too easy one. ;-)

Once again, many thanks Timo,
Axel


Re: [Dovecot] doveadm auth and the "nologin" extra field

2014-05-05 Thread Timo Sirainen
Not intentional, and since it can cause confusion I removed it: 
http://hg.dovecot.org/dovecot-2.2/rev/3a5304b63f88

On 18.4.2014, at 10.54, Axel Luttgens  wrote:

> Hello,
> 
> Still busy with details...
> 
> Considering, as in my previous example, a password_query returning '!' or 
> NULL for the "nologin" column, depending on an account's status (suspended or 
> not).
> 
> Let's consider a suspended user "some.user".
> 
> In the case of a successful authentication, one has:
> 
>   sh-3.2# doveadm auth test some.user goodpassword; echo $?
>   passdb: some.user auth succeeded
>   extra fields:
> user=some.user
> nologin
>   0
> 
> On the other hand, in the case of an authentication failure:
> 
>   sh-3.2# doveadm auth test some.user badpassword; echo $?
>   passdb: some.user auth failed
>   extra fields:
> user=some.user
> nologin=!
>   77
> 
> So, this is similar to what happens in a connection (pop3, imap...): when 
> present, the nologin info is always taken into account, even in the case of 
> an authentication failure.
> 
> Again, this may raise some concerns about the consistency of such a behavior.
> Is this guaranteed to always behave that way, because of some rationale I'm 
> currently missing, or does it go about some overlooked combination, liable to 
> be inadvertently "corrected" in the future?
> I haven't been able to find a definitive answer in the wiki or in the code 
> about such matters.
> 
> This is particularly important in the case of doveadm, since its output 
> requires parsing for extracting such informations (the exit code alone isn't 
> sufficient); should above behavior be changed without notice, and a script 
> could suddenly take the worst decisions...
> 
> BTW, why:
> nologin
> in the first output, and:
> nologin=!
> in the second output?
> 
> 
> TIA,
> Axel


Re: [Dovecot] doveadm import : Error creating new mailbox

2014-04-29 Thread Steffen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Administrator BCS wrote:
> Citeren Steffen Kaiser :
> 
>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
>> 
>> On Tue, 29 Apr 2014, Administrator BCS wrote:
>> 
 mail_location = maildir:/home/vmail/%d/%n
>> 
 userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver =
 sql }
>> 
>> BTW: What home directory are you using? It is not recommended to
>> run with mail (dir) == home (dir). Insofar, it might be better to
>> add the pseudo standard Maildir to mail_location.
> 
> I don't know if I fully understand your question. I am trying to
> import mail from an old system running mbox (inbox in
> /var/mail/username and the rest in /home/username/mail/), to a new
> system running Postfix/Dovecot with virtual mailboxes for separate
> domains.

I'd suggested to _not_ import, but migrate the messages.

However, doveadm import -u user maildir:... "" all
works for me, but my target user already has ~/Maildir/{new,cur,tmp}.

> So the mail users on the new system do not have a linux account
> anymore and therefore no homedir either.

Well, maybe you could call the "homedirectory" in the sense of Dovecot
as "directory where to put files relatively to by default', see
http://wiki2.dovecot.org/MailLocation sec. "homeless useres".

> As you suggested earlier, copying to maildir converted box manually
> to the vmail folders and editing the subscriptions file is a way to
> get it to work but it is very labour intensive.

I though mb2md supports "-d destdir", and to patch subscribe :

cd <>
echo INBOX >subscribe
ls -d .??* |grep '^\.' | sed -e 's/^\.//' >>subscribe

- -- 
Steffen
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEVAwUBU1/wx3D1/YhP6VMHAQKUbQgA7f8Ro3K6Z8BzWW5uOnAaWDOYPbacqWDF
CRcHB0sqgSqWoOYnsB/ymL2fWqrK5dHmcDStU4PfiEimHM2eMhgJkGreSRbbT8Yw
YYIwyRUjzewfFeZJU/BSzklhppctKUK+e2VghoiSgYDE1HsDr4SciBHzG82wKn/4
d30k4nCsWnUJ7P5bLUxtJFI1Qtdczi2Orcuhfc9jTEKaGv8rukvcl2b/BxJQKOSK
XAQpHn9p4GhjJ7/jpHB8Nmz7JztKg0B0XdVjGRde2M10dzxL7R9isCJ3pcBn3b2y
GKi/Axzo+jpHRrIVqsWs+YK3pX16rs/j7dCxuc6NaBqiE90wmDXRmQ==
=ep+o
-END PGP SIGNATURE-


Re: [Dovecot] doveadm import : Error creating new mailbox

2014-04-29 Thread Administrator BCS

 Citeren Steffen Kaiser :


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 29 Apr 2014, Administrator BCS wrote:


mail_location = maildir:/home/vmail/%d/%n



userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}


BTW: What home directory are you using? It is not recommended to run
with mail (dir) == home (dir). Insofar, it might be better to add the
pseudo standard Maildir to mail_location.


I don't know if I fully understand your question. I am trying to  
import mail from an old system running mbox (inbox in  
/var/mail/username and the rest in /home/username/mail/), to a new  
system running Postfix/Dovecot with virtual mailboxes for separate  
domains. So the mail users on the new system do not have a linux  
account anymore and therefore no homedir either. Their mail is stored  
by the virtual mail handler in /home/vmail/domain.nl/username/. Worth  
mentioning maybe that initially it used /var/vmail/ but I moved it  
from /var to /home for reasons of file system space and edited the  
postfix- and dovecot configs accordingly.


As a test I copied some individual mbox files from the old system to a  
temporary folder on the new one and tried to import those files to the  
corresponding maildirs of the users on the new system using doveadm  
import, which failed. Maybe it simply does not work that way and  
should I go for the direct full mbox>maildir conversion from the old  
server to the new one.


As you suggested earlier, copying to maildir converted box manually to  
the vmail folders and editing the subscriptions file is a way to get  
it to work but it is very labour intensive.



--
Systeembeheer Bezoekerscentrum Sonsbeek


Re: [Dovecot] doveadm import : Error creating new mailbox

2014-04-29 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 29 Apr 2014, Administrator BCS wrote:


mail_location = maildir:/home/vmail/%d/%n



userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}


BTW: What home directory are you using? It is not recommended to run with 
mail (dir) == home (dir). Insofar, it might be better to add the pseudo 
standard Maildir to mail_location.


- -- 
Steffen Kaiser

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

iQEVAwUBU1+lv3z1H7kL/d9rAQJjYQf7BWeKttb2XQmc+2v6ZkdyiQ19JIFwsp2D
iLZI9OVbNEh3+0Vv7EBGEzVGmuq2+o/7BzeSaHYzBOYJhC/5pIwAcfHet3uvbBGF
/GdXMjfIuEM790H3mSamaNmmoz+HYlXtuqsEy0nFt2kRmvq+HveLpA62Z7fEOEn/
8rPUxzR+44gNZrB24Xuigv5mfoqglm7HlpATnpWQlRJf+hbkjfZdZ/5qvyDEXI2x
xmR3K9wJ43h5mqlMOi9QYZc6wLCLRl6v+rxtQcSajlZi6iAfzjCLeTYlqTQOz2AF
XoEhTuQPWDpAEZpgb850pGZN43/wJfbumozF0TsMU3YJUR6snwXFxw==
=/KAC
-END PGP SIGNATURE-


Re: [Dovecot] doveadm import : Error creating new mailbox

2014-04-29 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 29 Apr 2014, Administrator BCS wrote:


On Tue, 29 Apr 2014, Administrator BCS wrote:

Now trying to manually import some mbox files from the old server into 
dovecot. Copied a mbox file to the new system, converted it to Maildir 
with mb2md resulting in a directory containing the new, cur en tmp. Looks 
ok, old email messages are all there.


When importing this folder using doveadm import it fails with the message:


Copy/move the files in cur and new into the new place, no need for doveadm 
import. If there is no target mailbox of that name, copy the whole 
.mailbox.sub.sub folder.




well the example I gave was maybe a bit confusing. Moving/copying the 
contents of folders works but only for already existing folders.
When I want to import folders that do not yet exist and create them by 
copying a .mailbox folder to the users vmail folder it does not show up in my 
front end (Horde). From what I learned so far this is because I have to use 
the dovecot import tool in order to make dovecot recognize them.


say mb2md creates:
.folder.sub.sub/{cur,new,tmp}
.

move .folder.sub.sub to 
/home/vmail/bezoekerscentrumsonsbeek.nl/techniek/.folder.sub.sub


If they does not show up, probably because they are not subscribed, add 
them to Maildir/subscriptions . Sometimes clients cache the folders. 
logoff/on again.




- -- 
Steffen Kaiser

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

iQEVAwUBU1+Tpnz1H7kL/d9rAQIc1ggAtMYCafYQyr317y7ixNvkXuXfnWBssDQC
kMFGdKSOO1Efpdj1PMvwS3yZNdd93P02uSHRuoARKWQMwn46pPtkIgiesC3B1IcO
DZiN0bg35iw3eenj3k0ZGol9HDZF2B8cE/6I8rqP2a6XANqLXBk4TB1HfmxcRGgp
Uuu4nhv8ZPqee1J1oP8U1RqQ0gdeS0zlhXT8At6l+iqzRkcfmijxK+GJ2QVxceDT
k+Hs3/QD/KNWpoWx6o/ClDIFVt6ALGw2hz622WL3tEv7Ytvy50E7FoVxbv6ET7Hr
g5zacot+jjOxiwBSTxBzkpsg4yvZ1D6QEph+gnXSR6ishKEu/Aeddw==
=xImh
-END PGP SIGNATURE-


Re: [Dovecot] doveadm import : Error creating new mailbox

2014-04-29 Thread Administrator BCS

Citeren Steffen Kaiser :


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 29 Apr 2014, Administrator BCS wrote:

Now trying to manually import some mbox files from the old server  
into dovecot. Copied a mbox file to the new system, converted it to  
Maildir with mb2md resulting in a directory containing the new, cur  
en tmp. Looks ok, old email messages are all there.


When importing this folder using doveadm import it fails with the message:


Copy/move the files in cur and new into the new place, no need for  
doveadm import. If there is no target mailbox of that name, copy the  
whole .mailbox.sub.sub folder.




well the example I gave was maybe a bit confusing. Moving/copying the  
contents of folders works but only for already existing folders.
When I want to import folders that do not yet exist and create them by  
copying a .mailbox folder to the users vmail folder it does not show  
up in my front end (Horde). From what I learned so far this is because  
I have to use the dovecot import tool in order to make dovecot  
recognize them.



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

iQEVAwUBU19+FHz1H7kL/d9rAQIc9Af7B1ecvA/GLNKF6luQSDjcenR1S9OYjVcn
pAAgZTaWEjwp50pg8qdRGe3K5/lPmi9+ltGeQeoNzqfRi/4T902AopZ4JqFrbBUy
oxZTvaKAKjTB9m0xor8S/fpWF4ZqEiEomuPRIS96/zCoJsJBDycEhSEn4/wU8U/a
1+D76Krd+RC33P12VsXvXFSiJ2ZuThH2Z82vtp8FCqmYZ8ZSxMyWXkRMy5qsLPoz
9QoGqSk2nOoSF9CXuLNmeLvqyEnBri18eLP0bIwYS7+a/V0uAJTYnSuG3tFbv2no
e5P9dA6Vi2YtCNRYy3wbyuhZFWF7m47vwOXZIO52PjHQ4nbM4Z4F9w==
=ngDh
-END PGP SIGNATURE-



--
Systeembeheer Bezoekerscentrum Sonsbeek


Re: [Dovecot] doveadm import : Error creating new mailbox

2014-04-29 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 29 Apr 2014, Administrator BCS wrote:

Now trying to manually import some mbox files from the old server into 
dovecot. Copied a mbox file to the new system, converted it to Maildir with 
mb2md resulting in a directory containing the new, cur en tmp. Looks ok, old 
email messages are all there.


When importing this folder using doveadm import it fails with the message:


Copy/move the files in cur and new into the new place, no need for doveadm 
import. If there is no target mailbox of that name, copy the whole 
.mailbox.sub.sub folder.


- -- 
Steffen Kaiser

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

iQEVAwUBU19+FHz1H7kL/d9rAQIc9Af7B1ecvA/GLNKF6luQSDjcenR1S9OYjVcn
pAAgZTaWEjwp50pg8qdRGe3K5/lPmi9+ltGeQeoNzqfRi/4T902AopZ4JqFrbBUy
oxZTvaKAKjTB9m0xor8S/fpWF4ZqEiEomuPRIS96/zCoJsJBDycEhSEn4/wU8U/a
1+D76Krd+RC33P12VsXvXFSiJ2ZuThH2Z82vtp8FCqmYZ8ZSxMyWXkRMy5qsLPoz
9QoGqSk2nOoSF9CXuLNmeLvqyEnBri18eLP0bIwYS7+a/V0uAJTYnSuG3tFbv2no
e5P9dA6Vi2YtCNRYy3wbyuhZFWF7m47vwOXZIO52PjHQ4nbM4Z4F9w==
=ngDh
-END PGP SIGNATURE-


[Dovecot] doveadm auth and the "nologin" extra field

2014-04-18 Thread Axel Luttgens
Hello,

Still busy with details...

Considering, as in my previous example, a password_query returning '!' or NULL 
for the "nologin" column, depending on an account's status (suspended or not).

Let's consider a suspended user "some.user".

In the case of a successful authentication, one has:

sh-3.2# doveadm auth test some.user goodpassword; echo $?
passdb: some.user auth succeeded
extra fields:
  user=some.user
  nologin
0

On the other hand, in the case of an authentication failure:

sh-3.2# doveadm auth test some.user badpassword; echo $?
passdb: some.user auth failed
extra fields:
  user=some.user
  nologin=!
77

So, this is similar to what happens in a connection (pop3, imap...): when 
present, the nologin info is always taken into account, even in the case of an 
authentication failure.

Again, this may raise some concerns about the consistency of such a behavior.
Is this guaranteed to always behave that way, because of some rationale I'm 
currently missing, or does it go about some overlooked combination, liable to 
be inadvertently "corrected" in the future?
I haven't been able to find a definitive answer in the wiki or in the code 
about such matters.

This is particularly important in the case of doveadm, since its output 
requires parsing for extracting such informations (the exit code alone isn't 
sufficient); should above behavior be changed without notice, and a script 
could suddenly take the worst decisions...

BTW, why:
  nologin
in the first output, and:
  nologin=!
in the second output?


TIA,
Axel

Re: [Dovecot] Doveadm?

2014-03-12 Thread Tommy Berglund

2014-03-11 20:41, Gedalya skrev:

doveadm search -u jane@example.org mailbox INBOX | cut -d" " -f2 |
head -n -200 | tr '\n' , | xargs -n1 doveadm expunge -u
jane@example.org mailbox INBOX uid

basically, get all uid's and use head to cut out all but the last 200,
turn that into a comma separated list, and pass to dovadm expunge.

Test it first!


Thanks! I try to test in this weekend.

//Tommy

On 03/11/2014 03:02 PM, Tommy Berglund wrote:

I have a question?
Is it possible that with doveadm delete all but the last x-number of
messages in a folder. For example to retain the last 200 messages in
the folder.
If it is possible, how do you do it?
Something like "doveadm expunge -u jane@example.org mailbox xxx"

Thank you!


Re: [Dovecot] Doveadm?

2014-03-11 Thread Gedalya
doveadm search -u jane@example.org mailbox INBOX | cut -d" " -f2 | 
head -n -200 | tr '\n' , | xargs -n1 doveadm expunge -u 
jane@example.org mailbox INBOX uid


basically, get all uid's and use head to cut out all but the last 200, 
turn that into a comma separated list, and pass to dovadm expunge.


Test it first!

On 03/11/2014 03:02 PM, Tommy Berglund wrote:

I have a question?
Is it possible that with doveadm delete all but the last x-number of 
messages in a folder. For example to retain the last 200 messages in 
the folder.

If it is possible, how do you do it?
Something like "doveadm expunge -u jane@example.org mailbox xxx"

Thank you!


[Dovecot] Doveadm?

2014-03-11 Thread Tommy Berglund

I have a question?
Is it possible that with doveadm delete all but the last x-number of 
messages in a folder. For example to retain the last 200 messages in the 
folder.

If it is possible, how do you do it?
Something like "doveadm expunge -u jane@example.org mailbox xxx"

Thank you!
--
//Tommy


[Dovecot] doveadm mailbox command in multi instance setup

2014-02-22 Thread Peer Heinlein

We're running Dovecot in a multipe instance cluster with individual
userdb-querys to different LDAP-Servers.

As far as I can see there's no way to use the

doveadm mailbox

command with different Auth-Sockets or different configurations.

While

root@dobby4:/etc/dovecot# doveadm user -a
/var/run/dovecot-xy/auth-master  p.heinl...@example.com
field   value
uid 1
gid 1
home/mail/example.com/123456/
mailmdbox:~/mdbox
quota_rule2 *:storage=50G


is working, using

doveadm -c /etc/dovecot/dovecot-xy.conf mailbox list -u
p.heinl...@example.com

does NOT an (user unknown).

How can use a different auth socket with "doveadm mailbox" commands?

(Maybe using the network socket could be a working way, but what about
normal way on the command line?)

Peer



-- 
Heinlein Support GmbH
Schwedter Str. 8/9b, 10119 Berlin

http://www.heinlein-support.de

Tel: 030 / 405051-42
Fax: 030 / 405051-19

Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht
Berlin-Charlottenburg,
Geschäftsführer: Peer Heinlein -- Sitz: Berlin



signature.asc
Description: OpenPGP digital signature


[Dovecot] doveadm stats top exit with error

2014-01-23 Thread Andreas Schulze
Hello,

looks like a cosmetical problem but I like to mention it though:

doveadm stats top is interactive. To exit I press as usual CTRL+C and get
^Cdoveadm(root): Error: close(-1[doveadm-stats.c:496]) failed: Interrupted 
system call

It's dovecot-2.2.10.

Andreas


[Dovecot] doveadm table formatter: hidden titles may cause misaligned headers

2013-12-01 Thread Julian Reich
Hello,

I recently noticed a small bug in the doveadm table formatter: hidden titles 
may cause the headers to be misaligned.
The behavior in question was introduced by commit 
 and
  doveadm -f table quota get -A
may be used to reproduce it.

Most simple patch attached: it simply restores the old behavior, to some extent.
Actually hiding those titles may be desired.

Regards,
Julian Reich


doveadm-table-formatter.patch
Description: Binary data


Re: [Dovecot] Doveadm with a 2nd Instance

2013-11-03 Thread Chris Lasater

On 11/02/2013 08:32 AM, Timo Sirainen wrote:

On 26.9.2013, at 16.11, Chris Lasater  wrote:


While testing some more I found out something else.  I have an alias set for 
doveadm so it was running with sudo and that ended up being part of the issue.  
If doveadm is run as a regular user then the problem goes away

[user@server ~]$ doveadm -i Director log find
Debug: /home/user/apps/logs/director/director_debug.log
Info: /home/user/apps/logs/director/director_info.log
Warning: /home/user/apps/logs/director/director.log
Error: /home/user/apps/logs/director/director.log
Fatal: /home/user/apps/logs/director/director.log

[user@server ~]$ sudo doveadm -i Director log find
Debug: /home/user/apps/logs/dovecot_debug.log
Info: /home/user/apps/logs/dovecot_info.log
Warning: /home/user/apps/logs/dovecot.log
Error: /home/user/apps/logs/dovecot.log
Fatal: /home/user/apps/logs/dovecot.log

Also if I run "sudo doveadm stop" to stop the main instance, I now have the 
ability to use the -i Director using sudo.  Unfortunately this makes it difficult to 
manage two instances.  Does anyone have an idea of getting this to work with sudo?

I don’t see why sudo should matter here. I can’t reproduce this, it always 
works no matter what I do. Do you have two different doveadm commands in 
different paths (sudo vs non-sudo path)? The way the -i parameter works is 
simply:

1. Look at the “instances” in the built-in configured STATE_DIR (doveconf -d 
state_dir)
2. Find the instance name from the file (2nd parameter) and the base_dir (3rd 
parameter)
3. Get the base_dir/dovecot.conf symlink’s destination path
4. Use that path as the config file



I only have 1 doveadm binary, and I have an alias set up for it:

alias doveadm="sudo -E PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH 
/home/user/apps/dovecot/bin/doveadm"


I later found out that if I change the base_dir for both instances to a 
different folder, the problem went away, so it appeared to grab the 
default base_dir when I told it to use the Director instance.




Re: [Dovecot] Doveadm with a 2nd Instance

2013-11-02 Thread Timo Sirainen
On 26.9.2013, at 16.11, Chris Lasater  wrote:

> While testing some more I found out something else.  I have an alias set for 
> doveadm so it was running with sudo and that ended up being part of the 
> issue.  If doveadm is run as a regular user then the problem goes away
> 
> [user@server ~]$ doveadm -i Director log find
> Debug: /home/user/apps/logs/director/director_debug.log
> Info: /home/user/apps/logs/director/director_info.log
> Warning: /home/user/apps/logs/director/director.log
> Error: /home/user/apps/logs/director/director.log
> Fatal: /home/user/apps/logs/director/director.log
> 
> [user@server ~]$ sudo doveadm -i Director log find
> Debug: /home/user/apps/logs/dovecot_debug.log
> Info: /home/user/apps/logs/dovecot_info.log
> Warning: /home/user/apps/logs/dovecot.log
> Error: /home/user/apps/logs/dovecot.log
> Fatal: /home/user/apps/logs/dovecot.log
> 
> Also if I run "sudo doveadm stop" to stop the main instance, I now have the 
> ability to use the -i Director using sudo.  Unfortunately this makes it 
> difficult to manage two instances.  Does anyone have an idea of getting this 
> to work with sudo?

I don’t see why sudo should matter here. I can’t reproduce this, it always 
works no matter what I do. Do you have two different doveadm commands in 
different paths (sudo vs non-sudo path)? The way the -i parameter works is 
simply:

1. Look at the “instances” in the built-in configured STATE_DIR (doveconf -d 
state_dir)
2. Find the instance name from the file (2nd parameter) and the base_dir (3rd 
parameter)
3. Get the base_dir/dovecot.conf symlink’s destination path
4. Use that path as the config file



Re: [Dovecot] doveadm can't import his own mdboxes

2013-11-02 Thread Timo Sirainen
On 2.10.2013, at 16.46, Peer Heinlein  wrote:

> As you can see, our namespace seperator is "." and not "/":
> 
> The problem is, that doveadm isn't able to import his own mdbox-directory:
> 
> # doveadm  import -u max.muster mdbox:mdbox BACKUP all
> doveadm(max.muster): Error: Couldn't create mailbox
> BACKUP.INBOX/test/huhu: Character not allowed in mailbox name: ‘/'

Fixed: http://hg.dovecot.org/dovecot-2.2/rev/1936d50f01c4



Re: [Dovecot] doveadm: Fatal: open(/dev/tty)

2013-10-22 Thread Dan Langille

On 2013-10-22 14:52, Dan Langille wrote:

I received this message today, and remembered, you can't do that...

$ doveadm pw -s SHA512-CRYPT
Enter new password: doveadm(dan): Fatal: open(/dev/tty) failed: No
such file or directory


It seems if you have no tty, you can't create a password.  Surely
there is a better way to do this?

Looking at the code, it's trying to open the tty and turn off echo.

For the record: FreeBSD 8.4-RELEASE-p3

And yes, there is no console.  I'm attached to a FreeBSD jail from the
host system, directly via the ezjail-admin console command.

# w
6:52PM  up 18 days, 23:34, 0 users, load averages: 0.96, 0.57, 0.46
USER TTY  FROM  LOGIN@  IDLE WHAT
#

Ain't nobody there..


This is mostly for the record, as I found nobody else encountering this 
problem.


Interesting... the same thing on a FreeBSD 9.1-RELEASE-p6 gives a 
different result.  After getting into the jail via 'ezjail-admin 
console', there is a tty listed:


# w
7:14PM  up 43 days, 23:52, 1 user, load averages: 0.00, 0.00, 0.00
USER   TTY  FROM  LOGIN@  IDLE WHAT
root   pts/0- 7:14PM - w

And all is well:

# doveoveadm pw -s SHA512-CRYPT
Enter new password:

--
Dan Langille - http://langille.org/


Re: [Dovecot] doveadm: Fatal: open(/dev/tty)

2013-10-22 Thread Dan Langille

On 2013-10-22 14:54, Frank de Bot wrote:

Dan Langille wrote:
I received this message today, and remembered, you can't do that...

$ doveadm pw -s SHA512-CRYPT
Enter new password: doveadm(dan): Fatal: open(/dev/tty) failed: No such
file or directory


It seems if you have no tty, you can't create a password.  Surely there
is a better way to do this?

Looking at the code, it's trying to open the tty and turn off echo.

For the record: FreeBSD 8.4-RELEASE-p3

And yes, there is no console.  I'm attached to a FreeBSD jail from the
host system, directly via the ezjail-admin console command.

# w
6:52PM  up 18 days, 23:34, 0 users, load averages: 0.96, 0.57, 0.46
USER TTY  FROM  LOGIN@  IDLE WHAT
#

Ain't nobody there..



Hi,

It sounds you have forgotten to mount /dev in the jail. You can
consult http://www.freebsd.org/doc/handbook/jails-build.html for all
steps to do this.


Thanks Frank.  /dev is mounted.

In the jail:

# ls /dev
fd  log nullptmxpts random  stderr  stdin   stdout  
urandom zero


From the jail host:

$ mount | grep myjail | grep dev
devfs on /usr/jails/myjail/dev (devfs, local, multilabel)
fdescfs on /usr/jails/myjail/dev/fd (fdescfs)

Dovecot, Postfix, & Bacula are running fine.


--
Dan Langille - http://langille.org/


Re: [Dovecot] doveadm: Fatal: open(/dev/tty)

2013-10-22 Thread Frank de Bot

Hi,

It sounds you have forgotten to mount /dev in the jail. You can consult 
http://www.freebsd.org/doc/handbook/jails-build.html for all steps to do 
this.



Regards,

Frank de Bot

Dan Langille wrote:

I received this message today, and remembered, you can't do that...

$ doveadm pw -s SHA512-CRYPT
Enter new password: doveadm(dan): Fatal: open(/dev/tty) failed: No such
file or directory


It seems if you have no tty, you can't create a password.  Surely there
is a better way to do this?

Looking at the code, it's trying to open the tty and turn off echo.

For the record: FreeBSD 8.4-RELEASE-p3

And yes, there is no console.  I'm attached to a FreeBSD jail from the
host system, directly via the ezjail-admin console command.

# w
6:52PM  up 18 days, 23:34, 0 users, load averages: 0.96, 0.57, 0.46
USER TTY  FROM  LOGIN@  IDLE WHAT
#

Ain't nobody there..





[Dovecot] doveadm: Fatal: open(/dev/tty)

2013-10-22 Thread Dan Langille

I received this message today, and remembered, you can't do that...

$ doveadm pw -s SHA512-CRYPT
Enter new password: doveadm(dan): Fatal: open(/dev/tty) failed: No such 
file or directory



It seems if you have no tty, you can't create a password.  Surely there 
is a better way to do this?


Looking at the code, it's trying to open the tty and turn off echo.

For the record: FreeBSD 8.4-RELEASE-p3

And yes, there is no console.  I'm attached to a FreeBSD jail from the 
host system, directly via the ezjail-admin console command.


# w
6:52PM  up 18 days, 23:34, 0 users, load averages: 0.96, 0.57, 0.46
USER TTY  FROM  LOGIN@  IDLE WHAT
#

Ain't nobody there..

--
Dan Langille - http://langille.org/


Re: [Dovecot] doveadm can't import his own mdboxes

2013-10-13 Thread Peer Heinlein
Hi,

I'd like to remind to my question / bug-report some days ago.

Can anybody help?

Peer




 Original-Nachricht 
Betreff: [Dovecot] doveadm can't import his own mdboxes
Datum: Wed, 02 Oct 2013 15:46:12 +0200
Von: Peer Heinlein 
An: Dovecot Mailing List 


We're running Dovecot 2.1.17 on Debian:

# 2.1.17 (9efbc0731929): /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-042stab078.27.debug i686 Debian 7.1 simfs

and we're having this namespace configuration:

mail_location = mdbox:/var/mail/%Ld/%Ln/mdbox

namespace inbox {
  disabled = no
  hidden = no
  ignore_on_failure = no
  inbox = yes
  list = yes
  location =
  prefix =
  separator = .
  subscriptions = yes
  type = private
}

As you can see, our namespace seperator is "." and not "/":

a LIST "" "*"
* LIST (\HasChildren) "." INBOX.test
* LIST (\HasNoChildren) "." INBOX.test.huhu
* LIST (\HasNoChildren \Trash) "." Trash
* LIST (\HasChildren) "." INBOX
a OK List completed.

The problem is, that doveadm isn't able to import his own mdbox-directory:

1) delete the whole mdbox folder

# rm -rf mdbox

2) create the new mdbox folder and create some subfolders in it

# doveadm  mailbox create -u max.muster  INBOX.test
# doveadm  mailbox create -u max.muster  INBOX.test.huhu

3) put a mail into a subfolder

4) try to re-import the whole mdbox: it doesn't work

# doveadm  import -u max.muster mdbox:mdbox BACKUP all
doveadm(max.muster): Error: Couldn't create mailbox
BACKUP.INBOX/test/huhu: Character not allowed in mailbox name: '/'

Looks like there's something wrong in the namespace or like doveadm is
working with a hardcoded internal namespace...

Peer


-- Heinlein Support GmbH Schwedter Str. 8/9b, 10119 Berlin
http://www.heinlein-support.de Tel: 030 / 405051-42 Fax: 030 / 405051-19
Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht
Berlin-Charlottenburg, Geschäftsführer: Peer Heinlein -- Sitz: Berlin


Re: [Dovecot] Doveadm with a 2nd Instance

2013-10-11 Thread /dev/rob0
On Wed, Oct 09, 2013 at 02:24:04PM -0400, Chris Lasater wrote:
> I figured this one out.  The bug is associated with the default 
> run/dovecot base_dir.  If you move both instances to a different 
> location then (or at least the one named dovecot) it works fine
> and I can control both instances properly.

Thank you for following up. I haven't had the chance to get back to 
this yet, but if the list doesn't hear back from me, assume it 
worked. :)

> On 09/26/2013 09:02 AM, /dev/rob0 wrote:
> >On Thu, Sep 26, 2013 at 12:45:01AM -0400, Chris Lasater wrote:
> >>I am trying to use 2 instances of Dovecot on the same server so I
> >>can have a Director managing my connections, everything appears to
> >>be working, but I can not use doveadm to control my 2nd instance,
> >>but doveconf seems to work fine.
> >I have noticed the same thing. It seems that doveadm ignores -i.
> >"dovecot" works with -c /path/to/other/dovecot.conf, but it too
> >ignores -i.
> >
> >We got the idea to try -i  from
> >http://wiki2.dovecot.org/Tools/Doveadm/Instance , but "doveadm help"
> >itself does not show a -i.
> >
> >>I have stopped and started both my instances so the config running
> >>is what is in the config file, but when I use -i Director with
> >>doveadm it uses the other instances config.
> >And this is a big problem for trying to use "doveadm director"
> >commands when the director instance uses the nonstandard paths. I
> >haven't found a way to do that yet! "-c /path/to/other/dovecot.conf"
> >didn't work.
> >
> >http://wiki2.dovecot.org/Tools/Doveadm/Director
> >
> >Currently on 2.2.5, about to switch to 2.2.6 EE. It seemed like it
> >worked back in 2.0.9 before upgrading.
> 

-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:


Re: [Dovecot] Doveadm with a 2nd Instance

2013-10-09 Thread Chris Lasater

Hey Rob,
I figured this one out.   The bug is associated with the default 
run/dovecot base_dir.  If you move both instances to a different 
location then (or at least the one named dovecot) it works fine and I 
can control both instances properly.

Chris

On 09/26/2013 09:02 AM, /dev/rob0 wrote:

On Thu, Sep 26, 2013 at 12:45:01AM -0400, Chris Lasater wrote:

I am trying to use 2 instances of Dovecot on the same server so I
can have a Director managing my connections, everything appears to
be working, but I can not use doveadm to control my 2nd instance,
but doveconf seems to work fine.

I have noticed the same thing. It seems that doveadm ignores -i.
"dovecot" works with -c /path/to/other/dovecot.conf, but it too
ignores -i.

We got the idea to try -i  from
http://wiki2.dovecot.org/Tools/Doveadm/Instance , but "doveadm help"
itself does not show a -i.


I have stopped and started both my instances so the config running
is what is in the config file, but when I use -i Director with
doveadm it uses the other instances config.

And this is a big problem for trying to use "doveadm director"
commands when the director instance uses the nonstandard paths. I
haven't found a way to do that yet! "-c /path/to/other/dovecot.conf"
didn't work.

http://wiki2.dovecot.org/Tools/Doveadm/Director

Currently on 2.2.5, about to switch to 2.2.6 EE. It seemed like it
worked back in 2.0.9 before upgrading.




[Dovecot] doveadm can't import his own mdboxes

2013-10-02 Thread Peer Heinlein

We're running Dovecot 2.1.17 on Debian:

# 2.1.17 (9efbc0731929): /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-042stab078.27.debug i686 Debian 7.1 simfs

and we're having this namespace configuration:

mail_location = mdbox:/var/mail/%Ld/%Ln/mdbox

namespace inbox {
  disabled = no
  hidden = no
  ignore_on_failure = no
  inbox = yes
  list = yes
  location =
  prefix =
  separator = .
  subscriptions = yes
  type = private
}

As you can see, our namespace seperator is "." and not "/":

a LIST "" "*"
* LIST (\HasChildren) "." INBOX.test
* LIST (\HasNoChildren) "." INBOX.test.huhu
* LIST (\HasNoChildren \Trash) "." Trash
* LIST (\HasChildren) "." INBOX
a OK List completed.

The problem is, that doveadm isn't able to import his own mdbox-directory:

1) delete the whole mdbox folder

# rm -rf mdbox

2) create the new mdbox folder and create some subfolders in it

# doveadm  mailbox create -u max.muster  INBOX.test
# doveadm  mailbox create -u max.muster  INBOX.test.huhu

3) put a mail into a subfolder

4) try to re-import the whole mdbox: it doesn't work

# doveadm  import -u max.muster mdbox:mdbox BACKUP all
doveadm(max.muster): Error: Couldn't create mailbox
BACKUP.INBOX/test/huhu: Character not allowed in mailbox name: '/'

Looks like there's something wrong in the namespace or like doveadm is
working with a hardcoded internal namespace...

Peer


-- 
Heinlein Support GmbH
Schwedter Str. 8/9b, 10119 Berlin

http://www.heinlein-support.de

Tel: 030 / 405051-42
Fax: 030 / 405051-19

Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht
Berlin-Charlottenburg,
Geschäftsführer: Peer Heinlein -- Sitz: Berlin


Re: [Dovecot] Doveadm with a 2nd Instance

2013-09-30 Thread Chris Lasater

Could this bug have reappeared or not been passed to the 2.2.x release?

On 09/26/2013 07:06 PM, Daniel Parthey wrote:

Hi,

this bug should have been fixed by Timo in some 2.1.x release. The 
issue should be in the list archives too. Which version are you using?


BTW: I'm still using
doveadm -c /etc/dovecot-director/dovecot- director.conf director status
to address the director instance.

Regards
Daniel 




Re: [Dovecot] Doveadm with a 2nd Instance

2013-09-26 Thread Chris

I upgraded to 2.2.6 yesterday and was one 2.2.5 before.

On 09/26/2013 07:06 PM, Daniel Parthey wrote:

Hi,

this bug should have been fixed by Timo in some 2.1.x release. The 
issue should be in the list archives too. Which version are you using?


BTW: I'm still using
doveadm -c /etc/dovecot-director/dovecot- director.conf director status
to address the director instance.

Regards
Daniel 




Re: [Dovecot] Doveadm with a 2nd Instance

2013-09-26 Thread Daniel Parthey
Hi,

this bug should have been fixed by Timo in some 2.1.x release. The issue should 
be in the list archives too. Which version are you using?

BTW: I'm still using
doveadm -c /etc/dovecot-director/dovecot- director.conf director status
to address the director instance.

Regards
Daniel

Re: [Dovecot] Doveadm with a 2nd Instance

2013-09-26 Thread Chris Lasater
While testing some more I found out something else.  I have an alias set 
for doveadm so it was running with sudo and that ended up being part of 
the issue.  If doveadm is run as a regular user then the problem goes away


[user@server ~]$ doveadm -i Director log find
Debug: /home/user/apps/logs/director/director_debug.log
Info: /home/user/apps/logs/director/director_info.log
Warning: /home/user/apps/logs/director/director.log
Error: /home/user/apps/logs/director/director.log
Fatal: /home/user/apps/logs/director/director.log

[user@server ~]$ sudo doveadm -i Director log find
Debug: /home/user/apps/logs/dovecot_debug.log
Info: /home/user/apps/logs/dovecot_info.log
Warning: /home/user/apps/logs/dovecot.log
Error: /home/user/apps/logs/dovecot.log
Fatal: /home/user/apps/logs/dovecot.log

Also if I run "sudo doveadm stop" to stop the main instance, I now have 
the ability to use the -i Director using sudo.  Unfortunately this makes 
it difficult to manage two instances.  Does anyone have an idea of 
getting this to work with sudo?

Chris


Re: [Dovecot] Doveadm with a 2nd Instance

2013-09-26 Thread /dev/rob0
On Thu, Sep 26, 2013 at 12:45:01AM -0400, Chris Lasater wrote:
> I am trying to use 2 instances of Dovecot on the same server so I 
> can have a Director managing my connections, everything appears to 
> be working, but I can not use doveadm to control my 2nd instance, 
> but doveconf seems to work fine.

I have noticed the same thing. It seems that doveadm ignores -i. 
"dovecot" works with -c /path/to/other/dovecot.conf, but it too 
ignores -i.

We got the idea to try -i  from 
http://wiki2.dovecot.org/Tools/Doveadm/Instance , but "doveadm help" 
itself does not show a -i.

> I have stopped and started both my instances so the config running 
> is what is in the config file, but when I use -i Director with 
> doveadm it uses the other instances config.

And this is a big problem for trying to use "doveadm director"
commands when the director instance uses the nonstandard paths. I 
haven't found a way to do that yet! "-c /path/to/other/dovecot.conf" 
didn't work.

http://wiki2.dovecot.org/Tools/Doveadm/Director

Currently on 2.2.5, about to switch to 2.2.6 EE. It seemed like it 
worked back in 2.0.9 before upgrading.
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:


[Dovecot] Doveadm with a 2nd Instance

2013-09-25 Thread Chris Lasater

Hi Guys,
I am trying to use 2 instances of Dovecot on the same server so I can 
have a Director managing my connections, everything appears to be 
working, but I can not use doveadm to control my 2nd instance, but 
doveconf seems to work fine.


[user@server logs]$ doveconf -i Director | grep logs
debug_log_path = /home/user/apps/logs/director/director_debug.log
info_log_path = /home/user/apps/logs/director/director_info.log
log_path = /home/user/apps/logs/director/director.log
  info_log_path = /home/user/apps/logs/director/director_lmtp.log

[user@server logs]$ doveadm -i Director log find
Debug: /home/user/apps/logs/dovecot_debug.log
Info: /home/user/apps/logs/dovecot_info.log
Warning: /home/user/apps/logs/dovecot.log
Error: /home/user/apps/logs/dovecot.log
Fatal: /home/user/apps/logs/dovecot.log

I have stopped and started both my instances so the config running is 
what is in the config file, but when I use -i Director with doveadm it 
uses the other instances config.


[user@server logs]$ doveadm instance list
path name last used   running
/home/user/apps/dovecot/var/run/dovecot Dovecot  2013-09-26 00:39:14 yes
/home/user/apps/dovecot/var/run/director Director 2013-09-26 00:32:31 yes

Any ideas, or does anyone have any experience with the Dovecot instance 
feature?

Chris


Re: [Dovecot] doveadm mailbox create error codes

2013-09-23 Thread Timo Sirainen
On 23.9.2013, at 23.11, Micah Anderson  wrote:

> I'm trying to find out what the different 'doveadm mailbox create' error
> codes are. I've been looking through the source, but I can't seem to
> find them.

You need to grep for "EX_" and/or "doveadm_exit_code".

> I did determine that '65' happens when "Error: Can't create mailbox x:
> Mailbox already exists", but I've also received error 67, and the more
> mysterious error code 16640.

doveadm returns the sysexits.h error codes. 67 means "unknown user". 16640 (or 
anything above 127) means a crash or something.



[Dovecot] doveadm mailbox create error codes

2013-09-23 Thread Micah Anderson

Hello,

I'm trying to find out what the different 'doveadm mailbox create' error
codes are. I've been looking through the source, but I can't seem to
find them.

I did determine that '65' happens when "Error: Can't create mailbox x:
Mailbox already exists", but I've also received error 67, and the more
mysterious error code 16640.

Thanks for any pointers!
micah



[Dovecot] doveadm sync only creates directories, don't sync messages?

2013-09-21 Thread Matthew Kaufman

Running Dovecot 2.1.7.

I'm trying to migrate from an environment with mbox files to a maildir 
configuration.


I remove all vestiges of my maildir over in /var/mail

I put my old mailboxes in ./Mail and my old inbox in ./matthew.

I issue this command: doveadm sync  -u matt...@matthew.at 
mbox:./Mail:INBOX=./matthew


Initially it gave me errors about separator, so I set the separator in 
the inbox namespace to "/" explicitly.


Now that I've done that, and re-run it, over in the right place 
/var/mail, it creates "matthew" and a subdirectory "Mail". That's it. 
Doesn't take long to do it, either. But it doesn't copy any messages at all.


I must be doing something wrong... but what?

Matthew Kaufman
matt...@eeph.com


Re: [Dovecot] doveadm expunge problems

2013-09-06 Thread Joseph Tam

nicolasfo wrote:


doveadm search -u *@mydomain.fr MAILBOX Junk savedbefore 1d : don't lists
anything..

What am I missed ?

Is this the good way to change file date (touch) and by this way, have
results to savedbefore command ?


No.  The date.saved value is (I think) stored in its indices, and
is updated via IMAP operations.  This value is not derived from file
timestamps.  You can use doveadm fetch to get the values that dovecot uses

 dovecot -ftab fetch -A 'mailbox date.saved' mailbox Junk

If you actually use IMAP operations to move messages from INBOX to Junk,
I think you'll find that date.saved reflects the correct value.

Joseph Tam 


Re: [Dovecot] doveadm expunge problems

2013-09-06 Thread nicolasfo
I just tried the doveadm search command :

doveadm search -u *@mydomain.fr MAILBOX Junk : this command lists all emails
in Junk users folders : OK

doveadm search -u *@mydomain.fr MAILBOX Junk savedbefore 1d : don't lists
anything..

What am I missed ?

Is this the good way to change file date (touch) and by this way, have
results to savedbefore command ?

Thanks



--
View this message in context: 
http://dovecot.2317879.n4.nabble.com/doveadm-expunge-problems-tp44200p44201.html
Sent from the Dovecot mailing list archive at Nabble.com.


Re: [Dovecot] doveadm move command

2013-06-24 Thread Timo Sirainen
On 21.6.2013, at 17.50, vincent truc  wrote:

> I want to transfer an email from us...@domain.com to put it in a folder of 
> another user: us...@domain.com
> 
> For that, it seems to me appropriate to use 'doveadm move' command, but I can 
> not get the right result. Can you help me?
> 
> syntax:
>doveadm move [-u |-A] [-S ]  [user  user>] 
> 
> 
> my attempts:
> 
>doveadm move -u us...@domain.com DIRECTORY_2 mailbox 
> us...@domain.com:'DIRECTORY_1' all

doveadm move -u us...@domain.com DIRECTORY_2 user us...@domain.com mailbox 
DIRECTORY_1



[Dovecot] doveadm move command

2013-06-21 Thread vincent truc
Hello


I want to transfer an email from us...@domain.com to put it in a folder of 
another user: us...@domain.com

For that, it seems to me appropriate to use 'doveadm move' command, but I can 
not get the right result. Can you help me?

syntax:
doveadm move [-u |-A] [-S ]  [user ] 


my attempts:

doveadm move -u us...@domain.com DIRECTORY_2 mailbox 
us...@domain.com:'DIRECTORY_1' all

return: Error: Syncing mailbox us...@domaine.fr:DOSSIER_1 failed: Mailbox 
doesn't exist: us...@domaine.fr:DOSSIER_1

doveadm -u us...@domain.com DIRECTORY_2 mailbox 
sdbox:/complete/path/us...@domain.com/mailboxes/DIRECTORY_1 all

return: Error: Syncing mailbox 
sdbox:/complete/path/us...@domain.com/mailboxes/DIRECTORY_1 failed: Mailbox 
doesn't exist: sdbox:/complete/path/us...@domain.com/mailboxes/DIRECTORY_1

doveadm move -u us...@domain.com DIRECTORY_2 mailbox us...@domain.com 
'DIRECTORY_2' all

return: Fatal: Unknown argument DIRECTORY_2
  

Re: [Dovecot] doveadm move syntax

2013-06-20 Thread Thomas Harold

On 6/19/2013 10:25 PM, vincent truc wrote:

Hello

I want to forward an email to us...@domain.com box to the box us...@domain.com

For this I try to use 'doveadm move', but I'm having problems with the syntax.

Could you give me an example please?



Assuming that you looked at "man doveadm-move" (I had to dig for a few 
minutes to uncover that)...


EXAMPLE
Move jane's messages - received in September 2011 - from her INBOX into 
her archive.


doveadm move -u jane Archive/2011/09 mailbox INBOX BEFORE \
2011-10-01 SINCE 01-Sep-2011

At a guess... "Archive/2011/09" can be either a path relative to the 
origin user, or an absolute destination such as:


maildir:/backup/20101126/jane.doe/Maildir

I don't know if it automatically handles putting the proper permissions 
on the destination files though.  I'm basing that guess on the examples 
at the bottom of "man doveadm-import".


[Dovecot] doveadm move syntax

2013-06-20 Thread vincent truc
Hello

I want to forward an email to us...@domain.com box to the box us...@domain.com

For this I try to use 'doveadm move', but I'm having problems with the syntax.

Could you give me an example please?

thanks
  

Re: [Dovecot] doveadm index crashes when indexing shared mailboxes

2013-06-18 Thread W. de Hoog

Hi,


We store our mail archive in a tree of subfolders. I am trying to speed up text searching 
on our mail archive but when running "doveadm -D -v index -u neil 
shared/Exalon/Aandeelhouders" the following output is produced:

..

doveadm(neil): Panic: file mbox-storage.c: line 711 (mbox_transaction_unlock): assertion 
failed: (mbox->box.transaction_count > 
  0 || mbox->mbox_lock_type == F_UNLCK)


mbox is a pretty difficult format, and I wouldn't recommend using it for 
anything else than small simple legacy setups.

After changing the format to sdbox indexing works.

regards,

--
Willem-Jan de Hoog


Re: [Dovecot] doveadm index crashes when indexing shared mailboxes

2013-06-16 Thread Timo Sirainen
On 10.6.2013, at 14.56, W. de Hoog  wrote:

> We store our mail archive in a tree of subfolders. I am trying to speed up 
> text searching on our mail archive but when running "doveadm -D -v index -u 
> neil shared/Exalon/Aandeelhouders" the following output is produced:
..
> doveadm(neil): Panic: file mbox-storage.c: line 711 
> (mbox_transaction_unlock): assertion failed: (mbox->box.transaction_count >   
> 0 || mbox->mbox_lock_type 
> == F_UNLCK)

mbox is a pretty difficult format, and I wouldn't recommend using it for 
anything else than small simple legacy setups.

> # 2.1.7: /etc/dovecot/dovecot.conf

If this happens also with v2.2 I could look into it.



Re: [Dovecot] doveadm altmove to gzipped-mdbox

2013-05-20 Thread Claus

Timo,

thanks for your answer.
If i understand this correctly than it's not possible to work in primary 
storage with uncompressed mdbox (because of better performance) and move 
older Mails to alternate storage in compressed Format.



Am 19.05.2013 21:34, schrieb Timo Sirainen:

On Fri, 2013-05-17 at 15:59 +0200, Claus wrote:

Hi,

im wondering if it's possible to store old messages in a compressed
mdbox on alternate storage.
The main storage is uncompressed mdbox.

I tried something like: doveadm -Dv -o "plugin/zlib_save=gz" altmove -u
testuser sentbefore 8d

Could someone tell me if it's possible and give me a hint how this can
be done?

I think that command should have worked, assuming zlib plugin was
loaded. But it would have compressed mails in the primary storage as
well for those files where it was moving mails away from (altmove runs
implicit purge).







Re: [Dovecot] doveadm altmove to gzipped-mdbox

2013-05-19 Thread Timo Sirainen
On Fri, 2013-05-17 at 15:59 +0200, Claus wrote:
> Hi,
> 
> im wondering if it's possible to store old messages in a compressed 
> mdbox on alternate storage.
> The main storage is uncompressed mdbox.
> 
> I tried something like: doveadm -Dv -o "plugin/zlib_save=gz" altmove -u 
> testuser sentbefore 8d
> 
> Could someone tell me if it's possible and give me a hint how this can 
> be done?

I think that command should have worked, assuming zlib plugin was
loaded. But it would have compressed mails in the primary storage as
well for those files where it was moving mails away from (altmove runs
implicit purge).




[Dovecot] doveadm altmove to gzipped-mdbox

2013-05-17 Thread Claus

Hi,

im wondering if it's possible to store old messages in a compressed 
mdbox on alternate storage.

The main storage is uncompressed mdbox.

I tried something like: doveadm -Dv -o "plugin/zlib_save=gz" altmove -u 
testuser sentbefore 8d


Could someone tell me if it's possible and give me a hint how this can 
be done?


I tried this with dovecot-2.2

Claus


Re: [Dovecot] doveadm search causes replication error message

2013-05-06 Thread Oli Schacher
On Mon, 6 May 2013 17:30:51 +0300
Timo Sirainen  wrote:

> 
> Not related to replication, but yeah, probably better to just ignore
> nonexistent mailboxes. Changed in hg.
> 

ah, sorry, I thought "Syncing mailbox" meant "dsync". 
Anyway, thanks for the fix!

-- 
message transmitted on 100% recycled electrons


Re: [Dovecot] doveadm search causes replication error message

2013-05-06 Thread Timo Sirainen
On 25.4.2013, at 11.51, Oli Schacher  wrote:

> # 2.2.1 (83d83f55e5c2+) / dsync replicated setup
> 
> I just noticed that 'doveadm search' apparently tries to replicate
> mailboxes and spits out errors if a mailbox in the search query is not
> found:
> 
> #doveadm search -u u...@example.com mailbox Spamreport
> doveadm(u...@example.com): Error: Syncing mailbox Spamreport
> failed: Mailbox doesn't exist: Spamreport
> 
> this is especially problematic with -A searches as this causes a error
> message for every user which doesn't have that folder.
> Is this a bug or intended behaviour? Should I just 2>/dev/null these
> errors in doveadm scripts?

Not related to replication, but yeah, probably better to just ignore 
nonexistent mailboxes. Changed in hg.



[Dovecot] doveadm search causes replication error message

2013-04-25 Thread Oli Schacher
Hi

# 2.2.1 (83d83f55e5c2+) / dsync replicated setup

I just noticed that 'doveadm search' apparently tries to replicate
mailboxes and spits out errors if a mailbox in the search query is not
found:

#doveadm search -u u...@example.com mailbox Spamreport
doveadm(u...@example.com): Error: Syncing mailbox Spamreport
failed: Mailbox doesn't exist: Spamreport

this is especially problematic with -A searches as this causes a error
message for every user which doesn't have that folder.
Is this a bug or intended behaviour? Should I just 2>/dev/null these
errors in doveadm scripts?

Thanks
Oli
-- 
message transmitted on 100% recycled electrons


Re: [Dovecot] doveadm mailbox list/stats etc. and shared mailboxes/ACLs

2013-04-04 Thread Timo Sirainen
On 5.4.2013, at 0.48, Lutz Preßler  wrote:

>>> Only user1.test and user1.test.test2 have ACLs that allow testuser to access
>>> them.
>>> 
>>> host:~# doveadm mailbox status -u testuser all INBOX.shared.user1.privat
>>> INBOX.shared.user1.privat messages=37 recent=0 uidnext=70 
>>> uidvalidity=1060291494 unseen=7 highestmodseq=1 vsize=1618757 
>>> guid=9a71cb399c249d4ce10ec93908ca
>>> 
>>> Access with search and fetch (and probably any other doveadm command) is
>>> possible, too.
>>> Is this how it's supposed to work? Commands in testuser IMAP session
>>> respects ACLs.
>> 
>> My guess: You have acl plugin enabled in protocol imap {}, but not globally?
> No. It's enabled in global mail_plugins:

Oh. Hmm. Yeah, looks like doveadm nowadays ignores ACLs when listing mailboxes. 
It probably shouldn't.. I'll need to think about this. Wonder why I added the 
RAW_LIST flag in the first place..



Re: [Dovecot] doveadm mailbox list/stats etc. and shared mailboxes/ACLs

2013-04-04 Thread Lutz Preßler
Hello Timo,
On Thu, 04 Apr 2013, Timo Sirainen wrote:

> On 2.4.2013, at 15.37, Lutz Preßler  wrote:
> 
> > Only user1.test and user1.test.test2 have ACLs that allow testuser to access
> > them.
> > 
> > host:~# doveadm mailbox status -u testuser all INBOX.shared.user1.privat
> > INBOX.shared.user1.privat messages=37 recent=0 uidnext=70 
> > uidvalidity=1060291494 unseen=7 highestmodseq=1 vsize=1618757 
> > guid=9a71cb399c249d4ce10ec93908ca
> > 
> > Access with search and fetch (and probably any other doveadm command) is
> > possible, too.
> > Is this how it's supposed to work? Commands in testuser IMAP session
> > respects ACLs.
> 
> My guess: You have acl plugin enabled in protocol imap {}, but not globally?
No. It's enabled in global mail_plugins:
mail_plugins = " virtual acl zlib notify mail_log quota listescape stats fts 
fts_lucene mailbox_alias"
imap_acl only in protocol imap, of course.

Lutz


Re: [Dovecot] doveadm mailbox list/stats etc. and shared mailboxes/ACLs

2013-04-04 Thread Timo Sirainen
On 2.4.2013, at 15.37, Lutz Preßler  wrote:

> Only user1.test and user1.test.test2 have ACLs that allow testuser to access
> them.
> 
> host:~# doveadm mailbox status -u testuser all INBOX.shared.user1.privat
> INBOX.shared.user1.privat messages=37 recent=0 uidnext=70 
> uidvalidity=1060291494 unseen=7 highestmodseq=1 vsize=1618757 
> guid=9a71cb399c249d4ce10ec93908ca
> 
> Access with search and fetch (and probably any other doveadm command) is
> possible, too.
> Is this how it's supposed to work? Commands in testuser IMAP session
> respects ACLs.

My guess: You have acl plugin enabled in protocol imap {}, but not globally?



[Dovecot] doveadm mailbox list/stats etc. and shared mailboxes/ACLs

2013-04-02 Thread Lutz Preßler
Hello,

2.2.0rc3:

host:~# doveadm mailbox list -u testuser
INBOX
INBOX.test
INBOX.bla
INBOX.bla.blubb
INBOX.shared
INBOX.virtual
INBOX.shared.user1
INBOX.shared.user1.privat
INBOX.shared.user1.test
INBOX.shared.user1.test.test2
INBOX.shared.user1.Trash
INBOX.shared.user1.in2009
[... all mailboxes of user1]

Only user1.test and user1.test.test2 have ACLs that allow testuser to access
them.

host:~# doveadm mailbox status -u testuser all INBOX.shared.user1.privat
INBOX.shared.user1.privat messages=37 recent=0 uidnext=70 
uidvalidity=1060291494 unseen=7 highestmodseq=1 vsize=1618757 
guid=9a71cb399c249d4ce10ec93908ca

Access with search and fetch (and probably any other doveadm command) is
possible, too.
Is this how it's supposed to work? Commands in testuser IMAP session
respects ACLs.

Lutz


Re: [Dovecot] doveadm with multiple commands

2013-03-25 Thread Timo Sirainen
On Mon, 2012-09-24 at 23:24 +0200, Daniel Parthey wrote:
> > >> Timo Sirainen wrote:
> > >>> doveadm multi [-A | -u wildcards]   
> > >>> [  [...]]
..
> Ok, so how about "batch"?
> 
> It reads a series of commands and collects them into
> one "batch job" which is then carried out.

Added this finally :) http://hg.dovecot.org/dovecot-2.1/rev/8cc28a5a3f4f

I was also considering using just another parameter to existing commands
to specify the separator, but it was a bit more difficult to implement.
Also I couldn't figure out any good parameter letter that wasn't already
in use.




Re: [Dovecot] doveadm password check

2013-03-11 Thread Thomas Pries

Hi,

On 11.03.2013 22:41, Pascal Volk wrote:

On 03/11/2013 08:20 PM Thomas Pries wrote:


I expected an "ok" ...


Usage would be:
doveadm pw -t 
'{BLF-CRYPT}$2a$05$W82/Vw4ZEcHBC00M8cNwe.g8fOHuAeV7L5Q/q4W6VWl9V5kjoiz8y'

Your shell expands $2a and $05$W8… to empty strings


Thanks, sometimes it is hard to see the wood for the trees :-).




Re: [Dovecot] doveadm password check

2013-03-11 Thread Pascal Volk
On 03/11/2013 08:20 PM Thomas Pries wrote:
> Hi,
> 
> I want to write some php code that users can change there dovecot 
> password via a roundcube plugin. I'm using php function crypt(...) to 
> generate the hashes and everything works well so far.
> 
> 
> I'm using doveadm pw to generate testhashes e.g.:
> 
> srv:~ # doveadm pw -r 5 -s BLF-CRYPT -p abc
> {BLF-CRYPT}$2a$05$W82/Vw4ZEcHBC00M8cNwe.g8fOHuAeV7L5Q/q4W6VWl9V5kjoiz8y
> 
> I expected an "ok" when using -t the hash when entering abc as a 
> password, but I got:
> 
> srv:~ # doveadm pw -r 5 -s BLF-CRYPT -t 
> \{BLF-CRYPT}$2a$05$W82/Vw4ZEcHBC00M8cNwe.g8fOHuAeV7L5Q/q4W6VWl9V5kjoiz8y
> Enter password to verify:
> doveadm(root): Fatal: reverse password verification check failed: 
> Password mismatch
> 
> What went wrong?

Usage would be:
doveadm pw -t 
'{BLF-CRYPT}$2a$05$W82/Vw4ZEcHBC00M8cNwe.g8fOHuAeV7L5Q/q4W6VWl9V5kjoiz8y'

Your shell expands $2a and $05$W8… to empty strings. Therefore you
should single quotes around strings that contains the dollar sign.


Regards,
Pascal
-- 
The trapper recommends today: cafebabe.1307...@localdomain.org


Re: [Dovecot] doveadm password check

2013-03-11 Thread Professa Dementia

On 3/11/2013 12:20 PM, Thomas Pries wrote:

Hi,

I want to write some php code that users can change there dovecot
password via a roundcube plugin. I'm using php function crypt(...) to
generate the hashes and everything works well so far.


I'm using doveadm pw to generate testhashes e.g.:

srv:~ # doveadm pw -r 5 -s BLF-CRYPT -p abc
{BLF-CRYPT}$2a$05$W82/Vw4ZEcHBC00M8cNwe.g8fOHuAeV7L5Q/q4W6VWl9V5kjoiz8y

I expected an "ok" when using -t the hash when entering abc as a
password, but I got:

srv:~ # doveadm pw -r 5 -s BLF-CRYPT -t
\{BLF-CRYPT}$2a$05$W82/Vw4ZEcHBC00M8cNwe.g8fOHuAeV7L5Q/q4W6VWl9V5kjoiz8y
Enter password to verify:
doveadm(root): Fatal: reverse password verification check failed:
Password mismatch


There are several bugs dealing with what you are doing.  They are 
currently in the works and will be fixed in a future release of Dovecot.


1) Crypt hashes should not have the {...} prefix.  The $2a$ is the 
prefix that specifies the Eksblowfish crypt hash, just like $1$ 
specifies the MD5 crypt hash.  doveadm blindly puts the {...} in front 
of all hashes, which is a bug.  When the program goes to verify the 
hash, it passes the entire string including the {...} part to crypt, 
which fails, since it does not know what to do with it.


2) The Eksblowfish hash (the $2a$) was originally written on OpenBSD by 
Niels Provos and David Mazières and was called Bcrypt (Bcrypt is the 
correct name, not BLF-CRYPT as is used in Dovecot).  It was rewritten by 
Alexander Peslyak.  This rewritten version became more popular with 
Linux distros.  This version, however, turned out to have a bug, which 
Peslyak later fixed, but it means that $2a$ hashes were incompatible 
based on which library they used: the original OpenBSD, or the buggy 
Peslyak one.  A new hash type, $2y was used to specify the correct hash. 
 Even OpenBSD switched to the new system to maintain compatibility, 
even though their original libraries were correct.


Depending on whether your Eksblowfish (Bcrypt) libraries have been 
updated or not, there could be a problem with the $2a$ hash.


First try to remove the {BLF-CRYPT} from your hash.  It is not needed, 
and may be enough for it to verify.  If it still does not verify, then 
you may have an issue with your crypt libraries.  You might, then try 
changing the $2a$ to $2y$ and see if that makes the Eksblowfish 
libraries happy.


Dem



[Dovecot] doveadm password check

2013-03-11 Thread Thomas Pries

Hi,

I want to write some php code that users can change there dovecot 
password via a roundcube plugin. I'm using php function crypt(...) to 
generate the hashes and everything works well so far.



I'm using doveadm pw to generate testhashes e.g.:

srv:~ # doveadm pw -r 5 -s BLF-CRYPT -p abc
{BLF-CRYPT}$2a$05$W82/Vw4ZEcHBC00M8cNwe.g8fOHuAeV7L5Q/q4W6VWl9V5kjoiz8y

I expected an "ok" when using -t the hash when entering abc as a 
password, but I got:


srv:~ # doveadm pw -r 5 -s BLF-CRYPT -t 
\{BLF-CRYPT}$2a$05$W82/Vw4ZEcHBC00M8cNwe.g8fOHuAeV7L5Q/q4W6VWl9V5kjoiz8y

Enter password to verify:
doveadm(root): Fatal: reverse password verification check failed: 
Password mismatch


What went wrong?

Kind Regards
Thomas




Re: [Dovecot] doveadm search not showing expected results

2013-02-26 Thread btb

On Feb 25, 2013, at 01.45, Timo Sirainen  wrote:

> On 25.2.2013, at 4.50, b...@bitrate.net wrote:
> 
>> i'm running doveadm search:
>> 
>>> doveadm search -A mailbox sent savedbefore 365d
>>> 
>> 
>> and it's returning no results.
>> 
>> a similar command does return some results:
>> 
>>> doveadm search -A mailbox sent savedbefore 120d | grep -iF 'jdoe'
>> jdoe 7b9a8b0b7d37504fe72c55e4fe9a 65
>> jdoe 7b9a8b0b7d37504fe72c55e4fe9a 66
> ..
>> 
>> however, i see many messages in the sent mailbox much older than 365 days:
> 
> Note that Dovecot has 3 timestamps:
> 
> * sent date : The Date: header
> * received date : In maildir the file's mtime
> * save date : In maildir either in dovecot.index.cache or the file's ctime

thanks, this clarifies things for me.

ultimately, this question comes in the context of expunging messages older 
[fsvo older, as per the above metrics] than a certain age.  is doveadm expunge 
[...] generally considered the appropriate method for such a task?  presumably 
via a cron job?

-ben



Re: [Dovecot] doveadm search not showing expected results

2013-02-24 Thread Timo Sirainen
On 25.2.2013, at 4.50, b...@bitrate.net wrote:

> i'm running doveadm search:
> 
>> doveadm search -A mailbox sent savedbefore 365d
>> 
> 
> and it's returning no results.
> 
> a similar command does return some results:
> 
>> doveadm search -A mailbox sent savedbefore 120d | grep -iF 'jdoe'
> jdoe 7b9a8b0b7d37504fe72c55e4fe9a 65
> jdoe 7b9a8b0b7d37504fe72c55e4fe9a 66
..
> 
> however, i see many messages in the sent mailbox much older than 365 days:

Note that Dovecot has 3 timestamps:

 * sent date : The Date: header
 * received date : In maildir the file's mtime
 * save date : In maildir either in dovecot.index.cache or the file's ctime

The idea behind save date is that it gets reset when message is copied to 
another mailbox. (So e.g. if you want to delete all mails in Trash that were 
saved there over one week ago, you wouldn't want them to be deleted immediately 
because the message was received 2 years ago.)

> i do see these older messages properly listed and viewable in my imap client. 
>  how can i figure out what i'm doing wrong, and troubleshoot why doveadm 
> doesn't seem to consider these message as matching?

Look at their save dates:

doveadm fetch -u jdoe 'date.save' all

If you want to search by received date, use "before" instead of "savedbefore".



[Dovecot] doveadm search not showing expected results

2013-02-24 Thread btb
i'm running doveadm search:

>doveadm search -A mailbox sent savedbefore 365d
>

and it's returning no results.

a similar command does return some results:

>doveadm search -A mailbox sent savedbefore 120d | grep -iF 'jdoe'
jdoe 7b9a8b0b7d37504fe72c55e4fe9a 65
jdoe 7b9a8b0b7d37504fe72c55e4fe9a 66
jdoe 7b9a8b0b7d37504fe72c55e4fe9a 67
jdoe 7b9a8b0b7d37504fe72c55e4fe9a 68
jdoe 7b9a8b0b7d37504fe72c55e4fe9a 69
jdoe 7b9a8b0b7d37504fe72c55e4fe9a 70
jdoe 7b9a8b0b7d37504fe72c55e4fe9a 71
jdoe 7b9a8b0b7d37504fe72c55e4fe9a 72
jdoe 7b9a8b0b7d37504fe72c55e4fe9a 73
jdoe 7b9a8b0b7d37504fe72c55e4fe9a 74
[...]

however, i see many messages in the sent mailbox much older than 365 days:

>l ~jdoe/mail/Maildir/.sent/cur/
total 82M
-rw--- 1 jdoe jdoe  411 Jul 12  2011 
1310503747.M652859P14078.flip,S=411,W=423:2,S
-rw--- 1 jdoe jdoe  515 Jul 12  2011 
1310523810.M800998P5307.flip,S=515,W=530:2,Sgh
-rw--- 1 jdoe jdoe 1.4K Jul 17  2011 
1310922140.M604706P14587.flip,S=1339,W=1378:2,Sgh
-rw--- 1 jdoe jdoe 2.7K Jul 17  2011 
1310955899.M58727P3373.flip,S=2731,W=2814:2,Sgh
-rw--- 1 jdoe jdoe 4.1K Jul 18  2011 
1311032789.M471208P19367.flip,S=4162,W=4284:2,Sgh
-rw--- 1 jdoe jdoe  451 Jul 22  2011 
1311363858.M21157P19993.flip,S=451,W=464:2,Sgh
-rw--- 1 jdoe jdoe  461 Jul 23  2011 
1311436347.M315008P29267.flip,S=461,W=474:2,Sgh
-rw--- 1 jdoe jdoe 1.6K Jul 26  2011 
1311731312.M902135P25749.flip,S=1607,W=1655:2,Sgh
-rw--- 1 jdoe jdoe  888 Jul 31  2011 
1312161704.M81319P3943.flip,S=888,W=911:2,Sgh
-rw--- 1 jdoe jdoe  676 Aug  4  2011 
1312512384.M809375P3684.flip,S=676,W=692:2,Sgh
-rw--- 1 jdoe jdoe  556 Aug  6  2011 
1312669537.M83P18243.flip,S=556,W=571:2,Sgh
-rw--- 1 jdoe jdoe 1.8K Aug  7  2011 
1312737844.M921026P22678.flip,S=1769,W=1817:2,RSgh
-rw--- 1 jdoe jdoe 2.5K Aug  8  2011 
1312842718.M632088P24434.flip,S=2489,W=2559:2,Sgh
-rw--- 1 jdoe jdoe 2.3K Aug 10  2011 
1312997501.M29900P8705.flip,S=2254,W=2306:2,RSghi
-rw--- 1 jdoe jdoe 1.2K Aug 10  2011 
1312998375.M806199P8705.flip,S=1200,W=1223:2,S
-rw--- 1 jdoe jdoe 2.8K Aug 10  2011 
1312998687.M179687P8705.flip,S=2857,W=2931:2,S
-rw--- 1 jdoe jdoe 1.9K Aug 10  2011 
1313017076.M909199P8264.flip,S=1889,W=1941:2,Sgh
-rw--- 1 jdoe jdoe 2.8K Aug 12  2011 
1313172631.M470122P23201.flip,S=2822,W=2895:2,RSgh
-rw--- 1 jdoe jdoe 3.3K Aug 16  2011 
1313502988.M870415P19669.flip,S=,W=3413:2,RSghi
-rw--- 1 jdoe jdoe 3.4K Aug 16  2011 
1313523978.M484997P19669.flip,S=3447,W=3534:2,S
-rw--- 1 jdoe jdoe  939 Aug 16  2011 
1313545488.M796759P21368.flip,S=939,W=968:2,Sgh
-rw--- 1 jdoe jdoe 3.9K Aug 17  2011 
1313600016.M183385P25953.flip,S=3989,W=4092:2,S
-rw--- 1 jdoe jdoe 1.3K Aug 22  2011 
1314028430.M280232P10201.flip,S=1291,W=1326:2,S
-rw--- 1 jdoe jdoe  943 Aug 22  2011 
1314067361.M643189P1408.flip,S=943,W=967:2,Sgh
-rw--- 1 jdoe jdoe 1.1K Aug 23  2011 
1314114645.M26643P14083.flip,S=1108,W=1142:2,S
-rw--- 1 jdoe jdoe  932 Aug 24  2011 
1314237640.M473097P22476.flip,S=932,W=954:2,Sgh
-rw--- 1 jdoe jdoe 5.8K Sep  1  2011 
1314900538.M22534P26553.flip,S=5851,W=5976:2,Sgh
[...]
-rw--- 1 jdoe jdoe  423 Feb 17 13:00 
1361124040.M492223P13245.xenon,S=423,W=436:2,Sab
-rw--- 1 jdoe jdoe  423 Feb 17 13:02 
1361124143.M127879P13245.xenon,S=423,W=436:2,Sab
-rw--- 1 jdoe jdoe  412 Feb 17 14:13 
1361128391.M812807P13644.xenon,S=412,W=425:2,Sab
-rw--- 1 jdoe jdoe 1.6K Feb 18 21:12 
1361239930.M525334P20966.xenon,S=1621,W=1660:2,Sab
-rw--- 1 jdoe jdoe  422 Feb 19 20:53 
1361325222.M901235P32184.xenon,S=422,W=435:2,Sab
-rw--- 1 jdoe jdoe 1.8K Feb 19 21:06 
1361325990.M129075P32180.xenon,S=1818,W=1864:2,Sab
-rw--- 1 jdoe jdoe  424 Feb 19 21:13 
1361326428.M381244P32180.xenon,S=424,W=437:2,Sab
-rw--- 1 jdoe jdoe  424 Feb 19 21:22 
1361326968.M84809P32180.xenon,S=424,W=437:2,Sab
-rw--- 1 jdoe jdoe  424 Feb 19 21:24 
1361327050.M328090P32180.xenon,S=424,W=437:2,Sab
-rw--- 1 jdoe jdoe  424 Feb 19 21:25 
1361327139.M963578P32180.xenon,S=424,W=437:2,Sab
-rw--- 1 jdoe jdoe 1.3K Feb 20 08:23 
1361366627.M318860P22786.xenon,S=1230,W=1260:2,S
-rw--- 1 jdoe jdoe 3.0K Feb 20 10:44 
1361375042.M340353P5202.xenon,S=3019,W=3082:2,S
-rw--- 1 jdoe jdoe 1.1K Feb 21 09:09 
1361455754.M925454P13135.xenon,S=1025,W=1048:2,S
-rw--- 1 jdoe jdoe 1.4K Feb 21 11:18 
1361463526.M927071P13133.xenon,S=1344,W=1376:2,S
-rw--- 1 jdoe jdoe 1.6K Feb 23 11:14 
1361636078.M972572P18385.xenon,S=1636,W=1672:2,Sab
-rw--- 1 jdoe jdoe 1.5K Feb 23 11:26 
1361636803.M56491P18385.xenon,S=1490,W=1524:2,Sab
-rw--- 1 jdoe jdoe 2.2K Feb 24 14:25 
1361733929.M725648P18385.xenon,S=2178,W=2229:2,Sab
>

i do see these older messages properly listed and viewable in my imap client.  
how can i figure out what i'm doing wrong, and troubleshoot why doveadm doesn't 
seem to consider these message as matching?

thanks
-ben

Re: [Dovecot] doveadm user error messages

2013-02-22 Thread Thomas Leuxner
* Timo Sirainen  2013.02.22 14:35:

> > $ doveadm user foo
> > $ echo $?
> > 67
> 
> Fixed: http://hg.dovecot.org/dovecot-2.2/rev/bf817bc963f7

Looks good now. Thanks.


signature.asc
Description: Digital signature


Re: [Dovecot] doveadm user error messages

2013-02-22 Thread Timo Sirainen
On 27.1.2013, at 18.56, Thomas Leuxner  wrote:

> I use 'doveadm user' in some scripts and the exit codes are fine for my 
> purposes. During tests it transpired that Dovecot 2.1 would give an error 
> message when querying for non-existent users. Dovecot 2.2 just exits without 
> a word. Not sure this is intended behaviour:
> 
> $ doveadm user foo
> $ echo $?
> 67

Fixed: http://hg.dovecot.org/dovecot-2.2/rev/bf817bc963f7



Re: [Dovecot] doveadm -D quota get -u user

2013-02-16 Thread Robert Schetterer
Am 16.02.2013 17:27, schrieb Daniel Parthey:
> Hi Robert,
> 
> Robert Schetterer wrote:
>> dovecot --version
>> 2.1.12 (abcc9959b757)
>>
>> just running into problems with
>>
>> doveadm -D quota get -u user
>> doveadm(root): Fatal: Unknown command 'quota', but plugin quota exists.
>> Try to set mail_plugins=quota
>>
>> should mail_plugins=quota really be set ?
> 
> Sure, at least in the global setting,
> might be different for protocol imap or protocol lmtp.
> 
> http://wiki2.dovecot.org/Tools/Doveadm/Quota
> 
> The quota get and quota recalc commands are only available when the global
> mail_plugins setting contains the quota plugin.

guilty, thx , i overread this
it works now

> 
> Regards
> Daniel
> 



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, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Joerg Heidrich


Re: [Dovecot] doveadm -D quota get -u user

2013-02-16 Thread Daniel Parthey
Hi Robert,

Robert Schetterer wrote:
> dovecot --version
> 2.1.12 (abcc9959b757)
>
> just running into problems with
> 
> doveadm -D quota get -u user
> doveadm(root): Fatal: Unknown command 'quota', but plugin quota exists.
> Try to set mail_plugins=quota
> 
> should mail_plugins=quota really be set ?

Sure, at least in the global setting,
might be different for protocol imap or protocol lmtp.

http://wiki2.dovecot.org/Tools/Doveadm/Quota

The quota get and quota recalc commands are only available when the global
mail_plugins setting contains the quota plugin.

Regards
Daniel
-- 
https://plus.google.com/103021802792276734820


[Dovecot] doveadm -D quota get -u user

2013-02-16 Thread Robert Schetterer
Hi Timo,

just running into problems with

doveadm -D quota get -u user


doveadm(root): Debug: Loading modules from directory:
/usr/lib/dovecot/modules
doveadm(root): Debug: Module loaded:
/usr/lib/dovecot/modules/lib01_acl_plugin.so
doveadm(root): Debug: Module loaded:
/usr/lib/dovecot/modules/lib15_notify_plugin.so
doveadm(root): Debug: Module loaded:
/usr/lib/dovecot/modules/lib20_autocreate_plugin.so
doveadm(root): Debug: Module loaded:
/usr/lib/dovecot/modules/lib20_expire_plugin.so
doveadm(root): Debug: Module loaded:
/usr/lib/dovecot/modules/lib20_fts_plugin.so
doveadm(root): Debug: Module loaded:
/usr/lib/dovecot/modules/lib20_listescape_plugin.so
doveadm(root): Debug: Module loaded:
/usr/lib/dovecot/modules/lib20_mail_log_plugin.so
doveadm(root): Debug: Module loaded:
/usr/lib/dovecot/modules/lib20_virtual_plugin.so
doveadm(root): Debug: Module loaded:
/usr/lib/dovecot/modules/lib20_zlib_plugin.so
doveadm(root): Debug: Module loaded:
/usr/lib/dovecot/modules/lib21_fts_lucene_plugin.so
doveadm(root): Debug: Loading modules from directory:
/usr/lib/dovecot/modules/doveadm
doveadm(root): Debug: Module loaded:
/usr/lib/dovecot/modules/doveadm/lib10_doveadm_acl_plugin.so
doveadm(root): Debug: Module loaded:
/usr/lib/dovecot/modules/doveadm/lib10_doveadm_expire_plugin.so
doveadm(root): Debug: Skipping module doveadm_quota_plugin, because
dlopen() failed:
/usr/lib/dovecot/modules/doveadm/lib10_doveadm_quota_plugin.so:
undefined symbol: quota_user_module (this is usually intentional, so
just ignore this message)
doveadm(root): Debug: Module loaded:
/usr/lib/dovecot/modules/doveadm/lib10_doveadm_zlib_plugin.so
doveadm(root): Debug: Module loaded:
/usr/lib/dovecot/modules/doveadm/lib20_doveadm_fts_lucene_plugin.so
doveadm(root): Debug: Module loaded:
/usr/lib/dovecot/modules/doveadm/lib20_doveadm_fts_plugin.so
doveadm(root): Fatal: Unknown command 'quota', but plugin quota exists.
Try to set mail_plugins=quota

should mail_plugins=quota really be set ?


dovecot --version
2.1.12 (abcc9959b757)

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, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Joerg Heidrich


Re: [Dovecot] doveadm migration: Warning: I/O leak

2013-01-28 Thread Gedalya

On 01/29/2013 12:00 AM, Gedalya wrote:

On 01/28/2013 11:55 PM, Gedalya wrote:

This seems to be happening only when using the pop3c plugin.

I meant the pop3_migration plugin.


# dovecot -n
# 2.1.13 (99b7be36631b): /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-686-pae i686 Debian 7.0
auth_default_realm = x.com
auth_mechanisms = plain login cram-md5
auth_verbose = yes
auth_verbose_passwords = plain
default_client_limit = 8096
dict {
  expire = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
disable_plaintext_auth = no
imapc_host = mail01.x.com
mail_gid = vmail
mail_plugins = quota expire listescape
mail_prefetch_count = 50
mail_uid = vmail
namespace {
  hidden = yes
  list = no
  location = pop3c:
  prefix = POP3-MIGRATION-NS/
}
namespace inbox {
  inbox = yes
  location =
  prefix =
  separator = /
  type = private
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  expire = Trash
  expire2 = Trash.*
  expire3 = Junk
  expire_dict = proxy::expire
  pop3_migration_mailbox = POP3-MIGRATION-NS/INBOX
  quota = dict:user::proxy::quota
  quota_rule = *:storage=2G
  quota_rule2 = Trash:storage=+250M
  quota_rule3 = Junk:ignore
  sieve = ~/.dovecot.sieve
  sieve_before = /var/local/lib/dovecot/sieve/global/fileinto-spam.sieve
  sieve_dir = ~/sieve
}
pop3c_host = 111.111.111.111
postmaster_address = postmas...@x.com
service auth-worker {
  user = $default_internal_user
}
service auth {
  client_limit = 20480
}
service dict {
  unix_listener dict {
mode = 0600
user = vmail
  }
}
service imap-login {
  process_min_avail = 4
  service_count = 0
  vsz_limit = 128 M
}
service imap {
  process_limit = 10240
}
service lmtp {
  inet_listener lmtp {
address = 0.0.0.0
port = 7025
  }
}
service pop3-login {
  process_min_avail = 4
  service_count = 0
  vsz_limit = 128 M
}
service pop3 {
  process_limit = 4096
}
ssl_cert = 

Re: [Dovecot] doveadm migration: Warning: I/O leak

2013-01-28 Thread Gedalya

On 01/28/2013 11:55 PM, Gedalya wrote:

This seems to be happening only when using the pop3c plugin.

I meant the pop3_migration plugin.



[Dovecot] doveadm migration: Warning: I/O leak

2013-01-28 Thread Gedalya

This seems to be happening only when using the pop3c plugin. Any advice?

root@imap01:/etc/dovecot# doveadm -D -o imapc_user=chat_l...@xx.com 
-o 'imapc_password=***' -o pop3c_user=chat_l...@xx.com -o 
'pop3c_password=*' backup -u chat_l...@xx.com -R imapc:
doveadm(root): Debug: Loading modules from directory: 
/usr/lib/dovecot/modules
doveadm(root): Debug: Module loaded: 
/usr/lib/dovecot/modules/lib10_quota_plugin.so
doveadm(root): Debug: Module loaded: 
/usr/lib/dovecot/modules/lib20_expire_plugin.so
doveadm(root): Debug: Module loaded: 
/usr/lib/dovecot/modules/lib20_listescape_plugin.so
doveadm(root): Debug: Loading modules from directory: 
/usr/lib/dovecot/modules/doveadm
doveadm(root): Debug: Skipping module doveadm_acl_plugin, because 
dlopen() failed: 
/usr/lib/dovecot/modules/doveadm/lib10_doveadm_acl_plugin.so: undefined 
symbol: acl_user_module (this is usually intentional, so just ignore 
this message)
doveadm(root): Debug: Module loaded: 
/usr/lib/dovecot/modules/doveadm/lib10_doveadm_expire_plugin.so
doveadm(root): Debug: Module loaded: 
/usr/lib/dovecot/modules/doveadm/lib10_doveadm_quota_plugin.so
doveadm(root): Debug: Skipping module doveadm_zlib_plugin, because 
dlopen() failed: 
/usr/lib/dovecot/modules/doveadm/lib10_doveadm_zlib_plugin.so: undefined 
symbol: i_stream_create_deflate (this is usually intentional, so just 
ignore this message)
doveadm(root): Debug: Skipping module doveadm_fts_plugin, because 
dlopen() failed: 
/usr/lib/dovecot/modules/doveadm/lib20_doveadm_fts_plugin.so: undefined 
symbol: fts_list_backend (this is usually intentional, so just ignore 
this message)
doveadm(chat_l...@xx.com): Debug: Added userdb setting: 
mail=maildir:/stor/real/domains/xx.com/ch/chat_logs/Maildir
doveadm(chat_l...@xx.com): Debug: Added userdb setting: 
plugin/quota_rule=*:storage=5120M
doveadm(chat_l...@xx.com): Debug: Effective uid=1001, gid=1001, 
home=/stor/real/domains/xx.com/ch/chat_logs
doveadm(chat_l...@xx.com): Debug: Home dir not found: 
/stor/real/domains/xx.com/ch/chat_logs
doveadm(chat_l...@xx.com): Debug: Namespace : type=private, 
prefix=POP3-MIGRATION-NS/, sep=, inbox=no, hidden=yes, list=no, 
subscriptions=yes location=pop3c:
doveadm(chat_l...@xx.com): Debug: fs: root=, index=, control=, 
inbox=, alt=
doveadm(chat_l...@xx.com): Debug: Namespace inbox: type=private, 
prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes 
location=maildir:/stor/real/domains/xx.com/ch/chat_logs/Maildir
doveadm(chat_l...@xx.com): Debug: maildir++: 
root=/stor/real/domains/xx.com/ch/chat_logs/Maildir, index=, 
control=, inbox=/stor/real/domains/xx.com/ch/chat_logs/Maildir, alt=
doveadm(chat_l...@xx.com): Debug: Namespace : 
/stor/real/domains/xx.com/ch/chat_logs/Maildir doesn't exist yet, 
using default permissions
doveadm(chat_l...@xx.com): Debug: Namespace : Using permissions from 
/stor/real/domains/xx.com/ch/chat_logs/Maildir: mode=0700 gid=-1
dsync(chat_l...@xx.com): Debug: Effective uid=1001, gid=1001, 
home=/stor/real/domains/xx.com/ch/chat_logs
dsync(chat_l...@xx.com): Debug: Namespace : type=private, 
prefix=POP3-MIGRATION-NS/, sep=, inbox=no, hidden=yes, list=no, 
subscriptions=yes location=pop3c:
dsync(chat_l...@xx.com): Debug: fs: root=, index=, control=, inbox=, 
alt=
dsync(chat_l...@xx.com): Debug: Namespace inbox: type=private, 
prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes 
location=imapc:
dsync(chat_l...@xx.com): Debug: imapc: root=, index=, control=, 
inbox=, alt=
dsync(chat_l...@xx.com): Debug: imapc(mail01.xx.com:143): 
Looking up IP address
dsync(chat_l...@xx.com): Debug: imapc(mail01.xx.com:143): 
Connecting to 111.111.111.111:143
dsync(chat_l...@xx.com): Debug: imapc(mail01.xx.com:143): Server 
capabilities: IMAP4rev1 NAMESPACE LITERAL+ UIDPLUS IDLE COMPARATOR 
AUTH=LOGIN AUTH=NTLM AUTH=SCRAM-MD5 AUTH=CRAM-MD5
dsync(chat_l...@xx.com): Debug: imapc(mail01.xx.com:143): 
Authenticating as chat_l...@xx.com
dsync(chat_l...@xx.com): Debug: imapc(mail01.xx.com:143): 
Authenticated successfully
dsync(chat_l...@xx.com): Debug: Namespace : 
/stor/real/domains/xx.com/ch/chat_logs/Maildir/.Sent Items doesn't 
exist yet, using default permissions
dsync(chat_l...@xx.com): Debug: Namespace : Using permissions from 
/stor/real/domains/xx.com/ch/chat_logs/Maildir: mode=0700 gid=-1
dsync(chat_l...@xx.com): Info: Sent Items: only in source 
(guid=34b8141947b9372e94589bd35a54dac5)
dsync(chat_l...@xx.com): Info: INBOX: only in source 
(guid=c92f64f79f0d1ed01e6d5b314f04886c)
dsync(chat_l...@xx.com): Debug: imapc(mail01.xx.com:143): 
Looking up IP address
dsync(chat_l...@xx.com): Debug: imapc(mail01.xx.com:143): 
Connecting to 111.111.111.111:143
dsync(chat_l...@xx.com): Debug: imapc(mail01.xx.com:143): Server 
capabilitie

[Dovecot] doveadm user error messages

2013-01-27 Thread Thomas Leuxner
I use 'doveadm user' in some scripts and the exit codes are fine for my 
purposes. During tests it transpired that Dovecot 2.1 would give an error 
message when querying for non-existent users. Dovecot 2.2 just exits without a 
word. Not sure this is intended behaviour:

$ doveadm user foo
$ echo $?
67

$ id foo
id: foo: No such user

Regards
Thomas


signature.asc
Description: Digital signature


Re: [Dovecot] doveadm acl recalc (was Re: v2.1.11 soon)

2013-01-14 Thread Timo Sirainen
On Wed, 2012-11-28 at 10:42 +0100, Steffen Kaiser wrote:
> On Tue, 27 Nov 2012, Timo Sirainen wrote:
> 
> > Just to let you know: I'm planning on releasing v2.1.11 today/tomorrow. 
> > If you wish to get something fixed for it, ask quickly. :)
> 
> doveadm acl recalc -u user
> 
> to update ACL backend information with user's dovecot-acl files.

Here: http://hg.dovecot.org/dovecot-2.1/rev/6bee6d0c611f




Re: [Dovecot] doveadm backup issue with ACL plugin enabled

2013-01-04 Thread Timo Sirainen
On 5.1.2013, at 0.50, Thomas Leuxner  wrote:

> Am 04.01.2013 um 22:38 schrieb Timo Sirainen :
> 
>> Yeah.. I guess dsync will need to handle them. I've thought about this
>> for a few years and always thought "hopefully I won't need to implement
>> that soon". :)
> 
> One of the steps surely beneficial to this would be implementing single file 
> ACLs with wildcards (as discussed some time ago). This would take away the 
> headache many ACL files per user would give...

That was only meant for global ACLs, not for per-user dovecot-acl files.



Re: [Dovecot] doveadm backup issue with ACL plugin enabled

2013-01-04 Thread Thomas Leuxner
Am 04.01.2013 um 22:38 schrieb Timo Sirainen :

> Yeah.. I guess dsync will need to handle them. I've thought about this
> for a few years and always thought "hopefully I won't need to implement
> that soon". :)

One of the steps surely beneficial to this would be implementing single file 
ACLs with wildcards (as discussed some time ago). This would take away the 
headache many ACL files per user would give...

signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Dovecot] doveadm backup issue with ACL plugin enabled

2013-01-04 Thread Timo Sirainen
On Fri, 2013-01-04 at 12:19 +0100, Thomas Leuxner wrote:
> Am 04.01.2013 um 04:30 schrieb Timo Sirainen :
> 
> > http://hg.dovecot.org/dovecot-2.1/rev/721aba9128b9
> > 
> > I'll pull it to v2.2 among other changes today/tomorrow.
> 
> Thanks.  This makes me wonder what concept will be used for
> replicating/backing up ACLs going forward? Ideally those should also
> be part of the backup and sync to other sites, right?

Yeah.. I guess dsync will need to handle them. I've thought about this
for a few years and always thought "hopefully I won't need to implement
that soon". :)

v2.2 dsync protocol is extensible, although the code isn't so much.
Maybe v2.3 dsync could support plugins and the acl plugin could do the
syncing.. Or maybe simply hardcode dovecot-acl file syncing as "newest
timestamp wins".




  1   2   3   4   5   >