Re: devoid mailbox status for mail reloaded from a tape backup

2014-12-10 Thread Stephen Lidie

 On Dec 10, 2014, at 1:42 AM, Steffen Kaiser skdove...@smail.inf.fh-brs.de 
 wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On Tue, 9 Dec 2014, Stephen Lidie wrote:
 On Dec 9, 2014, at 11:00 AM, Steffen Kaiser skdove...@smail.inf.fh-brs.de 
 wrote:
 On Tue, 9 Dec 2014, Stephen Lidie wrote:
 On Dec 9, 2014, at 2:34 AM, Steffen Kaiser 
 skdove...@smail.inf.fh-brs.de wrote:
 On Mon, 8 Dec 2014, Stephen Lidie wrote:
 
 For me this is working, too:
 
 doveadm -o mail_location=maildir:/home/user2/Maildir mailbox status \
 -u user1 all INBOX
 
 Eureka!! The magic incantation snippet I was seeking :) I had tried, 
 variously, placing this simple string:
 
  
 mail_location=mdbox:/home/RESTORE/homeb/userName/mail:INDEX=/home/RESTORE/var/dovecot/index/userName
 
 So, where exactly did I fail to find -o documented?
 
 http://wiki2.dovecot.org/Tools/Doveadm
 - -o is a global option.
 
 Dovecot v2.2.15: man doveadm
 /-oENTER
 :-)
 
 man doveadm|egrep -i '\-o'
   -o setting=value
  ple settings, the -o option may be specified multiple times.
 
 However, I always wonder about the quoting [different shells behave 
 differently] and would use:
 
 man doveadm|egrep -i -- -o

The reason I did not see -o is because that option is NOT documented in the man 
pages for my dovecot installation, for whatever reason!  Either of our egreps 
would have found it if only it had been there :(

[root]# man doveadm|egrep -i '\-v'
   -v Enables verbosity, including progress counter.
[root]# man doveadm|egrep -i '\-o'
[root]# man doveadm|egrep -i -- -o
[root]# man doveadm|egrep -i -- -v
   -v Enables verbosity, including progress counter.
[root]# 

FWIW this is CentOS 7 with dovecot installed from an RPM:

[root]# yum list dovecot
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
 * base: linux.cc.lehigh.edu
 * epel: mirror.umd.edu
 * extras: mirror.es.its.nyu.edu
 * updates: mirrors.advancedhosters.com
Installed Packages
dovecot.x86_641:2.2.10-4.el7_0.1   @updates


thx/stv


Re: devoid mailbox status for mail reloaded from a tape backup

2014-12-10 Thread Teemu Huovila
On 12/10/2014 01:54 PM, Stephen Lidie wrote:
 The reason I did not see -o is because that option is NOT documented in the 
 man pages for my dovecot installation, for whatever reason!  Either of our 
 egreps would have found it if only it had been there :(
 
 [root]# man doveadm|egrep -i '\-v'
-v Enables verbosity, including progress counter.
 [root]# man doveadm|egrep -i '\-o'
 [root]# man doveadm|egrep -i -- -o
 [root]# man doveadm|egrep -i -- -v
-v Enables verbosity, including progress counter.
 [root]# 
 
 FWIW this is CentOS 7 with dovecot installed from an RPM:
 
 [root]# yum list dovecot
 Loaded plugins: fastestmirror, langpacks, versionlock
 Loading mirror speeds from cached hostfile
  * base: linux.cc.lehigh.edu
  * epel: mirror.umd.edu
  * extras: mirror.es.its.nyu.edu
  * updates: mirrors.advancedhosters.com
 Installed Packages
 dovecot.x86_641:2.2.10-4.el7_0.1   @updates
Documentation for -o was added recently, it is not even on the man-pages of the 
2.2.15 release.

br,
Teemu Huovila


Re: doveadm -A operations failing due to broken mdbox

2014-12-10 Thread Ralf Hildebrandt
* Pascal Volk dovecot@dovecot.org:

 Are you looking for a workaround like this?
 
 for user in `doveadm user \*`; do doveadm purge -u $user; done

Yeah!
-- 
[*] 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


Panic: file mail-index-sync-update.c: line 250 (sync_expunge_range): assertion failed: (count 0)

2014-12-10 Thread Ralf Hildebrandt
We're seeing this:

% doveadm force-resync -u USERNAME INBOX

doveadm(USERNAME): Panic: file mail-index-sync-update.c: line 250 
(sync_expunge_range): assertion failed: (count  0)
doveadm(USERNAME): Error: Raw backtrace: 
/usr/lib64/dovecot/libdovecot.so.0(+0x817ad) [0x33ab08317ad] - 
/usr/lib64/dovecot/libdovecot.so.0(default_fatal_handler+0x3a)
[0x33ab08318ba] - /usr/lib64/dovecot/libdovecot.so.0(i_fatal+0)
[0x33ab07d7570] - /usr/lib64/dovecot/libdovecot-storage.so.0(+0xced79) 
[0x33ab0b7ad79] - 
/usr/lib64/dovecot/libdovecot-storage.so.0(mail_index_sync_record+0xc67)
[0x33ab0b7ba07] - 
/usr/lib64/dovecot/libdovecot-storage.so.0(mail_index_sync_map+0x1a4)
[0x33ab0b7bdf4] - 
/usr/lib64/dovecot/libdovecot-storage.so.0(mail_index_map+0x15c)
[0x33ab0b6b70c] - /usr/lib64/dovecot/libdovecot-storage.so.0(+0xba44a) 
[0x33ab0b6644a] - /usr/lib64/dovecot/libdovecot-storage.so.0(+0xba5e8)
[0x33ab0b665e8] - 
/usr/lib64/dovecot/libdovecot-storage.so.0(mail_index_open+0x88)
[0x33ab0b666f8] - /usr/lib64/dovecot/libdovecot-storage.so.0(+0x45762)
[0x33ab0af1762] - 
/usr/lib64/dovecot/libdovecot-storage.so.0(mdbox_map_open_or_create+0x42)
[0x33ab0af1a92] - 
/usr/lib64/dovecot/libdovecot-storage.so.0(mdbox_storage_rebuild_in_context+0x10b)
[0x33ab0af839b] - 
/usr/lib64/dovecot/libdovecot-storage.so.0(mdbox_sync_begin+0x222)
[0x33ab0af61f2] - /usr/lib64/dovecot/libdovecot-storage.so.0(mdbox_sync+0x45)
[0x33ab0af67d5] - 
/usr/lib64/dovecot/libdovecot-storage.so.0(mdbox_storage_sync_init+0xa8)
[0x33ab0af68e8] - 
/usr/lib64/dovecot/libdovecot-storage.so.0(mailbox_sync_init+0x3d)
[0x33ab0b2490d] - /usr/lib64/dovecot/libdovecot-storage.so.0(mailbox_sync+0x37)
[0x33ab0b24a87] - doveadm(+0x1c0dc) [0x5a1f7f90dc] - doveadm(+0x1bd1b) 
[0x5a1f7f8d1b] -
doveadm(doveadm_mail_try_run+0x267) [0x5a1f7f9d37] - doveadm(main+0x404) 
[0x5a1f7f5a64] -
/lib64/libc.so.6(__libc_start_main+0xf5) [0x33ab042cd55] - doveadm(+0x18cb9) 
[0x5a1f7f5cb9]


# doveadm quota get -u USERNAME
Quota name TypeValue   Limit %
user   STORAGE  4587 3145728 0
user   MESSAGE 3   - 0
   
The user has an EMPTY mailbox with 3 folders (when connecting via IMAP)

But looking in $HOME, I'm seeing:
# du -sh .
1.6G.

The user cannot receive mail:
Dec 10 14:09:57 lmtp(86133, USERNAME): Fatal: master: service(lmtp): child 
86133 killed with signal 6 (core dumps disabled)
Dec 10 14:09:57 lmtp(106153, USERNAME): Fatal: master: service(lmtp): child 
106153 killed with signal 6 (core dumps disabled)

-- 
[*] sys4 AG

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

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


Re: Panic: file mail-index-sync-update.c: line 250 (sync_expunge_range): assertion failed: (count 0)

2014-12-10 Thread Teemu Huovila
On 12/10/2014 03:20 PM, Ralf Hildebrandt wrote:
 We're seeing this:
 
 % doveadm force-resync -u USERNAME INBOX
 
 doveadm(USERNAME): Panic: file mail-index-sync-update.c: line 250 
 (sync_expunge_range): assertion failed: (count  0)
This was probably fixed in http://hg.dovecot.org/dovecot-2.2/rev/1886e0616ab5 
(and cosmetically in
http://hg.dovecot.org/dovecot-2.2/rev/56dca338f46b). I can not say for sure 
though, since your report is lacking some details.
For future refrence, please read http://www.dovecot.org/bugreport.html 
carefully.

br,
Teemu Huovila


Re: Renaming directories with subdirectories over IMAP

2014-12-10 Thread Darren Pilgrim

On 12/9/2014 6:08 PM, Зинин Дмитрий Андреевич wrote:


I¹ve a problem with renaming directories with subdirectories.

In root directory I create directory named ³lvl1² with subdirectory ³lvl2²

When I rename directory lvl1 to lvl1-new I get:
1. /lvl1-new with subdir lvl2 but I can use only /lvl1-new and not
/lvl1-new/lvl2
2. /lvl1 with subdir lvl2 but I can use only /lvl1/lvl2 and not /lvl1

Is it a feature or a bug?

If bug is there a fix?


It's a feature of IMAP that you can have folders with missing parents.

It's a bug of your mail client that it isn't recursively renaming folders.


Re: devoid mailbox status for mail reloaded from a tape backup

2014-12-10 Thread Stephen Lidie

 On Dec 10, 2014, at 7:50 AM, Teemu Huovila teemu.huov...@dovecot.fi wrote:
 
 Documentation for -o was added recently, it is not even on the man-pages of 
 the 2.2.15 release.

Thank you,
Steve


Replication and Sieve

2014-12-10 Thread Hanns Mattes
Hi,

I've got two servers set up for replication, which is working fine -
except the sieve scripts.

While the first replication, the existing rules have been replicated
well. Also the activation/Deactivation seems to work. But Changes to the
rules doesn't seem to be transferred.

Configuration should be the same as the other server, except for
mail_replica

dovecot -n:

# 2.2.15: /etc/dovecot/dovecot.conf
# OS: Linux 3.7.10-1.40-desktop x86_64 openSUSE 12.3 (x86_64)
auth_master_user_separator = *
auth_mechanisms = plain login digest-md5 cram-md5 apop
auth_verbose = yes
doveadm_password = strenggeheim
doveadm_port = 54321
mail_location = maildir:~/Maildir
mail_plugins =  quota fts fts_lucene trash zlib notify replication
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 duplicate
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 Trash {
auto = subscribe
special_use = \Trash
  }
  prefix =
}
passdb {
  args = /etc/dovecot/master-users
  driver = passwd-file
  master = yes
  pass = yes
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  fts = lucene
  fts_autoindex = yes
  fts_lucene = whitespace_chars=@.
  mail_replica = tcps:mail.bruecko.de
  quota = maildir:User quota
  quota_exceeded_message = Storage quota for this account has been
exceeded, please try again later.
  quota_grace = 100M
  quota_rule = *:storage=1000M
  quota_rule2 = Trash:storage=+10%%
  quota_status_nouser = DUNNO
  quota_status_overquota = 552 5.2.2 Mailbox is full / Mailbox ist voll
  quota_status_success = DUNNO
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
  quota_warning3 = storage=75%% quota-warning 75 %u
  sieve = /virtualmail/%Ld/%Ln/.dovecot.sieve
  sieve_dir = /virtualmail/%Ld/%Ln/sieve
  sieve_global_dir = /virtualmail
  sieve_max_redirects = 32
  trash = /etc/dovecot/dovecot-trash.conf.ext
  zlib_save = gz
  zlib_save_level = 6
}
postmaster_address = ad...@93er.net
protocols = imap pop3 lmtp sieve
service aggregator {
  fifo_listener replication-notify-fifo {
user = vmail
  }
  unix_listener replication-notify {
user = vmail
  }
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
mode = 0666
  }
}
service doveadm {
  inet_listener {
port = 54321
ssl = yes
  }
}
service imap-login {
  inet_listener imap {
port = 143
  }
  inet_listener imaps {
port = 993
ssl = yes
  }
}
service lmtp {
  inet_listener lmtp {
address = 127.0.0.1
port = 24
  }
  user = vmail
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
  inet_listener sieve_deprecated {
port = 2000
  }
}
service pop3-login {
  inet_listener pop3 {
port = 110
  }
  inet_listener pop3s {
port = 995
ssl = yes
  }
}
service quota-status {
  client_limit = 1
  executable = quota-status -p postfix
  inet_listener {
port = 12340
  }
}
service quota-warning {
  executable = script /usr/local/bin/quota-warning.sh
  unix_listener quota-warning {
user = vmail
  }
  user = vmail
}
service replicator {
  process_min_avail = 1
  unix_listener replicator-doveadm {
mode = 0666
  }
}
ssl_cert = /etc/dovecot/brueckokomplett2014.crt
ssl_client_ca_dir = /etc/ssl/certs
ssl_key = /etc/dovecot/brueckofrei2014.key
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
verbose_proctitle = yes
protocol lmtp {
  mail_plugins =  quota fts fts_lucene trash zlib notify replication sieve
}
protocol lda {
  mail_plugins =  quota fts fts_lucene trash zlib notify replication sieve
}
protocol imap {
  mail_plugins =  quota fts fts_lucene trash zlib notify replication
imap_quota imap_zlib
}

Any advice?

Regards

Hanns


dovecot.index.log files: what are they?

2014-12-10 Thread Thomas Klausner
Hi!

I have lots of these files:

/home/wiz/Mail/my-folder-name/cur/.imap/1238738125.13533_23713.danbala:2,S/dovecot.index.log

What are they for?
Why are they here?
Can I remove them?

 Thomas


Re: dovecot.index.log files: what are they?

2014-12-10 Thread Reindl Harald


Am 10.12.2014 um 21:19 schrieb Thomas Klausner:

I have lots of these files:

/home/wiz/Mail/my-folder-name/cur/.imap/1238738125.13533_23713.danbala:2,S/dovecot.index.log

What are they for?
Why are they here?
Can I remove them?


RTFM: http://wiki2.dovecot.org/IndexFiles

https://www.google.at/search?q=dovecot.index.log



signature.asc
Description: OpenPGP digital signature


Re: dovecot.index.log files: what are they?

2014-12-10 Thread Thomas Klausner
On Wed, Dec 10, 2014 at 09:26:31PM +0100, Reindl Harald wrote:
 
 Am 10.12.2014 um 21:19 schrieb Thomas Klausner:
 I have lots of these files:
 
 /home/wiz/Mail/my-folder-name/cur/.imap/1238738125.13533_23713.danbala:2,S/dovecot.index.log
 
 What are they for?
 Why are they here?
 Can I remove them?
 
 RTFM: http://wiki2.dovecot.org/IndexFiles

Thanks, but I had read this.

I still don't know what they are good for, why they stay there for
days and if I can remove them. After all, they are not the caches, but
some transaction logs (I don't know what this is).
 Thomas


Re: dovecot.index.log files: what are they?

2014-12-10 Thread Reindl Harald


Am 10.12.2014 um 21:48 schrieb Thomas Klausner:

On Wed, Dec 10, 2014 at 09:26:31PM +0100, Reindl Harald wrote:


Am 10.12.2014 um 21:19 schrieb Thomas Klausner:

I have lots of these files:

/home/wiz/Mail/my-folder-name/cur/.imap/1238738125.13533_23713.danbala:2,S/dovecot.index.log

What are they for?
Why are they here?
Can I remove them?


RTFM: http://wiki2.dovecot.org/IndexFiles


Thanks, but I had read this.

I still don't know what they are good for, why they stay there for
days and if I can remove them. After all, they are not the caches, but
some transaction logs (I don't know what this is)


http://en.wikipedia.org/wiki/Transaction_log

why don't you just keep your fingers from data maintained by a server 
application? it's not your business to touch them




signature.asc
Description: OpenPGP digital signature


Re: dovecot.index.log files: what are they?

2014-12-10 Thread Joseph Tam

Thomas Klausner writes:


RTFM: http://wiki2.dovecot.org/IndexFiles


Thanks, but I had read this.

I still don't know what they are good for, why they stay there for
days and if I can remove them. After all, they are not the caches, but
some transaction logs (I don't know what this is).


Re-read the page, all the way to the bottom.

Interpreting the last section:

The transaction log records recent changes to a mailbox, and together
with the index, gives the current state of the mailbox.  This is an I/O
optimization so that mailbox states changes are quickly updated without
having to compare an entire index file with the last (in-memory?) index.
For large mailboxes, this can save a lot of I/O.

It may persist because updates to the indices are not done immediately
(again, possibly to reduce I/O), so the current mailbox state is reflected
by the index file *and* deltas in the transaction log.

I suspect that you could remove the transaction logs (if you do not use
dbox) and dovecot should rebuild them (or more likely, rebuild the indices).

Joseph Tam jtam.h...@gmail.com


Re: Quota issue with mailbox.

2014-12-10 Thread Grant Pasley
thank you steffen - did not pick that up, it was the 
CONCAT('*:messages=1:bytes=', quota)

i set it to CONCAT('*:messages=:bytes=', quota) and it now works perfectly!

On 12/10/2014 8:58 AM, Steffen Kaiser wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 10 Dec 2014, Grant Pasley wrote:

i use imapsync to transfer mail from another imap server to this one, 
the total user mailbox size is 18gb. dovecot lda tells me mailbox is 
full even though i have set mailbox to unlimited.


*the the error is:*  Dec  9 19:17:01 sentinel dovecot: 
lda(gr...@xxx.com): 
msgid=e8b2c897c11cafda2c2ab93a92beb681@localhost.localdomain: 
rejected: Quota exceeded (mailbox for user is full)


*[root@sentinel dovecot]# grep -v '^ *\(#.*\)\?$' dovecot-mysql.conf*
driver = mysql
connect = host=localhost dbname=postfix user=postfix password=
default_pass_scheme = MD5-CRYPT
password_query = SELECT username as user, password, 
concat('/home/vmail/', maildir) as userdb_home, 
concat('maildir:/home/vmail/', maildir) as userdb_mail, 101 as 
userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%u' AND 
active = '1'
user_query = SELECT concat('/home/vmail/', maildir) as home, 
concat('maildir:/home/vmail/', maildir) as mail, 101 AS uid, 12 AS 
gid, CONCAT('*:messages=1:bytes=', quota) as quota_rule FROM 
mailbox WHERE


a) you have not set the quota to unlimited, you still limit to 10'000 
messages.


b) what does
doveadm quota get -u gr...@xxx.com
say? Maybe your quota database is out of sync, try:
doveadm quota recalc -u 

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

iQEVAwUBVIfvKnz1H7kL/d9rAQLAiAgAyl6A4HAXNWZt9D26ZJ24O58/0t1vTt85
WO8YHwZbg32NqMTVY5nU/rIo1P+5ETq/NaEYfVQ+ip+W+M7OE5SXymNGMmM82OIz
ly6L71T4CZi6iPn0nWdIuO6hUgg8kIUPD4eU8CHIwjB4E1gAoKn3+BXXAa7TFhHY
YJKNV7pF7Ema1iGkm7stplpM4/E8ppPeuWnof8BgYAg9vky3yxBAxi3qha40BGP4
hNePgmVUBKl/9bxRmytiUrZVIUQW3NCqwj0L5rQJ3I0BfbW0TjhwnJxUg7HaOSS/
ckO9wkVeolccq6T6b5lPGkWfOvCej8mYdPm8wu/a+/2j+kB/7Nomag==
=kn0X
-END PGP SIGNATURE-



---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com


Re: Sieve permissions issue following update [solved]

2014-12-10 Thread David Gessel


 Original Message 
Subject: Re: Sieve permissions issue following update
From: Steffen Kaiser skdove...@smail.inf.fh-brs.de
To: David Gessel ges...@blackrosetech.com
Date: Wed Dec 10 2014 09:52:57 GMT+0300 (Arabic Standard Time)

 
 Actually this ls output and the last sentence does not indicate that the 
 Sieve script had been compiled: a) after changing 10-move-spam.sieve _and_ b) 
 after the upgrade with the new Sieve tools.

Good point.

 
 Did _you_ _manually_ run:
 
 cd /usr/local/etc/dovecot/sieve
 rm 10-move-spam.svbin

Ut oh... I did not rm the existing svbin.  

 sievec -D 10-move-spam.sieve
 
 ? And, is the sievec command displaying the Pigeonhole version you have 
 installed?

And the -D directive is very useful, thanks:

# rm 10-move-spam.svbin
# sievec -D 10-move-spam.sieve
sievec(gessel): Debug: sieve: Pigeonhole version 0.4.6 (3e924b1b6c5c+) 
initializing
sievec(gessel): Debug: sieve: include: sieve_global is not set; it is currently 
not possible to include `:global' scripts.
sievec(gessel): Debug: sieve: file storage: Using script storage path: 
10-move-spam.sieve
sievec(gessel): Debug: sieve: file script: Opened script `10-move-spam' from 
`10-move-spam.sieve'
sievec(gessel): Debug: sieve: Script `10-move-spam' from 10-move-spam.sieve 
successfully compiled

and watching the logs:
 dovecot: lda(ges...@blackrosetech.com): sieve: 
msgid=CAFOe2y4kDushW=u6_cN1JmsP1FF63BzJ5O8=vjquhnanans...@mail.gmail.com: 
stored mail into mailbox 'INBOX'

Success!

The permissions correction portion of the error below still seems wrong though, 
isn't it? And if so, a little misleading.

 Dec  9 00:09:59 mailhost dovecot: lda(ges...@domain.com): Error: sieve: binary 
save: failed to create temporary file: 
open(/usr/local/etc/dovecot/sieve/10-move-spam.svbin.mailhost.domain.com.114.) 
failed: Permission denied (euid=5000(vmail) egid=5000(vmail) missing +w perm: 
/usr/local/etc/dovecot/sieve, we're not in group 6(mail), dir owned by 143:6 
mode=0775)

Does it seem reasonable to let the port maintainer know to submit a request to 
include instructions in /usr/ports/UPDATING for recompiling global scripts when 
necessary (and how to do it)?  I checked before posting to the list and the 
last entry for sieve is this one:

20090828:
  AFFECTS: users of mail/dovecot and mail/dovecot-sieve
  AUTHOR: y...@coolrat.org

  dovecot-sieve has been updated to a new implementation compatible with
  dovecot 1.2.x.  For details of what this means please refer to:

http://wiki.dovecot.org/LDA/Sieve/Dovecot#Migration_from_CMUSieve