Re: [Dovecot] problems with expire plugin

2013-08-05 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, 3 Aug 2013, Felix Rubio Dalmau wrote:


I'm experiencing problems to set-up the expire plugin in dovecot. This 
is the relevant part of my dovecot configuration


Well, one relevant part is missing: your Dovecot version.
Therefore you should always post the dovecot -n output.


plugin {
  expire = Trash 15 Junk 15


This is a setting for Dovecot v1. Are you using Dovecot v2? Then see 
http://wiki2.dovecot.org/Plugins/Expire.


Regards,

- -- 
Steffen Kaiser

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

iQEVAwUBUf9ENl3r2wJMiz2NAQI/hAf5AQpkY7T/vmHbL/5FN6nyFC7yz8AJk4ta
zxXTKC+GNisuwym9n6PVWXVxuQErQ4616U7xP241tZlbJSs9gJnhV9hvuV1SCKY1
uA2c5+u62H5ejKo3RPsqWeidmjopZ/UyQfO1wvbCl10KhT/UsC78yxInGCwHXnoR
Dihmb3JCMRZbTrCpApLLmG+T2ouyd88YPW5WFdVstVLXvmCnCE3XPXwhZqk9QebV
oEFPNeMgjmEA9ya8PhCB1EVtDtdz1BTpk1MOJlQwlv4vc1C0dNNKPA384Tjen8d7
bEywZfIPsyLa9lEB5CQl2Z0EFuXrLraC6VlMvdYbCbnolsfFNp0miA==
=TA9E
-END PGP SIGNATURE-


Re: [Dovecot] problems with expire plugin

2013-08-05 Thread Felix Rubio Dalmau
Sorry, Steffen. My version of dovecot is 

# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.9.4-15 x86_64 Debian jessie/sid ext4

Sorry for the mistake.

Regards,

Felix


On Monday 05 August 2013 08:20:38 Steffen Kaiser wrote:
 On Sat, 3 Aug 2013, Felix Rubio Dalmau wrote:
 
  I'm experiencing problems to set-up the expire plugin in dovecot. This 
  is the relevant part of my dovecot configuration
 
 Well, one relevant part is missing: your Dovecot version.
 Therefore you should always post the dovecot -n output.
 
  plugin {
expire = Trash 15 Junk 15
 
 This is a setting for Dovecot v1. Are you using Dovecot v2? Then see
 http://wiki2.dovecot.org/Plugins/Expire.
 
 Regards,
 
 --
 Steffen Kaiser
 


[Dovecot] Fileoperations in Maildir – problematic or okay?

2013-08-05 Thread Martin Burgraf
Hi,

I'm wondering: Is it a problem to move and delete files inside a 
dovecot-managed maildir?

For example:
I have a folder ~/.maildir/.Sub1.Start/cur and a folder 
~/.maildir/.Sub1.Start.old/cur
and like to regularly move old mails from the first to the second one.
Can you create a cron job saying something like:
find ~/.maildir/.Sub1.Start/cur -mtime +5 -exec mv {} 
~/.maildir/.Sub1.Start.old/cur \;
?

I guess this would be some sort of problem, wouldn't it?
IIRC dovecot keeps indexes of the files inside a folder and moving them around 
like this may confuse the software, am I right?


bye
Martin


Re: [Dovecot] Fileoperations in Maildir – problematic or okay?

2013-08-05 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 5 Aug 2013, Martin Burgraf wrote:


I'm wondering: Is it a problem to move and delete files inside a 
dovecot-managed maildir?

For example:
I have a folder ~/.maildir/.Sub1.Start/cur and a folder 
~/.maildir/.Sub1.Start.old/cur
and like to regularly move old mails from the first to the second one.
Can you create a cron job saying something like:
find ~/.maildir/.Sub1.Start/cur -mtime +5 -exec mv {} 
~/.maildir/.Sub1.Start.old/cur \;
?

I guess this would be some sort of problem, wouldn't it?


No problem with it basically, if both directories are located at the same 
parition (under the same mountpoint), in order to use the rename() 
syscall. Dovecot (and Maildir spec) expects the permissions a.s.o. in 
place when a file is seen in a folder new or cur. Also mtime should not 
change.


If you use keywords (labels, ...) they should be present in both folders, 
though. Look at the dovecot-keywords files, in it all relevant keywords 
must map to the same letter / digit. That also means: You cannot have more 
than 36 keywords per mailbox, because the others are storred in the index 
files only.


I use something like this:

find . -print0 | xargs -r0 mv -t target-dir

Regards,

- -- 
Steffen Kaiser

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

iQEVAwUBUf9hmF3r2wJMiz2NAQJR1gf+Pso1E//le1G+HiTbLWBCF3VZ8zl/bGNy
xENVV85KjOT5N8MlV1OWCc+yw8ARXd3uywEaTvrt6QRag/DFMWX/+HxrypAZLIz9
Ap2MCDmCzNBD313DTBjvMliiMhg03ULcBpKlPS5O1sS0zK/Wibrx9EufsLIyfVyn
4l7DM1+jUznkTdcCY3uOffikz/qEB0pJa6uF6QkeegciBFDN69WEmTTni/PaMMYq
BCR41rEBf9VGzRlleQjvI4yni9ss4uaU7NUKxUQhcAvAjk3w4yIyRkDm8xh0j+cW
lbQvnd2f9pO6GUWb51+rYg5rSkSA1zaudOEVq6xUfyiHQ9kJoTPVhg==
=OAy1
-END PGP SIGNATURE-


[Dovecot] How to configure sendmail using dovecot lmtp

2013-08-05 Thread alfdc
Hi,

I can't seems to find any posting on how to configure sendmail to use
dovecot as lmtp. All I see is using it as LDA.  I am particularly interested
on how to tell sendmail to ask dovecot to deliver the message to the user.

In the wiki for lda it says to add the following in the sendmail  config:

FEATURE(`local_procmail',
`/usr/local/libexec/dovecot/deliver',`/usr/local/libexec/dovecot/deliver -d
$u')
MODIFY_MAILER_FLAGS(`LOCAL', `-f')
MAILER(procmail)

Is this the same for lmtp? If so how does it know when to use lda or lmtp?
Beside, is procmail playing any role in any of these? Can the I just replace
the whole thing as:

FEATURE(`local_lmtp',`/usr/local/libexec/dovecot/deliver',`/usr/local/libexec/dovecot/deliver
-d $u)
MAILER(`local')

Thanks.







--
View this message in context: 
http://dovecot.2317879.n4.nabble.com/How-to-configure-sendmail-using-dovecot-lmtp-tp43648.html
Sent from the Dovecot mailing list archive at Nabble.com.


Re: [Dovecot] problems with expire plugin

2013-08-05 Thread Felix Rubio Dalmau
Sorry, Steffen. My version of dovecot is 

# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.9.4-15 x86_64 Debian jessie/sid ext4

Additionally, I have corrected the plugin parameters as you suggested. Now 
looks like:

plugin {
  expire = Trash
  expire2 = Trash/*
  expire3 = Junk
  expire4 = Junk/*
  expire_dict = proxy::expire
}

However, the table is not updated anyway :S

Sorry for the mistake.

Regards,

Felix


On Monday 05 August 2013 08:20:38 Steffen Kaiser wrote:
 On Sat, 3 Aug 2013, Felix Rubio Dalmau wrote:
 
  I'm experiencing problems to set-up the expire plugin in dovecot. This 
  is the relevant part of my dovecot configuration
 
 Well, one relevant part is missing: your Dovecot version.
 Therefore you should always post the dovecot -n output.
 
  plugin {
expire = Trash 15 Junk 15
 
 This is a setting for Dovecot v1. Are you using Dovecot v2? Then see
 http://wiki2.dovecot.org/Plugins/Expire.
 
 Regards,
 
 --
 Steffen Kaiser
 


Re: [Dovecot] How to configure sendmail using dovecot lmtp

2013-08-05 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 5 Aug 2013, alfdc wrote:


I can't seems to find any posting on how to configure sendmail to use
dovecot as lmtp. All I see is using it as LDA.  I am particularly interested
on how to tell sendmail to ask dovecot to deliver the message to the user.

In the wiki for lda it says to add the following in the sendmail  config:

FEATURE(`local_procmail',
`/usr/local/libexec/dovecot/deliver',`/usr/local/libexec/dovecot/deliver -d
$u')
MODIFY_MAILER_FLAGS(`LOCAL', `-f')
MAILER(procmail)

Is this the same for lmtp? If so how does it know when to use lda or lmtp?
Beside, is procmail playing any role in any of these? Can the I just replace
the whole thing as:

FEATURE(`local_lmtp',`/usr/local/libexec/dovecot/deliver',`/usr/local/libexec/dovecot/deliver
-d $u)
MAILER(`local')


you are using system users, then you can use:

FEATURE(`local_lmtp',`[IPC]',`FILE /var/run/dovecot2.2/lmtp')dnl

- -- 
Steffen Kaiser

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

iQEVAwUBUf9qVV3r2wJMiz2NAQIe5AgAgpyBIHxno6TZYcqxt4dVpvvKG0gIfedV
ic98tm25zWBCsPA6flKDv5Wo7dCYEROsldA2iiTyBcUcKSwADtzbQwvFWCL52hiV
FQ/K1P0/ibyCd7maMCj1qGVjBtDNp90YXl3CxMRf4hJJ3LnbdQv0EbxrRQxCOmJa
XJu0o+QiAMG50ewYIAVXorp4sUUWIZyKLsgmvhIbGApwWlM8IgBc7EDpWwv4uTry
xtn4f6IlEeV73eCuFET0mhjQx4AGf2sq2WRXAZhcSxqUi9qbZ6AgdQtHZL3h5BRR
ltNi0wCo8caaJ2l5L6/c8gJRcIUjG7hBjYsL2hnfIPseykY0JxCduA==
=DvTP
-END PGP SIGNATURE-


Re: [Dovecot] Fileoperations in Maildir – problematic or okay?

2013-08-05 Thread Oli Schacher
On Mon, 5 Aug 2013 09:36:44 +0200 (CEST)
Martin Burgraf martin...@web.de wrote:

 find ~/.maildir/.Sub1.Start/cur -mtime +5 -exec mv {}
 ~/.maildir/.Sub1.Start.old/cur \; ?

instead of using find / mv you could use dovecot's 'doveadm' command to
search/move/expunge messages

see:
http://wiki2.dovecot.org/Tools/Doveadm
http://wiki2.dovecot.org/Tools/Doveadm/Move

-- 
message transmitted on 100% recycled electrons


Re: [Dovecot] problems with expire plugin

2013-08-05 Thread Axel Luttgens
Le 5 août 2013 à 10:34, Felix Rubio Dalmau a écrit :

 Sorry, Steffen. My version of dovecot is 
 
 # 2.1.7: /etc/dovecot/dovecot.conf
 # OS: Linux 3.9.4-15 x86_64 Debian jessie/sid ext4
 
 Additionally, I have corrected the plugin parameters as you suggested. Now 
 looks like:
 
 plugin {
  expire = Trash
  expire2 = Trash/*
  expire3 = Junk
  expire4 = Junk/*
  expire_dict = proxy::expire
 }
 
 However, the table is not updated anyway :S

Hello Felix,

Have you enabled the plugin globally (i.e. mail_plugins = expire ...)?

Otherwise, please help us with the output of doveconf -n. ;-)

Axel




Re: [Dovecot] problems with expire plugin

2013-08-05 Thread Felix Rubio Dalmau
Ooook! Here it goes! :-)

Thank you!

Felix

# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.9.4-15 x86_64 Debian jessie/sid ext4
auth_cache_size = 1 M
auth_failure_delay = 10 secs
auth_mechanisms = plain login
auth_verbose = yes
auth_verbose_passwords = sha1
auth_worker_max_count = 2
base_dir = /var/run/dovecot/
dict {
  expire = mysql:/etc/dovecot/dovecot-dict-expire.conf.ext
}
listen = *
log_timestamp = %Y-%m-%d %H:%M:%S 
login_greeting = Imap Server ready.
mail_access_groups = vmail
mail_gid = vmail
mail_home = /home/vmail/%d/%n/home
mail_location = maildir:/home/vmail/%d/%n
mail_plugins = quota zlib
mail_privileged_group = vmail
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 = 
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Junk {
auto = subscribe
special_use = \Junk
  }
  mailbox Sent {


auto = subscribe
special_use = \Sent
  }
  mailbox Sent Messages {
special_use = \Sent
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  prefix = 
  type = private
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  expire = Trash
  expire2 = Trash/*
  expire3 = Junk
  expire4 = Junk/*
  expire_dict = proxy::expire
  quota = maildir:User quota
  quota_rule = *:storage=200M
  quota_rule2 = Trash:storage=+10%%
  quota_rule3 = Junk:ignore
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
  sieve = /home/vmail/%d/%n/dovecot.sieve
  sieve_default = /home/vmail/sieve/default.sieve
  sieve_dir = /home/vmail/%d/%n/sieve
  sieve_global_dir = /home/vmail/sieve/global/
  zlib_save = gz
  zlib_save_level = 6
}
postmaster_address = s...@mail.org
protocols = imap sieve lmtp
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-userdb {
group = vmail
mode = 0660
  }
}
service dict {
  unix_listener dict {
group = vmail
mode = 0660
  }
}
service imap-login {
  inet_listener imaps {
port = 0
  }
  process_min_avail = 3
  service_count = 1
}
service imap {
  process_limit = 30
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
  process_min_avail = 0
  service_count = 1
  vsz_limit = 64 M
}
service pop3-login {
  inet_listener pop3 {
port = 0
  }
  inet_listener pop3s {
port = 0
  }
}
ssl_cert = /etc/postfix/ssl/mail.server.pem
ssl_key = /etc/postfix/ssl/mail.server.key
submission_host = 127.0.0.1:587
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocol lmtp {
  mail_plugins = quota zlib sieve
}
protocol lda {
  mail_plugins = quota zlib sieve
}
protocol imap {
  mail_max_userip_connections = 10
  mail_plugins = quota zlib expire imap_quota
}
protocol sieve {
  mail_max_userip_connections = 10
  managesieve_implementation_string = Dovecot Pigeonhole
  managesieve_max_compile_errors = 5
  managesieve_max_line_length = 65536
}


Re: [Dovecot] problems with expire plugin

2013-08-05 Thread Axel Luttgens
Le 5 août 2013 à 13:15, Felix Rubio Dalmau a écrit :

 Ooook! Here it goes! :-)
 
 Thank you!
 
 Felix
 
 # 2.1.7: /etc/dovecot/dovecot.conf
 # OS: Linux 3.9.4-15 x86_64 Debian jessie/sid ext4
 [...]
 mail_plugins = quota zlib
 [...]

Thanks too. :-)

The first thing I would try is this one:

mail_plugins = quota zlib expire

Axel



[Dovecot] ACL not copied to new mailboxes

2013-08-05 Thread Markus Weippert
Hi,

I had some trouble with ACLs not being copied to new child mailboxes in
dovecot 2.2.4. It doesn't matter whether it's a private, shared or
public mailbox I create the folder in, the ACLs just seems to be ignored.
Anyway, I debugged the executable and came up with the attached patch.
Since I'm not a developer, I'm not 100% sure about this but it works for
me now.

Regards,
  Markus

# dovecot --build-options
Build options: ioloop=epoll notify=inotify ipv6 openssl io_block_size=8192
Mail storages: shared mdbox sdbox maildir mbox cydir imapc pop3c raw fail
SQL drivers: mysql
Passdb: checkpassword ldap pam passwd passwd-file shadow sql
Userdb: checkpassword ldap nss passwd prefetch passwd-file sql

# doveconf -n
# 2.2.4: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-48-generic x86_64 Ubuntu 12.04.2 LTS
auth_cache_negative_ttl = 5 mins
auth_cache_size = 10 M
auth_cache_ttl = 1 mins
auth_debug = yes
auth_master_user_separator = *
auth_mechanisms = plain login
auth_verbose = yes
first_valid_gid = 122
first_valid_uid = 114
imap_client_workarounds = tb-extra-mailbox-sep tb-lsub-flags
last_valid_gid = 122
last_valid_uid = 114
mail_debug = yes
mail_gid = vmail
mail_plugins = acl
mail_privileged_group = vmail
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 {
  alias_for =
  hidden = yes
  inbox = no
  list = no
  location =
  prefix = INBOX.
  separator = .
  type = private
}
namespace {
  list = children
  location = maildir:/var/vmail/public/%d:LAYOUT=fs
  prefix = Public/
  separator = /
  subscriptions = no
  type = public
}
namespace {
  list = children
  location = maildir:/var/vmail/mail/%%d/%%n:INDEX=~/shared/%%d/%%n
  prefix = Shared/%%u/
  separator = /
  subscriptions = no
  type = shared
}
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Junk {
auto = subscribe
special_use = \Junk
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  prefix =
  separator = /
  type = private
}
passdb {
  args = /etc/dovecot/auth/%s.master
  driver = passwd-file
  master = yes
  pass = yes
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  acl = vfile:/var/vmail/acls:cache_secs=300
  acl_shared_dict = file:/var/vmail/mail/shared-mailboxes.db
  sieve = ~/dovecot.sieve
  sieve_after = /var/vmail/sieve/after
  sieve_before = /var/vmail/sieve/before
  sieve_default = /var/vmail/sieve/default.sieve
  sieve_dir = ~/sieve
  sieve_global_dir = /var/vmail/sieve/global
}
protocols = imap lmtp sieve
service auth {
  unix_listener /var/spool/postfix/private/dovecot-auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-userdb {
mode = 0777
  }
}
service imap-login {
  process_min_avail = 10
  service_count = 0
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0660
user = postfix
  }
}
ssl_cert = /etc/ssl/dovecot.pem
ssl_cipher_list = HIGH:!MD5:!eNULL
ssl_key = /etc/ssl/dovecot.pem
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocol lmtp {
  mail_plugins = acl sieve
}
protocol lda {
  mail_plugins = acl sieve
}
protocol imap {
  mail_plugins = acl imap_acl
}
--- dovecot-2.2.4.old/src/plugins/acl/acl-mailbox.c 2013-05-19 22:17:04.0 +0200
+++ dovecot-2.2.4/src/plugins/acl/acl-mailbox.c 2013-08-05 11:32:06.793697134 +0200
@@ -140,7 +140,7 @@
abox-skip_acl_checks = TRUE;
ret = abox-module_ctx.super.create_box(box, update, directory);
abox-skip_acl_checks = FALSE;
-   if (ret == 0)
+   if (ret = 0)
acl_mailbox_copy_acls_from_parent(box);
return ret;
 }


Re: [Dovecot] problems with expire plugin

2013-08-05 Thread Axel Luttgens
Le 5 août 2013 à 13:28, Axel Luttgens a écrit :

 [...]
 
 The first thing I would try is this one:
 
   mail_plugins = quota zlib expire
 

Moreover, I guess you should also update your lmtp/lda sections:

protocol lmtp {
 mail_plugins = quota zlib sieve expire
}
protocol lda {
 mail_plugins = quota zlib sieve expire
}

Axel



[Dovecot] Subfolders of Inbox with LAYOUT=fs

2013-08-05 Thread Keith Edmunds
We've just converted to LAYOUT=fs. Some users had subfolders under Inbox,
and for those users some MUAs no longer show those folders.

The directory structure is that the cur, tmp and new folders are in the
'location' directory, but the subfolders are in
$location/INBOX/$foldername.

I am suspicious of this:

12 list  INBOX
* LIST (\HasNoChildren) / INBOX
12 OK List completed.

I have tried moving the cur, tmp and new folders to $location/INBOX, and
changing 'location' in dovecot.conf, but the subfolders still do not show.

Question: is it legitimate to have subfolders of INBOX when using
LAYOUT=fs? If so, what am I missing?

Thanks,
Keith

Config:

# dovecot -n
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.1 ext3
lda_mailbox_autocreate = yes
log_timestamp = %Y-%m-%d %H:%M:%S 
mail_home = /home/%u
mail_location = maildir:/home/imapmail/%u:LAYOUT=fs
mail_privileged_group = mail
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 = yes location = maildir:/home/imapmail/%u:LAYOUT=fs
  prefix = 
  separator = /
  type = private
}
namespace {
  hidden = no
  list = children
  location =
maildir:/home/imapmail/public:INDEX=/home/imapmail/public.indexes/%u.index:LAYOUT=fs
prefix = public/ separator = /
  subscriptions = no
  type = public
}
passdb {
  driver = pam
}
plugin {
  acl = vfile
  acl_shared_dict = file:/home/imapmail/shared-mailboxes
  fts = squat
  home = /home/%u
  sieve = /home/sieve/%u.sieve
  sieve_dir = /home/sieve/%u
}
protocols = imap sieve
service auth {
  user = root
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
}
ssl_cert = /etc/dovecot/TCL_IMAPS_server.crt
ssl_key = /etc/dovecot/TCL_IMAPS_server.key
userdb {
  args = uid=imapmail gid=imapmail
  driver = static
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep
  mail_plugins = acl imap_acl fts fts_squat
}
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
  mail_plugins = sieve
}


-- 
You can't live a perfect day without doing something for someone 
who will never be able to repay you.


Re: [Dovecot] Maildir Synchronization warnings

2013-08-05 Thread Stan Hoeppner
On 8/2/2013 6:57 AM, Timo Sirainen wrote:
 On Fri, 2013-08-02 at 15:34 +0800, Kavish Karkera wrote:
 Hi,

 We are repeatedly getting these below warnings for some of our users, al 
 though we have no complaints from them yet,
  we need to know why these warning occurs.

 So it would be help full if some one explain these warning msg in detail.
 ..
 Aug  2 12:52:55 blade8 dovecot: imap(kavish.kark...@example.com): Warning: 
 Maildir: Scanning 
 /mail/v3store/example.com/kavish.kark...@example.com/Maildir/cur took 94 
 seconds (23191 readdir()s, 0 rename()s to cur/, why=0x1)
 
 It means that the maildir INBOX is huge, and it takes a long time to
 access them with your available disk IO. Possibilities:

Yes, 23K+ and 43K+ emails in a maildir INBOX will generate quite a bit
of read IO.  Are these shared mailboxes used for some business process,
or normal user mailboxes?  If the former are these tends of thousands of
emails arriving in a single day?

 a) Move move of your mails away from INBOX.

If the former you'll want to create a workflow that moves each email to
archival storage, or some temporary location, after each email has been
processed, either by your automated system or human beings.  As you've
discovered, allowing so many emails to pile up in a maildir INBOX causes
problems.

If the latter, the users need to be properly educated on mail folder
hierarchy, sorting, and storage best practices.

 b) Switch to different mailbox format that can handle large mailboxes,
 such as mdbox or sdbox.

This will help but not nearly as much as Timo's first suggestion.


For many reasons it's not always possible or feasible for an
organization to switch mailbox storage formats.  So the last option,
which is always the least bang for the buck, is optimizing your storage
stack on the NFS server for maximum IOPS.

For instance if you're currently using parity RAID, migrating to RAID10
will give you a 5-15x+ boost in mixed read/write random IOPS throughput.
 If your RAID has large strips (chunks) of say 128KB+ switching to small
strips of 16-32KB will increase IOPS, especially if you're using parity
RAID--smaller chunks significantly decrease RMW latency.  Switching from
EXT3/4 to XFS w/inode64 will provide a boost due to parallelism across
allocation groups, and files being clustered around their metadata
inodes which decreases head seek latency--this is especially beneficial
to maildir which manipulates metadata more than file data.

And then there's always the option of adding more hardware, typically
more/faster spindles, maybe more HW RAID cache and more system RAM for
greater filesystem buffer cache, or all three.

-- 
Stan



Re: [Dovecot] dovecot fts solr plugin

2013-08-05 Thread Thomas Baumann
Hello Timo,

I did following (using apache-solr-3.6.2):

wget
http://hg.dovecot.org/dovecot-2.0/raw-file/3fbfdda3e5d3/src/plugins/fts-s
olr/schema.xml -O solr/conf/schema.xml

Then I started solr

java -jar start.jar

And and SEVERE Error is thrown, but searching seems to work.

05.08.2013 14:22:29 org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: undefined field text
at
org.apache.solr.schema.IndexSchema.getDynamicFieldType(IndexSchema.java:13
30)
at
org.apache.solr.schema.IndexSchema$SolrQueryAnalyzer.getAnalyzer(IndexSche
ma.java:408)
at
org.apache.solr.schema.IndexSchema$SolrIndexAnalyzer.reusableTokenStream(I
ndexSchema.java:383)
at
org.apache.lucene.queryParser.QueryParser.getFieldQuery(QueryParser.java:5
74)
at
org.apache.solr.search.SolrQueryParser.getFieldQuery(SolrQueryParser.java:
206)
at
org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1436)
at
org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1319)
at
org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1245)
at
org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1
234)
at
org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206)
at
org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:79)
at org.apache.solr.search.QParser.getQuery(QParser.java:143)
at
org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.ja
va:105)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHa
ndler.java:165)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBas
e.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376)
at
org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.j
ava:59)
at org.apache.solr.core.SolrCore$3.call(SolrCore.java:1182)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
at java.util.concurrent.FutureTask.run(FutureTask.java:149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.
java:897)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java
:919)
at java.lang.Thread.run(Thread.java:736)

And for solr-4.3.1 the schema is not useable.
Caused by: org.apache.solr.common.SolrException: Plugin init failure for
[schema.xml] analyzer/filter: Error loading class
'solr.EnglishPorterFilterFactory'

**Do you have a Schema for 4.3.1 as well?**

10361d30f8c4ea51ad7c2ecaff3b 1
10361d30f8c4ea51ad7c2ecaff3b 2
10361d30f8c4ea51ad7c2ecaff3b 3

Thanks for your help in advance,
Thomas.


-Ursprüngliche Nachricht-
Von: Timo Sirainen [mailto:t...@iki.fi]
Gesendet: Freitag, 2. August 2013 15:03
An: Thomas Baumann
Cc: dovecot@dovecot.org
Betreff: Re: [Dovecot] dovecot fts solr plugin

On 21.7.2013, at 23.11, Thomas Baumann list.dove...@tiri.li wrote:

 (1) doveadm fts fails:

 Error message:
 doveadm(t...@tirism.support.tiri.li): Error: fts not enabled for user's
 namespace (null)
..
 protocol imap {
  plugin {
fts = solr
fts_solr = break-imap-search url=http://localhost:8983/solr/  } }
 protocol pop3 {  plugin {
fts = solr
fts_solr = break-imap-search url=http://localhost:8983/solr/  } }

Don't put these inside protocol sections. They need to be enabled
globally.

 (2)
 solr schema has errors

 Jul 21, 2013 4:35:46 PM org.apache.solr.common.SolrException log
 SEVERE: org.apache.solr.common.SolrException: undefined field text

I did some Solr schema fixes to v2.2 recently..


[Dovecot] Design: Adding checksums to index files

2013-08-05 Thread Timo Sirainen
I've been planning on adding these for years. Maybe it's about time soon. I 
guess they could be added already to v2.2, but enabled only by a new setting 
because it requires file format changes that old Dovecots can't then read. I 
could probably patch v2.1 also so it is able to at least read the new format 
without failing. For v2.3 this new format could then be made the default.

And what would the checksums be exactly? Would the standard CRC32 and CRC8 work 
fine, or are there any better ones?

1. dovecot.index

v2.1+ always only fully recreates this file, never overwrites data to it. So 
the checksums could be written only when the dovecot.index is being recreated. 
There are 3 possible things to checksum:

 - header (32bit checksum)
 - all of the mail records (32bit checksum)
 - each mail record independently (8bit checksum per mail)

The header's checksum could be verified every time the index is opened. The 
full mail record checksum could be verified when something appears to be wrong, 
but it's probably a waste of time to check it in normal operation.

I'm not really sure about the per-mail checksums. It would be easy to create 
them while dovecot.index is being created, but after reading the file into 
memory the records are updated in many ways in many places. It's probably not 
worth the complexity and extra slowness to verify and/or update the checksums 
in all the different places. So is it worth it to even have them? In error 
conditions when fixing up indexes it could be useful to skip over records with 
broken checksums (and check if the mail is in dovecot.index.backup with correct 
checksum). Maybe that's enough to be worth 1 byte per message?..

2. dovecot.index.log

This file is only appended to. Each committed transaction could be prefixed in 
the new format with transaction sizetransaction 32bit checksum. With the 
new format this wouldn't actually increase the log file size much, because 
there is already some space wasted for a compatibility boundary record that 
could be removed now.

3. dovecot.index.cache

Cache file is the most complex file. Its headers get overwritten once in a 
while. Probably not worth the trouble to checksum the header itself, and 
there's not a lot that could be done even if a broken checksum was found. But 
each mail_cache_record could have its own checksum. A 8bit checksum could be 
added without increasing the file's size. Maybe that would be enough?

4. dovecot.index.thread

This is a rather simple file and a 32bit checksum could be added to its header, 
and verified every time the file is read (because it's fully read anyway).

5. dovecot.mailbox.log

This file doesn't even have a header. There are 3 unused bytes in each record 
currently. One of them could be used for a new flags parameter, with the only 
flag being checksum added. There would still be space left for 8bit or 16bit 
checksum.

6. Other files

There are also some text files, like dovecot-acl, subscriptions, quota usage 
and Sieve scripts. They probably have to be without checksums for now. 



Re: [Dovecot] problems with expire plugin

2013-08-05 Thread Felix Rubio Dalmau
AWESOME!!!

I'm sorry I missed it! Now the table gets correctly updated. Now the question 
is: How should I configure the expires to be different for different boxes? I 
see that the expires plugin keeps the track of the oldest message on the boxes 
tracked, only. Should I configure cronjobs like this, for each mailbox to be 
expunged?

doveadm expunge -A mailbox Trash savedbefore numdaysd

Thank you very much to you all!! :-)

Felix

On Monday 05 August 2013 13:45:18 Axel Luttgens wrote:
 Le 5 août 2013 à 13:28, Axel Luttgens a écrit :
 
  [...]
  
  The first thing I would try is this one:
  
  mail_plugins = quota zlib expire
  
 
 Moreover, I guess you should also update your lmtp/lda sections:
 
   protocol lmtp {
mail_plugins = quota zlib sieve expire
   }
   protocol lda {
mail_plugins = quota zlib sieve expire
   }
 
 Axel
 


[Dovecot] How to troubleshoot LDA or LMTP?

2013-08-05 Thread John Williams

Please forgive me if these are silly questions.  I am a normal user, not
a system administrator.  I am using Dovecot as a kind of IMAP caching
proxy, i.e. reading IMAP mail via Gnus + Dovecot + Offlineimap.  I am
trying to enable sieve functionality.

*Desired behaviour* When Gnus (or whatever MUA) asks for new mail from
 Dovecot, that before Dovecot returns and answer, the sieve rules are
 executed. Please tell me if I completely misunderstand how the mail
 system works in this instance.

*Actual behaviour*  As far as I can tell, not only are the sieve rules
 not executed, but also neither LDA or LMTP is invoked.

*What works* Running the scripts manually via `sieve-filter` works
 fine.  The next time I read from my local dovecot server the mail is
 all in the desired place.

 Also, the LMTP service is running, listening on port 24.

*What doesn't work*  I thought the next step would be to execute
 dovecot-lda manually (as is suggested on the wiki and in numerous
 newsgroup posts), but I can't figure out how to do this. When I execute
 it as root and provide my non-root username via the -u option, it
 hangs.  I can see that it spawns a child process that executes as the
 non-root user (specified with the -u option).  So, could someone tell
 how to execute dovecot-lda manually please?

 Also, when does LMTP process messages?  When sending mail via SMTP, or
 when reading mail via IMAP?  I would prefer to use LMTP rather than
 LDA.


*My environment* Fedora 19  sendmail.  Is any other information
 relevant, apart from the dovecot configuration?

Thank you,

John

.2.4: /etc/dovecot/dovecot.conf
# OS: Linux 3.10.4-300.fc19.x86_64 x86_64 Fedora release 19 (Schrödinger’s Cat) 
auth_socket_path = /var/run/dovecot/auth-userdb
debug_log_path = /var/log/dovecot-debug.log
disable_plaintext_auth = no
hostname = falcon.novoalexandrovsk.ru
info_log_path = /var/log/dovecot-info.log
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
login_greeting = Dovecot ready, folks!
mail_access_groups = mail
mail_debug = yes
mail_location = 
mbox:~/mail/mailboxes:DIRNAME=mBoX-MeSsAgEs:INDEX=~/mail/index:CONTROL=~/mail/control:INBOX=/var/spool/mail/%u
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
mbox_write_locks = fcntl
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Sent Messages {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix = 
}
passdb {
  driver = pam
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  sieve_global_dir = /var/lib/dovecot/sieve/global/
  sieve_global_path = /var/lib/dovecot/sieve/default.sieve
}
postmaster_address = johnfrombl...@gmail.com
protocols = imap lmtp sieve
service auth {
  unix_listener auth-userdb {
mode = 0600
user = mail
  }
}
service lmtp {
  executable = lmtp -L
  inet_listener lmtp {
address = 192.168.0.101 127.0.0.1 ::1
port = 24
  }
  user = mail
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
  process_min_avail = 1
  service_count = 1
  vsz_limit = 64 M
}
service managesieve {
  process_limit = 10
}
ssl = required
ssl_cert = /etc/pki/dovecot/certs/dovecot.pem
ssl_key = /etc/pki/dovecot/private/dovecot.pem
userdb {
  driver = passwd
}
protocol lmtp {
  info_log_path = /var/log/dovecot-lmtp-info.log
  log_path = /var/log/dovecot-lmtp-debug.log
  mail_plugins =  sieve
}
protocol lda {
  info_log_path = /var/log/dovecot-lda-info.log
  log_path = /var/log/dovecot-lda-errors.log
  mail_plugins =  sieve
}
protocol sieve {
  mail_max_userip_connections = 10
  managesieve_implementation_string = Dovecot Pigeonhole, Asshole!
  managesieve_logout_format = bytes=%i/%o
  managesieve_max_compile_errors = 5
  managesieve_max_line_length = 65536
}




Re: [Dovecot] How to troubleshoot LDA or LMTP?

2013-08-05 Thread Stan Hoeppner
On 8/5/2013 4:28 AM, John Williams wrote:

 *Desired behaviour* When Gnus (or whatever MUA) asks for new mail from
  Dovecot, that before Dovecot returns and answer, the sieve rules are
  executed. Please tell me if I completely misunderstand how the mail
  system works in this instance.

Sieve is invoked by LDA or LMTP during delivery from the upstream MTA.
The purpose of this is to sort the mail into the appropriate folder
during delivery, and update the Dovecot indexes at this time.

...
 *What doesn't work*  I thought the next step would be to execute
  dovecot-lda manually (as is suggested on the wiki and in numerous
  newsgroup posts), but I can't figure out how to do this. When I execute
  it as root and provide my non-root username via the -u option, it
  hangs.  I can see that it spawns a child process that executes as the
  non-root user (specified with the -u option).  So, could someone tell
  how to execute dovecot-lda manually please?

I don't have the answer to this question.  You desire to use Dovecot in
a manner likely not anticipated by its designer.  What you want may/not
be possible.

  Also, when does LMTP process messages?

When the upstream MTA connects and delivers a message.  LMTP is
identical to SMTP but for a few commands, thus transmission of messages
occurs in an almost identical manner to SMTP, over a network socket.
The socket connection can be local to a host, or over a network between
two hosts.

-- 
Stan



Re: [Dovecot] Subfolders of Inbox with LAYOUT=fs

2013-08-05 Thread Timo Sirainen
On 5.8.2013, at 14.48, Keith Edmunds k...@midnighthax.com wrote:

 We've just converted to LAYOUT=fs. Some users had subfolders under Inbox,
 and for those users some MUAs no longer show those folders.

Oh, looks like this has been broken for a while. Fixed: 
http://hg.dovecot.org/dovecot-2.1/rev/589d2f485a6e



[Dovecot] Weird log entries when some users are composing messages in Thunderbird

2013-08-05 Thread Charles Marcus

Hi all/Timo,

When some of our users are composing a message in Thunderbird, I see a 
ton of these in the logs, and they keep repeating the entire time they 
are typing until the message gets sent...



2013-08-05T10:34:42-04:00 myhost dovecot: imap-login: Login: 
user=u...@media-brokers.com, method=PLAIN, rip=###.###.###.###, lport=993, 
mpid=8152, TLS, session=El2GNTTjNgDAqAIc
2013-08-05T10:34:42-04:00 myhost dovecot: imap(u...@media-brokers.com): 
Disconnected: Disconnected in IDLE in=149 out=12449
2013-08-05T10:34:42-04:00 myhost dovecot: imap-login: Login: 
user=u...@media-brokers.com, method=PLAIN, rip=###.###.###.###, lport=993, 
mpid=8153, TLS, session=lJedNTTjNwDAqAIc
2013-08-05T10:34:42-04:00 myhost dovecot: imap(u...@media-brokers.com): 
Disconnected: Disconnected in IDLE in=149 out=12449


I confirmed that their 'Auto-Save' settings are the defaults (5 minutes, 
same as mine), and when I'm composing a message, there are no entries 
like this. The only other option I could think of that might affect t 
his is the 'spell check as you type', which is also enabled on mine.


Also - I'm not sure this *always* happens to these users... all I know 
is, I see these flooding the logs sometimes, and when I remote in, that 
user is composing a message.


Anyone have any idea why this happens to only a few of our users, and 
possibly only sometimes? Could it be something in the HTML of the quoted 
text when they are replying to certain messages?


Thanks,

--

Best regards,

Charles



Re: [Dovecot] Weird log entries when some users are composing messages in Thunderbird

2013-08-05 Thread Timo Sirainen
On 5.8.2013, at 17.45, Charles Marcus cmar...@media-brokers.com wrote:

 Hi all/Timo,
 
 When some of our users are composing a message in Thunderbird, I see a ton of 
 these in the logs, and they keep repeating the entire time they are typing 
 until the message gets sent...
 
 2013-08-05T10:34:42-04:00 myhost dovecot: imap-login: Login: 
 user=u...@media-brokers.com, method=PLAIN, rip=###.###.###.###, lport=993, 
 mpid=8152, TLS, session=El2GNTTjNgDAqAIc
 2013-08-05T10:34:42-04:00 myhost dovecot: imap(u...@media-brokers.com): 
 Disconnected: Disconnected in IDLE in=149 out=12449
 2013-08-05T10:34:42-04:00 myhost dovecot: imap-login: Login: 
 user=u...@media-brokers.com, method=PLAIN, rip=###.###.###.###, lport=993, 
 mpid=8153, TLS, session=lJedNTTjNwDAqAIc
 2013-08-05T10:34:42-04:00 myhost dovecot: imap(u...@media-brokers.com): 
 Disconnected: Disconnected in IDLE in=149 out=12449

No idea, but check what the sessions do: 
http://wiki2.dovecot.org/Debugging/Rawlog



Re: [Dovecot] How to configure sendmail using dovecot lmtp

2013-08-05 Thread AlR
On Mon, Aug 5, 2013 at 5:03 PM, Steffen Kaiser 
skdove...@smail.inf.fh-brs.de wrote:

 you are using system users, then you can use:

 FEATURE(`local_lmtp',`[IPC]',`**FILE /var/run/dovecot2.2/lmtp')dnl

 - -- Steffen Kaiser


That worked. Thanks


Re: [Dovecot] Design: Adding checksums to index files

2013-08-05 Thread Attila Nagy

On 08/05/13 14:47, Timo Sirainen wrote:

I've been planning on adding these for years. Maybe it's about time soon. I 
guess they could be added already to v2.2, but enabled only by a new setting 
because it requires file format changes that old Dovecots can't then read. I 
could probably patch v2.1 also so it is able to at least read the new format 
without failing. For v2.3 this new format could then be made the default.

What would these solve? Pointing out errors in dovecot, operating 
system, or faulty hardware?

Modern file/storage systems checksum the data all the way to the platters.


Re: [Dovecot] Design: Adding checksums to index files

2013-08-05 Thread Timo Sirainen
On 5.8.2013, at 17.52, Attila Nagy b...@fsn.hu wrote:

 On 08/05/13 14:47, Timo Sirainen wrote:
 I've been planning on adding these for years. Maybe it's about time soon. I 
 guess they could be added already to v2.2, but enabled only by a new setting 
 because it requires file format changes that old Dovecots can't then read. I 
 could probably patch v2.1 also so it is able to at least read the new format 
 without failing. For v2.3 this new format could then be made the default.
 
 What would these solve? Pointing out errors in dovecot, operating system, or 
 faulty hardware?
 Modern file/storage systems checksum the data all the way to the platters.

Currently most corruptions happen due to NFS or other shared filesystems. Also 
local filesystems can corrupt themselves in some bad conditions. So they're 
useful at least for:

 * figuring out if the corruption is actual filesystem corruption or a bug in 
Dovecot

 * detecting corruption early and not giving user corrupted data

 * fixing corruption in a way that doesn't cause more problems (e.g. in some 
bad cases IMAP UIDs could go over 2^31 causing trouble with some clients)

I hear about index corruption all the time. It's not always obvious where the 
problem is..



Re: [Dovecot] dovecot fts solr plugin

2013-08-05 Thread Tamsy

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 
Thomas Baumann wrote the following on 05.08.2013 19:27:

Regarding:
org.apache.solr.common.SolrException log SEVERE:
org.apache.solr.common.SolrException: undefined field text

As for Solr 4.4.0 this went away after editing solr-schema.xml (from
Dovecot 2.2.4),
Changing the call to:
fieldType name=text to fieldType name=text_general
Changing all calls to field name type=text to type=text_general
and by adding:
field name=text type=text_general indexed=true stored=false
multiValued=true/
before:
field name=_version_ type=long indexed=true stored=true/

Although fts solr searches are working fine even with the above errors
in the logs.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.20 (MingW32)
 
iQEcBAEBAgAGBQJR/8DCAAoJEFJuhDv/UPjwuFoIALV/W4Az52nTEImAPPu6cE6l
H95rVMFpQ2bvIyyjY9I0AZrPB/Fk2RudVGVJTj3AXwCFph/nKEJ2Rc1AZsio5HQz
evJA1KR+U7mXh2SEw0mADUM83JTQPCiBipu5g3w91XWX8D9kvYBRmSmDwuYkDp94
byLqxwEbJ5f8AeNDhYQ5QNmBYd/j7r8e5bYEzxcjHr/ICXkCIWiO/mvV1/NlHYE6
QS3SVEx9FLDOZoAb0c/UDvQyF/khUDZ028b1Afo1b4qHVU0r41KccoTvHgBl6sl5
x1+4f+qQLP4I5NZohfOxBHvU0jaSQk+jBDXuQU+FNuqkfwlkbhLTQdwgBcx22o8=
=7PcO
-END PGP SIGNATURE-



0xFF50F8F0.asc
Description: application/pgp-keys


Re: [Dovecot] Weird log entries when some users are composing messages in Thunderbird

2013-08-05 Thread Charles Marcus

On 2013-08-05 10:48 AM, Timo Sirainen t...@iki.fi wrote:

On 5.8.2013, at 17.45, Charles Marcus cmar...@media-brokers.com wrote:


Hi all/Timo,

When some of our users are composing a message in Thunderbird, I see a ton of 
these in the logs, and they keep repeating the entire time they are typing 
until the message gets sent...


2013-08-05T10:34:42-04:00 myhost dovecot: imap-login: Login: 
user=u...@media-brokers.com, method=PLAIN, rip=###.###.###.###, lport=993, 
mpid=8152, TLS, session=El2GNTTjNgDAqAIc
2013-08-05T10:34:42-04:00 myhost dovecot: imap(u...@media-brokers.com): 
Disconnected: Disconnected in IDLE in=149 out=12449
2013-08-05T10:34:42-04:00 myhost dovecot: imap-login: Login: 
user=u...@media-brokers.com, method=PLAIN, rip=###.###.###.###, lport=993, 
mpid=8153, TLS, session=lJedNTTjNwDAqAIc
2013-08-05T10:34:42-04:00 myhost dovecot: imap(u...@media-brokers.com): 
Disconnected: Disconnected in IDLE in=149 out=12449

No idea, but check what the sessions do: 
http://wiki2.dovecot.org/Debugging/Rawlog


Thanks Timo, I'll do this in the morning when no one is here...

Hmmm... can this be enabled for this a couple of users (those that I've 
noticed this happening to)? The wiki says that it works 'by checking if 
dovecot.rawlog/ directory exists in the logged in user's home 
directory'... so, does this mean I would just need to make sure I only 
had that directory for the users I wanted to monitor? Or would I get 
lots of errors for all of the users that*didn't* have this directory?


--

Best regards,

Charles




Re: [Dovecot] dovecot fts solr plugin

2013-08-05 Thread Timo Sirainen
On 5.8.2013, at 18.12, Tamsy dovecot-l...@mohtex.net wrote:

 Regarding:
 org.apache.solr.common.SolrException log SEVERE:
 org.apache.solr.common.SolrException: undefined field text

I wonder what tries to access such text field .. I don't see any such code in 
Dovecot. Or does Solr assume that there always is a field named text?

 As for Solr 4.4.0 this went away after editing solr-schema.xml (from
 Dovecot 2.2.4),
 Changing the call to:
 fieldType name=text to fieldType name=text_general
 Changing all calls to field name type=text to type=text_general
 and by adding:
 field name=text type=text_general indexed=true stored=false
 multiValued=true/
 before:
 field name=_version_ type=long indexed=true stored=true/

So basically you're adding a new field named text that is always empty 
(because Dovecot Solr plugin doesn't add anything to it)? I'm not sure if the 
text_general changes did anything good.



Re: [Dovecot] Weird log entries when some users are composing messages in Thunderbird

2013-08-05 Thread Timo Sirainen
On 5.8.2013, at 18.18, Charles Marcus cmar...@media-brokers.com wrote:

 No idea, but check what the sessions do: 
 http://wiki2.dovecot.org/Debugging/Rawlog
 
 Thanks Timo, I'll do this in the morning when no one is here...
 
 Hmmm... can this be enabled for this a couple of users (those that I've 
 noticed this happening to)? The wiki says that it works 'by checking if 
 dovecot.rawlog/ directory exists in the logged in user's home directory'... 
 so, does this mean I would just need to make sure I only had that directory 
 for the users I wanted to monitor?

Yes.

 Or would I get lots of errors for all of the users that*didn't* have this 
 directory?

No errors, just silent skipping.



Re: [Dovecot] problems with doveadm

2013-08-05 Thread listserv
 
 On 3.8.2013, at 14.25, listserv lists...@xtlv.cn wrote:
 
 doveadm expunge -A mailbox Trash savedbefore 7d
 = kernel: doveadm[11609]: segfault at 10 ip b75f146a sp bf856ad0 error 4 in
 libdovecot.so.0.0.0[b7585000+c8000]
 
 gdb backtrace would be useful, for example:
 
 gdb --args doveadm expunge -A mailbox Trash savedbefore 7d
 run
 bt full
 
Thank you for your advice.

Here the backtrace:

gdb --args doveadm expunge -A mailbox Trash savedbefore 7d
GNU gdb (GDB) 7.6 (Debian 7.6-5)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as i486-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/bin/doveadm...Reading symbols from
/usr/lib/debug/usr/bin/doveadm...done.
done.
(gdb) run
Starting program: /usr/bin/doveadm expunge -A mailbox Trash savedbefore 7d
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need set solib-search-path or set sysroot?
[Thread debugging using libthread_db enabled]
Using host libthread_db library 
/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1.

Program received signal SIGSEGV, Segmentation fault.
i_stream_next_line (stream=0x0) at istream.c:382
382 istream.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt full
#0  i_stream_next_line (stream=0x0) at istream.c:382
_stream = optimized out
pos = optimized out
#1  0xb7dfbd01 in auth_master_user_list_next (ctx=0x80bf668) at 
auth-master.c:694
line = optimized out
#2  0xb7ef72cb in mail_storage_service_all_next (ctx=0x80b8f60,
username_r=0xb550) at mail-storage-service.c:1294
__FUNCTION__ = mail_storage_service_all_next
#3  0x08057db5 in doveadm_mail_all_users (wildcard_user=0x0, argv=optimized
out, ctx=0x80b53f0) at doveadm-mail.c:368
ret = optimized out
input = {module = 0x0, service = 0x8092f63 doveadm, username =
0x80bf070 ad...@xtlv.jp, session_id = 0x0, local_ip = {family = 0, u = {ip6 =
{__in6_u = {__u6_addr8 = '\000' repeats 15 times, __u6_addr16 = {0, 0, 0,
0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, ip4 = {s_addr
= 0}}}, remote_ip = {family = 0, u = {ip6 = {__in6_u = {__u6_addr8 = '\000'
repeats 15 times, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0},
  __u6_addr32 = {0, 0, 0, 0}}}, ip4 = {s_addr = 0}}},
local_port = 0, remote_port = 0, userdb_fields = 0x0, flags_override_add =
(unknown: 0), flags_override_remove = (unknown: 0), no_userdb_lookup = 0}
user_idx = 0
user = 0x80bf070 ad...@xtlv.jp
error = 0xb7e6f2f0 
#4  doveadm_mail_cmd (argv=optimized out, argc=optimized out,
cmd=0xb5ac) at doveadm-mail.c:523
ctx = 0x80b53f0
getopt_args = optimized out
ret = optimized out
c = optimized out
wildcard_user = 0x0
error = optimized out
#5  doveadm_mail_try_run (cmd_name=cmd_name@entry=0x80b1209 expunge,
argc=argc@entry=6, argv=argv@entry=0x80b11dc) at doveadm-mail.c:608
cmd = 0xb5ac
#6  0x08056b26 in main (argc=6, argv=0x80b11dc) at doveadm.c:398
cmd_name = optimized out
i = optimized out
quick_init = false
c = optimized out

--
中華人民共和國


Re: [Dovecot] Subfolders of Inbox with LAYOUT=fs

2013-08-05 Thread Keith Edmunds
 Oh, looks like this has been broken for a while. Fixed:
 http://hg.dovecot.org/dovecot-2.1/rev/589d2f485a6e

Thanks Timo. Unfortunately we're using the packaged Debian version (2.1.7)
and the current version of mailbox-list-fs-iter.c is a bit too different
to apply that patch (but thanks for the very quick response).
-- 
You can't live a perfect day without doing something for someone 
who will never be able to repay you.


Re: [Dovecot] Weird log entries when some users are composing messages in Thunderbird

2013-08-05 Thread Charles Marcus

On 2013-08-05 11:28 AM, Timo Sirainen t...@iki.fi wrote:

On 5.8.2013, at 18.18, Charles Marcus cmar...@media-brokers.com wrote:


No idea, but check what the sessions do: 
http://wiki2.dovecot.org/Debugging/Rawlog

Thanks Timo, I'll do this in the morning when no one is here...

Hmmm... can this be enabled for this a couple of users (those that I've noticed 
this happening to)? The wiki says that it works 'by checking if dovecot.rawlog/ 
directory exists in the logged in user's home directory'... so, does this mean 
I would just need to make sure I only had that directory for the users I wanted 
to monitor?

Yes.


Or would I get lots of errors for all of the users that*didn't* have this 
directory?

No errors, just silent skipping.


Excellent - thanks!

--

Best regards,

Charles




[Dovecot] Help needed with SOLR integration

2013-08-05 Thread Nigel Smith
Hi,

Is there anything wrong with this config for getting SOLR working ?

I'm on Ubuntu 12.04LTS and using the bundled Jetty and SOLR.

Calling http://localhost:8080/solr/update?optimize=true; doesn't return an 
error. And I'm pretty sure I've replaced the schema ?

Help  thanks in advance

Nigel


# 2.0.19: /etc/dovecot/dovecot.conf
# OS: Linux 3.5.0-37-generic x86_64 Ubuntu 12.04.2 LTS 
mail_location = maildir:~/Maildir
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
passdb {
  args = scheme=CRYPT username_format=%u /etc/dovecot/users
  driver = passwd-file
}
plugin {
  fts = solr
  fts_solr = url=http://localhost:8080/solr/
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap lmtp sieve
service auth {
  unix_listener /var/spool/postfix/private/dovecot-auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    group = its-virtmail
    user = its-virtmail
  }
}
service imap-login {
  process_min_avail = 3
}
service lmtp {
  process_min_avail = 5
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
  user = its-virtmail
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
  process_min_avail = 3
}
ssl = required
ssl_cert = /etc/ssl/certs/mx_example_com.pem
ssl_cipher_list = TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:!PSK:@STRENGTH
ssl_key = /etc/ssl/private/mx_example_com.key
userdb {
  args = username_format=%u /etc/dovecot/users
  driver = passwd-file
}
protocol imap {
  imap_client_workarounds = delay-newmail
  mail_max_userip_connections = 10
  mail_plugins = fts fts_solr
}
protocol pop3 {
  mail_max_userip_connections = 10
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
protocol lda {
  deliver_log_format = msgid=%m: %$
  mail_plugins = sieve
  postmaster_address = postmaster
  quota_full_tempfail = yes
  rejection_reason = Your message to %t was automatically rejected:%n%r
}
protocol lmtp {
  mail_plugins = sieve
  postmaster_address = b...@example.com
}


[Dovecot] [Metadata Plugin] Q: Source Repository

2013-08-05 Thread Christoph Hintermüller
Hi I'm currently trying to package V14 of Metadata  plugin for Ubuntu
Quantal (https://launchpad.net/~privatedata/+archive/dovecot-2.2.2/) to
be installed along with dovecot 2.2.4. According to my efforts packaging
the plugin i do have some questions 

For future releases, is it possible to add a link to the current release
on the  meta data mercurial page which includes in the filename of the
tar.gz archive the current version number of the plugin
( metadata-plugin-v14.tar.gz). That would allow to add an appropriate
line in the debian/watch file to detect when a new release of the plugin
is available. Currently i have to check mercurial page manually and use
an updated version mangling entry to ensure that the packaging system
downloads the latest version. The link would help to simplify this.
Especially as the base link in my debian/watch file currently points to
tip.tar.gz and not to the archive the linke of the V14 tag points to.
The sources i got represent the tip.tar.gz downloaded on July 19th 2013
23:16 CET which likely do not exactly correspond to the contents of the
archive containing sources of V14. Therefore a versioned link to the
source archives of the latest version would simplify things a lot,
especially adding patches released for the latest version. As well as
reporting the following addition.

Further I have added a doc directory stub, containing the configuration
examples found in thread
http://dovecot.2317879.n4.nabble.com/dovecot-metadata-8-released-tp10091.html

Greetings
Christoph

diff -x .bzr -x .pc -x debian -u -N -r dovecot-metadata-0.14.0.orig/autogen.sh dovecot-metadata/autogen.sh
--- dovecot-metadata-0.14.0.orig/autogen.sh	2013-05-14 10:13:53.0 +0200
+++ dovecot-metadata/autogen.sh	2013-07-26 10:35:35.0 +0200
@@ -4,4 +4,4 @@
 test -d m4 || mkdir m4
 
 echo '+ running autoreconf ...'
-autoreconf --force --install
+autoreconf --force --install -v
diff -x .bzr -x .pc -x debian -u -N -r dovecot-metadata-0.14.0.orig/configure.ac dovecot-metadata/configure.ac
--- dovecot-metadata-0.14.0.orig/configure.ac	2013-05-14 10:13:53.0 +0200
+++ dovecot-metadata/configure.ac	2013-07-26 10:35:35.0 +0200
@@ -10,6 +10,9 @@
 AC_CONFIG_SRCDIR([src])
 
 
+AM_MAINTAINER_MODE
+
+
 AC_PROG_CC_C99
 AS_IF([test x$ac_cv_prog_cc_c99 = xno],
 	[AC_MSG_ERROR([C99 support required])]
@@ -17,6 +20,12 @@
 
 DC_DOVECOT([2.0])
 
+# Define metadata documentation install dir
+#
+
+metadata_docdir='${dovecot_docdir}/metadata'
+AC_SUBST(metadata_docdir)
+
 
 AC_ARG_ENABLE([debug],
 	[AS_HELP_STRING([--enable-debug],
@@ -24,6 +33,15 @@
 	[],
 	[enable_debug=no]
 )
+AC_ARG_WITH(docs,
+[  --with-docs Install documentation (default)],
+if test x$withval = xno; then
+want_docs=no
+else
+want_docs=yes
+fi,
+want_docs=yes)
+AM_CONDITIONAL(BUILD_DOCS, test $want_docs = yes)
 AC_MSG_CHECKING([whether to enable debugging])
 AC_MSG_RESULT([$enable_debug])
 AS_IF([test x$enable_debug = xyes],
@@ -37,5 +55,8 @@
 AC_CONFIG_FILES([
 	Makefile
 	src/Makefile
+	doc/Makefile
+	doc/example-config/Makefile
+	doc/example-config/conf.d/Makefile
 ])
 AC_OUTPUT
diff -x .bzr -x .pc -x debian -u -N -r dovecot-metadata-0.14.0.orig/doc/example-config/conf.d/10-metadata-mail.conf dovecot-metadata/doc/example-config/conf.d/10-metadata-mail.conf
--- dovecot-metadata-0.14.0.orig/doc/example-config/conf.d/10-metadata-mail.conf	1970-01-01 01:00:00.0 +0100
+++ dovecot-metadata/doc/example-config/conf.d/10-metadata-mail.conf	2013-07-27 14:16:56.0 +0200
@@ -0,0 +1,9 @@
+#stub copied form 
+# Email [Dovecot] dovecot-metadata-8 released
+# by Dennis Schridde devurandom at gmx.net 
+# on Sun Jun 12 16:55:57 EEST 2011
+#
+#use this to configure the meta data plugin
+
+#addjust the corresponding line in the 10-mail.conf file
+mail_plugins = ... metadata
diff -x .bzr -x .pc -x debian -u -N -r dovecot-metadata-0.14.0.orig/doc/example-config/conf.d/20-metadata-imap.conf dovecot-metadata/doc/example-config/conf.d/20-metadata-imap.conf
--- dovecot-metadata-0.14.0.orig/doc/example-config/conf.d/20-metadata-imap.conf	1970-01-01 01:00:00.0 +0100
+++ dovecot-metadata/doc/example-config/conf.d/20-metadata-imap.conf	2013-07-27 14:16:56.0 +0200
@@ -0,0 +1,12 @@
+#stub copied form 
+# Email [Dovecot] dovecot-metadata-8 released
+# by Dennis Schridde devurandom at gmx.net 
+# on Sun Jun 12 16:55:57 EEST 2011
+#
+#use this to configure the meta data plugin
+
+# add this to the protocol imap section in the 20-imap.conf file
+# protocol imap {
+#   mail_plugins = $mail_plugins ... imap_metadata imap_annotatemore
+#}
+
diff -x .bzr -x .pc -x debian -u -N -r dovecot-metadata-0.14.0.orig/doc/example-config/conf.d/90-metadata.conf dovecot-metadata/doc/example-config/conf.d/90-metadata.conf
--- dovecot-metadata-0.14.0.orig/doc/example-config/conf.d/90-metadata.conf	1970-01-01 01:00:00.0 +0100
+++ dovecot-metadata/doc/example-config/conf.d/90-metadata.conf	

Re: [Dovecot] Unlock non existent locks

2013-08-05 Thread Thomas Hummel
On Fri, Aug 02, 2013 at 03:38:47PM +0300, Timo Sirainen wrote:

 Since you have only one Dovecot accessing the NFS, you don't need either
 mail_nfs_storage=yes or mail_nfs_index=yes. My guess is that by setting
 those to no, you'll also solve this:
 
  2013-08-02T14:12:29+02:00 0.5 -10(id10) /boot/kernel.amd64/kernel: 
  [lkf_delegate.c:2752](pid 46390=kt: dwt3)(tid=101282) 
  dev_local_lkf_unlock(): no lock entry present to unlock for resource: 
  1:19d5:fdbe ;client: 0xa51cc3f444107

Thanks, I'll try that but that wouldn't be a good solution for when I'd want to
use more dovecot servers anyway.

My tests using a simple fcntl() C program (unlock a non-locked file) is giving
me a hard time figuring out what conditions cause the file server to log this
message :

On some Isilon node/destination IP combinations, I'd have the message, on other
I wouldn't.

Still, it seems I cannot reproduce the problem on any other hosts (mounting
this server) than the one running the dovecot server. Oddly enough, my fcntl
test causes this message even with dovecot stopped, statd and lockd restarted
and the filesystem un-and-re-mounted while the same setup (up to date via
FreeBSD update, i.e. same base, same nfs client) would not make the server log
the message.

Anyway, the problem seems harmless. But is it legit that dovecot try to unlock
non (or no more) locked files as it seems ?

Thanks for your help.

-- 
Thomas Hummel   | Institut Pasteur
hum...@pasteur.fr | Groupe Exploitation et Infrastructure


Re: [Dovecot] Unlock non existent locks

2013-08-05 Thread Timo Sirainen
On 5.8.2013, at 19.34, Thomas Hummel hum...@pasteur.fr wrote:

 On Fri, Aug 02, 2013 at 03:38:47PM +0300, Timo Sirainen wrote:
 
 Since you have only one Dovecot accessing the NFS, you don't need either
 mail_nfs_storage=yes or mail_nfs_index=yes. My guess is that by setting
 those to no, you'll also solve this:
 
 2013-08-02T14:12:29+02:00 0.5 -10(id10) /boot/kernel.amd64/kernel: 
 [lkf_delegate.c:2752](pid 46390=kt: dwt3)(tid=101282) 
 dev_local_lkf_unlock(): no lock entry present to unlock for resource: 
 1:19d5:fdbe ;client: 0xa51cc3f444107
 
 Thanks, I'll try that but that wouldn't be a good solution for when I'd want 
 to
 use more dovecot servers anyway.

mail_nfs_*=yes wouldn't be a good solution even when you add more servers! 
Director is the only safe way to do it, and mail_nfs_*=yes isn't required with 
director.

 Anyway, the problem seems harmless. But is it legit that dovecot try to unlock
 non (or no more) locked files as it seems ?

The NFS workarounds code is doing some ugly stuff. I thought it would have, but 
looking at the code it doesn't seem so. But still easier to debug if you first 
see if the problem is with the NFS workarounds or the lib-index code. With 
lib-index you could also use lock_method=dotlock to see if that works better 
(although performance will be slightly worse also then).



[Dovecot] Corrupted mboxes with v2.2.4, posix_fallocate and GFS2

2013-08-05 Thread Francesco Prelz


Hi,

on a clustered Dovecot server installation that was recently moved from a
shared GPFS filesystem to GFS2, occasional corruptions in the users'
INBOXes started appearing, where a new incoming message would be appended 
directly after a block of NUL bytes, and be scanned by dovecot as being

glued to the preceding message.

I traced this to the file extension operation performed in
mbox_sync_handle_eof_updates, where the 'file_set_size' call
is used. If available, file_set_size will use the posix_fallocate
call. In GFS2 posix_fallocate increases the file size in 4 kB chunks
(there seems to be no guarantee anyway that posix_allocate will
extend a file by the exact size requested).

After a successful posix_fallocate call, mbox_sync_handle_eof_updates
currently proceeds in rewriting the mailbox starting from the 
originally intended 'file_size':


   1306 if (file_set_size(sync_ctx-write_fd,
   1307   file_size + -sync_ctx-space_diff)  
0) {
   1308 mbox_set_syscall_error(sync_ctx-mbox,
   1309file_set_size());
   1310 if (ftruncate(sync_ctx-write_fd, file_size)  
0) {
   1311 mbox_set_syscall_error(sync_ctx-mbox,
   1312ftruncate());
   1313 }
   1314 return -1;
   1315 }
   1316 mbox_sync_file_updated(sync_ctx, FALSE);
   1317
   1318 if (mbox_sync_rewrite(sync_ctx, mail_ctx, file_size,
   1319   -sync_ctx-space_diff, padding,
   1320   sync_ctx-need_space_seq,
   1321   sync_ctx-seq)  0)
   1322 return -1;


When posix_fallocate extends the mailbox beyond the requested 'file_size', 
a variable size block of NUL bytes is left behind at the tail of the 
mailbox, with the side effects described above.


I successfully worked around this issue by undefining 
HAVE_POSIX_FALLOCATE, as the performance penalty with falling back

to direct block appends seems small.
At least a size check (and possible truncation) after the 
mbox_sync_file_updated call above should probably be added.


I thought that the issue would be anyway worth bringing to your attention.

Thanks.
Francesco Prelz
INFN - Sezione di Milano


Re: [Dovecot] problems with doveadm

2013-08-05 Thread e-frog

On 04.08.2013 15:06, wrote Timo Sirainen:

On 3.8.2013, at 14.25, listserv lists...@xtlv.cn wrote:


doveadm expunge -A mailbox Trash savedbefore 7d
= kernel: doveadm[11609]: segfault at 10 ip b75f146a sp bf856ad0 error 4 in
libdovecot.so.0.0.0[b7585000+c8000]


gdb backtrace would be useful, for example:

gdb --args doveadm expunge -A mailbox Trash savedbefore 7d
run
bt full



Could this be related to 
http://www.dovecot.org/list/dovecot/2013-August/091695.html?




Re: [Dovecot] problems with doveadm

2013-08-05 Thread Timo Sirainen
On 5.8.2013, at 19.56, e-frog e-f...@gmx.de wrote:

 On 04.08.2013 15:06, wrote Timo Sirainen:
 On 3.8.2013, at 14.25, listserv lists...@xtlv.cn wrote:
 
 doveadm expunge -A mailbox Trash savedbefore 7d
 = kernel: doveadm[11609]: segfault at 10 ip b75f146a sp bf856ad0 error 4 in
 libdovecot.so.0.0.0[b7585000+c8000]
 
 gdb backtrace would be useful, for example:
 
 gdb --args doveadm expunge -A mailbox Trash savedbefore 7d
 run
 bt full
 
 
 Could this be related to 
 http://www.dovecot.org/list/dovecot/2013-August/091695.html?

Oh, I had accidentally marked that mail as seen before fixing. This should 
fix both the crashes:
http://hg.dovecot.org/dovecot-2.2/rev/1adb8998c2a6



Re: [Dovecot] Maildir Synchronization warnings

2013-08-05 Thread /dev/rob0
On Fri, Aug 02, 2013 at 03:37:04PM +0300, Timo Sirainen wrote:
 On Fri, 2013-08-02 at 20:21 +0800, Kavish Karkera wrote:
 
  We have 2 pop/imap servers running with director.
  
  Dovecot version = 2.1.12
  Dovecot version = 2.1.13
 ..
  mail_nfs_index = yes
  mail_nfs_storage = yes
 
 To improve performance you can remove these two since you're using
 director. Also you could set maildir_very_dirty_syncs=yes.

What about mail_fsync=always and mmap_disable=yes? These are needed 
for non-director NFS, but what about with director?
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if /dev/rob0 is in the Subject:


Re: [Dovecot] problems with doveadm

2013-08-05 Thread e-frog

On 05.08.2013 19:13, wrote Timo Sirainen:

On 5.8.2013, at 19.56, e-frog e-f...@gmx.de wrote:


On 04.08.2013 15:06, wrote Timo Sirainen:

On 3.8.2013, at 14.25, listserv lists...@xtlv.cn wrote:


doveadm expunge -A mailbox Trash savedbefore 7d
= kernel: doveadm[11609]: segfault at 10 ip b75f146a sp bf856ad0 error 4 in
libdovecot.so.0.0.0[b7585000+c8000]


gdb backtrace would be useful, for example:

gdb --args doveadm expunge -A mailbox Trash savedbefore 7d
run
bt full



Could this be related to 
http://www.dovecot.org/list/dovecot/2013-August/091695.html?


Oh, I had accidentally marked that mail as seen before fixing. This should 
fix both the crashes:
http://hg.dovecot.org/dovecot-2.2/rev/1adb8998c2a6



Thanks Timo. Just wanted to try it but now I get an compilation error 
which is unrelated to this fix however:


Making all in dns
make[4]: Entering directory `/«PKGBUILDDIR»/src/dns'
i686-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../..  -I../../src/lib 
-I../../src/lib-master -I../../src/lib-settings -D_FORTIFY_SOURCE=2 
-std=gnu99 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat 
-Werror=format-security -Wall -W -Wmissing-prototypes 
-Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 
-Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2-MT 
dns-client.o -MD -MP -MF .deps/dns-client.Tpo -c -o dns-client.o 
dns-client.c

dns-client.c: In function 'dns_client_input_line':
dns-client.c:39:10: error: 'EAI_ADDRFAMILY' undeclared (first use in 
this function)
dns-client.c:39:10: note: each undeclared identifier is reported only 
once for each function it appears in

make[4]: *** [dns-client.o] Error 1
make[4]: Leaving directory `/«PKGBUILDDIR»/src/dns'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/«PKGBUILDDIR»/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/«PKGBUILDDIR»'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/«PKGBUILDDIR»'
make: *** [build-stamp] Error 2

This is on Linux 3.8.0-27-generic i686 Ubuntu 13.04



Re: [Dovecot] Corrupted mboxes with v2.2.4, posix_fallocate and GFS2

2013-08-05 Thread Timo Sirainen
On 5.8.2013, at 19.46, Francesco Prelz francesco.pr...@mi.infn.it wrote:

 on a clustered Dovecot server installation that was recently moved from a
 shared GPFS filesystem to GFS2, occasional corruptions in the users'
 INBOXes started appearing, where a new incoming message would be appended 
 directly after a block of NUL bytes, and be scanned by dovecot as being
 glued to the preceding message.
 
 I traced this to the file extension operation performed in
 mbox_sync_handle_eof_updates, where the 'file_set_size' call
 is used. If available, file_set_size will use the posix_fallocate
 call. In GFS2 posix_fallocate increases the file size in 4 kB chunks
 (there seems to be no guarantee anyway that posix_allocate will
 extend a file by the exact size requested).

I think that's a bug in GFS2. I understand posix_fallocate() man page to 
clearly say that it grows the file to the specified offset+len, not any higher. 
So could be a good idea to report it to their developers if they're not aware 
of it..

Anyway, I thought I'd just get rid of the whole syscall since it's not very 
useful anyway: http://hg.dovecot.org/dovecot-2.2/rev/42b2736f146b



Re: [Dovecot] Maildir Synchronization warnings

2013-08-05 Thread Timo Sirainen
On 5.8.2013, at 20.22, /dev/rob0 r...@gmx.co.uk wrote:

 To improve performance you can remove these two since you're using
 director. Also you could set maildir_very_dirty_syncs=yes.
 
 What about mail_fsync=always and mmap_disable=yes? These are needed 
 for non-director NFS, but what about with director?

I'm not sure if mail_fsync=always is strictly required, but I don't think it's 
going to give you any performance improvements in any case. With 
mail_fsync=always the file is flushed to NFS storage in the fsync() call, while 
with mail_fsync=never the file is flushed to NFS storage in close() call. In 
both cases it's going to be flushed, but in error cases it's more confusing to 
see close() fail.

mmap_disable=yes isn't required, but if the NFS storage dies the processes 
start dying with SIGBUS instead of logging read() failed: Input/output error. 
I'm not entirely sure how changing it affects performance. Could be worse or 
could be better. If someone finds our let me know. :)



Re: [Dovecot] problems with doveadm

2013-08-05 Thread Timo Sirainen
On 5.8.2013, at 20.24, e-frog e-f...@gmx.de wrote:

 Thanks Timo. Just wanted to try it but now I get an compilation error which 
 is unrelated to this fix however:
 
 dns-client.c: In function 'dns_client_input_line':
 dns-client.c:39:10: error: 'EAI_ADDRFAMILY' undeclared (first use in this 
 function)
 dns-client.c:39:10: note: each undeclared identifier is reported only once 
 for each function it appears in

Oops, happens with me too :) And it wasn't supposed to be using it anyway, 
fixed now.



Re: [Dovecot] ACL not copied to new mailboxes

2013-08-05 Thread Timo Sirainen
On 5.8.2013, at 14.33, Markus Weippert mweipp...@eteleon.de wrote:

 I had some trouble with ACLs not being copied to new child mailboxes in
 dovecot 2.2.4. It doesn't matter whether it's a private, shared or
 public mailbox I create the folder in, the ACLs just seems to be ignored.
 Anyway, I debugged the executable and came up with the attached patch.
 Since I'm not a developer, I'm not 100% sure about this but it works for
 me now.

Thanks. I fixed it another way: 
http://hg.dovecot.org/dovecot-2.2/rev/a3f645bc5195



Re: [Dovecot] Error: dict client sent broken reply

2013-08-05 Thread Timo Sirainen
On 20.5.2013, at 0.33, Chris Richards gi...@giz-works.com wrote:

 doveadm(someuseraccount@somedomain): Error: dict client
 (/var/run/dovecot/dict) sent broken reply
 doveadm(someuseraccount@somedomain): Error: Dictionary iteration failed
 doveadm: Error: Failed to iterate through some users
..
 dovecot: dict: Error: dict client: COMMIT: Can't commit while iterating
..
 # 2.1.12: /etc/dovecot/dovecot.conf

There are a few fixes in lib-dict since v2.1.12. Also v2.2 has one more fix, 
which I just added to v2.1 hg. Would be helpful to know if one of those fixes 
the problem before I spend a lot of time testing this..



Re: [Dovecot] Passing data safely in password_key?

2013-08-05 Thread Timo Sirainen
On 2.8.2013, at 23.32, Attila Nagy b...@fsn.hu wrote:

 On 08/02/2013 02:32 PM, Timo Sirainen wrote:
 On Mon, 2013-07-29 at 09:22 +0200, Attila Nagy wrote:
 
 On 07/28/13 13:49, Attila Nagy wrote:
 
 Hi,
 
 I would like to convert my custom POP/IMAP proxy to Dovecot's. In this 
 proxy I do more than giving back user name, password and the host and 
 I need extra information.
 Luckily all of them are available as variables, but more than one 
 comes as user input (like user name and cleartext password) and I'm 
 not sure how to pass them safely.
 Obviously I would need a separator, which is guaranteed not to show up 
 either in user name and the cleartext password.
 Should I use escape (%E) here, or is there a better way?
 
 
 Just for the record, this is what I use currently:
 password_key = dovecot/passdb^MAuth-User: %u^MAuth-Pass: 
 %w^MAuth-Protocol: %s^M
 Client-IP: %r^M
 
 I have no idea what you're talking about. What is password_key? The
 password that is being sent to the backend IMAP/POP3 server?
 
 
 
 RTFM? ;)
 
 http://wiki2.dovecot.org/AuthDatabase/Dict?highlight=%28password_key%29

Ah, dict auth. Yeah, you need to escape the user-given username and password. 
They can both contain all characters, including CR and LF. (Although 
auth_username_chars by default disables all the bad chars.) Looks like %E is 
the only possibility currently. The %E escapes  \ and ' characters only. So 
you could for example use Auth-User: %Eu with quotes and make sure you handle 
the unescaping correctly. Or maybe you could just use \; or something as the 
separator since %E only gives you \ \\ and \'.



Re: [Dovecot] attachments not with email causing FETCH BODY[] failed

2013-08-05 Thread Timo Sirainen
On 21.7.2013, at 17.12, Anand Kumria wildf...@progsoc.org wrote:

 Anyone else experiencing this (Dovecot 2.2.4, attachments stored
 separately):
 
 dovecot: imap(u...@kamdha.com): Error: file_istream.open(/home/
 example.com/user/attachments/f5/f0/f5f0f2c08c4311fa404d090a703c3b492f2ea718-a52388285a04eb51820cd485234e-c92f64f79f0d1ed01e6d5b314f04886c-42501)
 failed: No such file or directory
 dovecot: imap(u...@example.com): Error: read(BODY[]) failed: No such file
 or directory (FETCH  for mailbox INBOX UID 42501)
 dovecot: imap(u...@example.com): Disconnected: FETCH failed in=186 out=86389

I can think of one reason why this would happen that doesn't involve an actual 
Dovecot bug:

First session starts fetching the message. It manages to open the sdbox file. 
Another sesssion deletes the mail and the attachment. The first session can 
still read the sdbox file, but can't access the attachment. But unless you were 
stress testing, this is quite unlikely.

 - how might this occurred?
 - what is the best way to find the corrupted message?
 - how should I go about fixing this?

I'd also like to know how it could have happened (other than accidental rm 
-rf). You could also later try again to read the mail, for example:

doveadm fetch -u u...@kamdha.com text mailbox inbox uid 42501

Does that fail with the same error? Do you see anything with:

ls 
/home/example.com/user/attachments/f5/f0/f5f0f2c08c4311fa404d090a703c3b492f2ea718*



Re: [Dovecot] problems with doveadm

2013-08-05 Thread e-frog

On 05.08.2013 19:33, wrote Timo Sirainen:

On 5.8.2013, at 20.24, e-frog e-f...@gmx.de wrote:


Thanks Timo. Just wanted to try it but now I get an compilation error which is 
unrelated to this fix however:

dns-client.c: In function 'dns_client_input_line':
dns-client.c:39:10: error: 'EAI_ADDRFAMILY' undeclared (first use in this 
function)
dns-client.c:39:10: note: each undeclared identifier is reported only once for 
each function it appears in


Oops, happens with me too :) And it wasn't supposed to be using it anyway, 
fixed now.



Ok, it compiled again :). However now it's assert crashing :-(

doveadm mailbox status -A -t unseen 'virtual/unread'
te...@local.lan unseen=1
doveadm: Panic: file ioloop.c: line 494 (io_loop_destroy): assertion 
failed: (ioloop == current_ioloop)
doveadm: Error: Raw backtrace: 
/usr/lib/dovecot/libdovecot.so.0(+0x5adaa) [0xb7554daa] - 
/usr/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x47) 
[0xb7554ec7] - /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0xb750cf66] 
- /usr/lib/dovecot/libdovecot.so.0(+0x6cced) [0xb7566ced] - 
/usr/lib/dovecot/libdovecot.so.0(master_service_deinit+0xe6) 
[0xb7513646] - doveadm(main+0x442) [0xb7757932] - 
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0xb7360935] - 
doveadm(+0xeb9d) [0xb7757b9d]

Aborted (core dumped)

Core was generated by `doveadm mailbox status -A -t unseen virtual/unread'.
Program terminated with signal 6, Aborted.
#0  0xb7726424 in __kernel_vsyscall ()
(gdb) bt full
#0  0xb7726424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7375b1f in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56

resultvar = optimized out
resultvar = optimized out
pid = -1219534848
selftid = 13193
#2  0xb73790b3 in __GI_abort () at abort.c:90
save_stage = 2
act = {__sigaction_handler = {sa_handler = 0x1f3, sa_sigaction 
= 0x1f3}, sa_mask = {__val = {3076049190, 3075527839, 3108510040, 10, 
3075818317, 3076242424, 3108510040, 3076242424, 0,
  3075819944, 3218587852, 10, 3218587940, 3075969388, 
3108509480, 512, 3076242424, 0, 3076242424, 2, 2, 3075820786, 
3076244464, 2, 3076041829, 3218587940, 3108509480, 3076242424,
  3073640072, 3075526703, 3076244464, 3076041829}}, 
sa_flags = -1076379356, sa_restorer = 0xb750cffe i_error+8}

sigs = {__val = {32, 0 repeats 31 times}}
#3  0xb7554dc0 in default_fatal_finish (type=optimized out, 
status=status@entry=0) at failures.c:191
backtrace = 0xb9481748 
/usr/lib/dovecot/libdovecot.so.0(+0x5adaa) [0xb7554daa] - 
/usr/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x47) 
[0xb7554ec7] - /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0xb750cf66] 
- /usr...
#4  0xb7554ec7 in default_fatal_handler (ctx=0xbfd7c194, 
format=0xb7580564 file %s: line %d (%s): assertion failed: (%s), 
args=0xbfd7c1b4 L\310X\267\356\001) at failures.c:205

status = 0
#5  0xb750cf66 in i_panic (format=format@entry=0xb7580564 file %s: line 
%d (%s): assertion failed: (%s)) at failures.c:263

ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0}
args = 0xbfd7c1b4 L\310X\267\356\001
#6  0xb7566ced in io_loop_destroy (_ioloop=_ioloop@entry=0xb94899d8) at 
ioloop.c:494

ioloop = 0xb9489ab0
item = 0x0
__FUNCTION__ = io_loop_destroy
#7  0xb7513646 in master_service_deinit (_service=0xb75bebd4 
master_service) at master-service.c:763

service = 0xb94899d8
#8  0xb7757932 in main (argc=6, argv=0xb94891d4) at doveadm.c:416
cmd_name = 0xb94891f8 mailbox
i = optimized out
quick_init = false
c = optimized out




Re: [Dovecot] attachments not with email causing FETCH BODY[] failed

2013-08-05 Thread Anand Kumria
Hi Timo,

On 5 August 2013 19:19, Timo Sirainen t...@iki.fi wrote:

 On 21.7.2013, at 17.12, Anand Kumria wildf...@progsoc.org wrote:

  Anyone else experiencing this (Dovecot 2.2.4, attachments stored
  separately):
 
  dovecot: imap(u...@kamdha.com): Error: file_istream.open(/home/
 
 example.com/user/attachments/f5/f0/f5f0f2c08c4311fa404d090a703c3b492f2ea718-a52388285a04eb51820cd485234e-c92f64f79f0d1ed01e6d5b314f04886c-42501
 )
  failed: No such file or directory
  dovecot: imap(u...@example.com): Error: read(BODY[]) failed: No such
 file
  or directory (FETCH  for mailbox INBOX UID 42501)
  dovecot: imap(u...@example.com): Disconnected: FETCH failed in=186
 out=86389

 I can think of one reason why this would happen that doesn't involve an
 actual Dovecot bug:

 First session starts fetching the message. It manages to open the sdbox
 file. Another sesssion deletes the mail and the attachment. The first
 session can still read the sdbox file, but can't access the attachment. But
 unless you were stress testing, this is quite unlikely.

  - how might this occurred?
  - what is the best way to find the corrupted message?
  - how should I go about fixing this?

 I'd also like to know how it could have happened (other than accidental rm
 -rf). You could also later try again to read the mail, for example:


I actually have to make an effort to get access to the box, so it wasn't
anything on the command line.



 doveadm fetch -u u...@kamdha.com text mailbox inbox uid 42501

 Does that fail with the same error?


Yes.


 Do you see anything with:

 ls /home/
 example.com/user/attachments/f5/f0/f5f0f2c08c4311fa404d090a703c3b492f2ea718*



No

I did some further analysis and after learning how 'doveadm fetch' works,
all the problem messages have a common problem.

Basically it appears that I configured:

  us...@example.com

and

 us...@kamdha.com

to *both* have the same storage location.

 i.e. /home/kamdha/com/user

And the 'mail_location' variable is set to 'sdbox:~/mail'

*AND* 'mail_attachment_dir' is specified as '/home/%d/%u/attachments'.

The primary domain is kamdha.com; all of the problem messages are addressed
to us...@example.com.

So if something was sent to us...@example.com it would wind up in /home/
example.com/userA// but the mail in /home/kamdha.com/userA would
reference a location that it didn't know about.

My read of things was that '~' is *ONLY* valid in mail_location. If I could
specify mail_attachment_dir to be '~/attachments', then things should work.

Is my read of things correct?

Thanks,
Anand


Re: [Dovecot] attachments not with email causing FETCH BODY[] failed

2013-08-05 Thread Timo Sirainen
On 5.8.2013, at 21.38, Anand Kumria wildf...@progsoc.org wrote:

 Basically it appears that I configured:
 
  us...@example.com
 
 and
 
 us...@kamdha.com
 
 to *both* have the same storage location.
 
 i.e. /home/kamdha/com/user
 
 And the 'mail_location' variable is set to 'sdbox:~/mail'
 
 *AND* 'mail_attachment_dir' is specified as '/home/%d/%u/attachments'.
 
 The primary domain is kamdha.com; all of the problem messages are addressed
 to us...@example.com.
 
 So if something was sent to us...@example.com it would wind up in /home/
 example.com/userA// but the mail in /home/kamdha.com/userA would
 reference a location that it didn't know about.

Ah, that explains it.

 My read of things was that '~' is *ONLY* valid in mail_location. If I could
 specify mail_attachment_dir to be '~/attachments', then things should work.

You can use %h/attachments.



Re: [Dovecot] problems with doveadm

2013-08-05 Thread Timo Sirainen
On 5.8.2013, at 21.28, e-frog e-f...@gmx.de wrote:

 On 05.08.2013 19:33, wrote Timo Sirainen:
 On 5.8.2013, at 20.24, e-frog e-f...@gmx.de wrote:
 
 Thanks Timo. Just wanted to try it but now I get an compilation error which 
 is unrelated to this fix however:
 
 dns-client.c: In function 'dns_client_input_line':
 dns-client.c:39:10: error: 'EAI_ADDRFAMILY' undeclared (first use in this 
 function)
 dns-client.c:39:10: note: each undeclared identifier is reported only once 
 for each function it appears in
 
 Oops, happens with me too :) And it wasn't supposed to be using it anyway, 
 fixed now.
 
 
 Ok, it compiled again :). However now it's assert crashing :-(

The latest hg should work now, at least in my tests.



Re: [Dovecot] problems with doveadm

2013-08-05 Thread e-frog

On 05.08.2013 21:16, wrote Timo Sirainen:

On 5.8.2013, at 21.28, e-frog e-f...@gmx.de wrote:


On 05.08.2013 19:33, wrote Timo Sirainen:

On 5.8.2013, at 20.24, e-frog e-f...@gmx.de wrote:


Thanks Timo. Just wanted to try it but now I get an compilation error which is 
unrelated to this fix however:

dns-client.c: In function 'dns_client_input_line':
dns-client.c:39:10: error: 'EAI_ADDRFAMILY' undeclared (first use in this 
function)
dns-client.c:39:10: note: each undeclared identifier is reported only once for 
each function it appears in


Oops, happens with me too :) And it wasn't supposed to be using it anyway, 
fixed now.



Ok, it compiled again :). However now it's assert crashing :-(


The latest hg should work now, at least in my tests.



Yes, confirmed works now for me again as well. Thanks!


[Dovecot] v2.2.5 released

2013-08-05 Thread Timo Sirainen
http://dovecot.org/releases/2.2/dovecot-2.2.5.tar.gz
http://dovecot.org/releases/2.2/dovecot-2.2.5.tar.gz.sig

So, I'm back from the first vacation I've had in about 10 years. (Well, maybe 
there were a few short ones.) I was planning on coding it the whole time, but 
looks like I didn't manage to get anything at all done. Maybe that's a good 
vacation?.. Anyway, I've still a few more pending things to look into, but it's 
been too long since v2.2.4 so here are the fixes so far.

+ SSL: Added support for ECDH/ECDHE cipher suites (by David Hicks)
+ Added some missing man pages (by Pascal Volk)
+ quota-status: Added quota_status_toolarge setting (by Ulrich Zehl)
- director: Users near expiration could have been redirected to
  different servers at the same time.
- pop3: Avoid assert-crash if client disconnects during LIST.
- mdbox: Corrupted index header still wasn't automatically fixed.
- dsync: Various fixes to work better with imapc and pop3c storages.
- ldap: sasl_bind=yes caused crashes, because Dovecot's lib-sasl
  symbols conflicted with Cyrus SASL library.
- imap: Various error handling fixes to CATENATE. (Found using
  Apple's stress test script.)



[Dovecot] Using ldap and pam

2013-08-05 Thread Bo Lynch
Having some issues with ldap logins. I am using Centos
5,dovecot-1.0.13-1.el5.rfx and openldap-servers-2.3.43-25.el5_8.1
Trying to get this to work with the SoGo interface. First I converted all
my standard system users to ldap using the openldap-tools. This worked
fine, however when a user changes there password they can no longer see
there email. If they change it back to the original password mail can be
seen. This has stumped me for a day or so so I was hoping someone could
shed some light.
/etc/dovecot.conf
protocols = imap imaps
disable_plaintext_auth = no
mbox_read_locks = fcntl
mbox_write_locks = fcntl
protocol imap {
}
protocol pop3 {
}
protocol lda {
  postmaster_address = postmas...@example.com
}
auth default {
mechanisms = plain login
  passdb pam {
  }
  passdb ldap {
args = /etc/dovecot-ldap.pass
  }
  userdb passwd {
  }
  user = root
  user = root
  socket listen {
client {
  path = /var/spool/postfix/private/auth
  mode = 0660
  user = postfix
  group = postfix
}
  }
}
dict {
}
plugin {
}

/etc/dovecot-ldap.conf
hosts = 127.0.0.1:389
sasl_bind = no
auth_bind = yes
auth_bind = no
ldap_version = 3
deref = never
dn = cn=sogo,dc=ameliaschools,dc=com
dnpass=password
base = dc=ameliaschools,dc=com
scope = subtree
pass_attrs = uid=user, userPassword=password
pass_filter = (uid=%u)







Re: [Dovecot] Corrupted mboxes with v2.2.4, posix_fallocate and GFS2

2013-08-05 Thread Francesco Prelz



On Mon, 5 Aug 2013, Timo Sirainen wrote:

Anyway, I thought I'd just get rid of the whole syscall since it's not 
very useful anyway: http://hg.dovecot.org/dovecot-2.2/rev/42b2736f146b


Sounds fair enough. Thanks for the prompt turnaround!

Francesco Prelz
INFN-MI


Re: [Dovecot] problems with expire plugin

2013-08-05 Thread Axel Luttgens
Le 5 août 2013 à 15:10, Felix Rubio Dalmau a écrit :

 [...] Now the question is: How should I configure the expires to be different 
 for different boxes? I see that the expires plugin keeps the track of the 
 oldest message on the boxes tracked, only. Should I configure cronjobs like 
 this, for each mailbox to be expunged?
 
   doveadm expunge -A mailbox Trash savedbefore numdaysd

Hello Felix,

This might be worth a new thread...

Anyway, I think you are right about the need of having jobs run periodically.

Perhaps could you devise a single job, by ORing your queries as described in 
the man page for doveadm-search-query(7); you may find an example at 
http://www.dovecot.org/list/dovecot/2012-August/067983.html.

But I don't know which approach (multiple jobs vs single job) would be the most 
efficient.

HTH,
Axel



Re: [Dovecot] script to test CATENATE

2013-08-05 Thread Mike Abbott
 x append inbox catenate (url ;invalid; url {5}
 
 Dovecot replies with + OK because it wants to read all the URLs into memory 
 before parsing them, while catenate.pl expects an error message immediately.

I see that Example 4 in Appendix A of RFC 4469 explicitly allows both models.  
Here's a patch to catenate.pl to expect dovecot-2.2's behavior.



catenate-patch
Description: Binary data


Re: [Dovecot] v2.2.5 released

2013-08-05 Thread Jim Knuth

am 05.08.13 22:03 schrieb Timo Sirainen t...@iki.fi:


http://dovecot.org/releases/2.2/dovecot-2.2.5.tar.gz
http://dovecot.org/releases/2.2/dovecot-2.2.5.tar.gz.sig

So, I'm back from the first vacation I've had in about 10 years. (Well, maybe 
there were a few short ones.) I was planning on coding it the whole time, but 
looks like I didn't manage to get anything at all done. Maybe that's a good 
vacation?.. Anyway, I've still a few more pending things to look into, but it's 
been too long since v2.2.4 so here are the fixes so far.

 + SSL: Added support for ECDH/ECDHE cipher suites (by David Hicks)
 + Added some missing man pages (by Pascal Volk)
 + quota-status: Added quota_status_toolarge setting (by Ulrich Zehl)
 - director: Users near expiration could have been redirected to
   different servers at the same time.
 - pop3: Avoid assert-crash if client disconnects during LIST.
 - mdbox: Corrupted index header still wasn't automatically fixed.
 - dsync: Various fixes to work better with imapc and pop3c storages.
 - ldap: sasl_bind=yes caused crashes, because Dovecot's lib-sasl
   symbols conflicted with Cyrus SASL library.
 - imap: Various error handling fixes to CATENATE. (Found using
   Apple's stress test script.)



thank you. Which Pigeonhole (Sieve) must I use?

--
Mit freundlichen Grüßen,
with kind regards,
Jim Knuth
-
Mit dem Geist ist es wie mit dem Magen: Mann kann ihm
nur Dinge zumuten, die er verdauen kann. [Churchill]


Re: [Dovecot] How to troubleshoot LDA or LMTP?

2013-08-05 Thread Joseph Tam

John Williams writes:


*What doesn't work*  I thought the next step would be to execute
dovecot-lda manually (as is suggested on the wiki and in numerous
newsgroup posts), but I can't figure out how to do this. When I execute
it as root and provide my non-root username via the -u option, it
hangs.  I can see that it spawns a child process that executes as the
non-root user (specified with the -u option).  So, could someone tell
how to execute dovecot-lda manually please?


Maybe use -d?

I had no trouble invoking

dovecot-lda -c config-file -d user  mailfile

If it doesn't work for you, I suggest process tracing it.


Also, when does LMTP process messages?  When sending mail via SMTP, or
when reading mail via IMAP?  I would prefer to use LMTP rather than
LDA.


The former.

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


Re: [Dovecot] How to troubleshoot LDA or LMTP?

2013-08-05 Thread John Williams
Joseph Tam jtam.h...@gmail.com writes:

 John Williams writes:

 *What doesn't work*  I thought the next step would be to execute
 dovecot-lda manually (as is suggested on the wiki and in numerous
 newsgroup posts), but I can't figure out how to do this. When I execute
 it as root and provide my non-root username via the -u option, it
 hangs.  I can see that it spawns a child process that executes as the
 non-root user (specified with the -u option).  So, could someone tell
 how to execute dovecot-lda manually please?

 Maybe use -d?
D'oh!  I meant -d.  *hangs head in shame*

 I had no trouble invoking

   dovecot-lda -c config-file -d user  mailfile
Aha!  Piping a message to the process was the step I was not aware of.
Thanks Joseph!




Re: [Dovecot] Error: dict client sent broken reply

2013-08-05 Thread Gedalya

On 08/05/2013 01:54 PM, Timo Sirainen wrote:

On 20.5.2013, at 0.33, Chris Richards gi...@giz-works.com wrote:


doveadm(someuseraccount@somedomain): Error: dict client
(/var/run/dovecot/dict) sent broken reply
doveadm(someuseraccount@somedomain): Error: Dictionary iteration failed
doveadm: Error: Failed to iterate through some users

..

dovecot: dict: Error: dict client: COMMIT: Can't commit while iterating

..

# 2.1.12: /etc/dovecot/dovecot.conf

There are a few fixes in lib-dict since v2.1.12. Also v2.2 has one more fix, 
which I just added to v2.1 hg. Would be helpful to know if one of those fixes 
the problem before I spend a lot of time testing this..



In my case it's debian's 2.1.7, and I've since deleted the entire 
expires table which made the error go away. I'm just letting it slowly 
build up again, so far it's fine. So it's going to be hard for me to 
reproduce the problem.




[Dovecot] dovecot, spamassasin and lmtp

2013-08-05 Thread alfdc
Hi,

Ok, so I got rid of my procmail in favor of dovecot lmtp as my MDA. 
However, I lost the ability to tag the emails as SPAM or not. Before, this
is done by procmail. Filtering is done by the Evolution client.

Is there a way to do something similar now? I still want my filtering to be
done by the Evolution. So I need something similar what procmail is doing
i.e. altering the email header and putting some tag on it if it is a SPAM.

 Thanks.




--
View this message in context: 
http://dovecot.2317879.n4.nabble.com/dovecot-spamassasin-and-lmtp-tp43709.html
Sent from the Dovecot mailing list archive at Nabble.com.


Re: [Dovecot] dovecot, spamassasin and lmtp

2013-08-05 Thread Gedalya

On 08/05/2013 10:27 PM, alfdc wrote:

Hi,

Ok, so I got rid of my procmail in favor of dovecot lmtp as my MDA.
However, I lost the ability to tag the emails as SPAM or not. Before, this
is done by procmail. Filtering is done by the Evolution client.

Is there a way to do something similar now? I still want my filtering to be
done by the Evolution. So I need something similar what procmail is doing
i.e. altering the email header and putting some tag on it if it is a SPAM.

  Thanks.




--
View this message in context: 
http://dovecot.2317879.n4.nabble.com/dovecot-spamassasin-and-lmtp-tp43709.html
Sent from the Dovecot mailing list archive at Nabble.com.
You didn't mention which MTA are you using? With either postfix or exim 
you can pass the email through spamassassin. Personally I like to invoke 
spamassassin out of exim's data ACL, getting only the score but not 
modifying the message, and adding the headers I want later in exim's 
routers.




Re: [Dovecot] dovecot, spamassasin and lmtp

2013-08-05 Thread alfdc
Gedalya-2 wrote
 You didn't mention which MTA are you using?

Oh yes. 

My MTA is sendmail. And for sendmail the suggested way to trigger
spamassasin is via procmail. But since procmail is gone then




--
View this message in context: 
http://dovecot.2317879.n4.nabble.com/dovecot-spamassasin-and-lmtp-tp43709p43711.html
Sent from the Dovecot mailing list archive at Nabble.com.


Re: [Dovecot] dovecot, spamassasin and lmtp

2013-08-05 Thread Gedalya

On 08/05/2013 10:56 PM, alfdc wrote:

Gedalya-2 wrote

You didn't mention which MTA are you using?

Oh yes.

My MTA is sendmail. And for sendmail the suggested way to trigger
spamassasin is via procmail. But since procmail is gone then




--
View this message in context: 
http://dovecot.2317879.n4.nabble.com/dovecot-spamassasin-and-lmtp-tp43709p43711.html
Sent from the Dovecot mailing list archive at Nabble.com.
OK... there are programs allowing you to run spamassassin as a milter, 
the fact that these exist is the extent of my knowledge, but procmail is 
certainly not the only way.