Re: [Dovecot] Rebuilding indexes fails on inconsistent mdbox

2012-11-27 Thread Timo Sirainen
On 9.11.2012, at 17.18, Milan Holzäpfel wrote:

 Oct 24 10:45:19 two dovecot: imap(lis...@mjh.name): Panic: file 
 mdbox-storage-rebuild.c: line 773 (rebuild_update_refcounts): assertion 
 failed: (map_uid  msgs[i]-map_uid)

Finally looked into this and fixed: 
http://hg.dovecot.org/dovecot-2.1/rev/8770940057b9



[Dovecot] v2.1.11 soon

2012-11-27 Thread Timo Sirainen
Just to let you know: I'm planning on releasing v2.1.11 today/tomorrow. If you 
wish to get something fixed for it, ask quickly. :)



Re: [Dovecot] Feature request: add information to error message: client doesn't have lookup permissions for this user: userdb reply doesn't contain uid (change userdb socket permissions)

2012-11-27 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 27 Nov 2012, Timo Sirainen wrote:


On 2.11.2012, at 17.55, Steffen Kaiser wrote:

Please add the information to this error, which socket has the problem 
and which uid access is and what is expected.


For instance, when the quota dict request fails, because of permission 
problems, you get a very detailed info about the current problem. And, 
further more, hints to solve it.


http://hg.dovecot.org/dovecot-2.1/rev/c811aab61355 ?


Many thanks !

- -- 
Steffen Kaiser

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

iQEVAwUBULSPj2oxLS8a3A9mAQJTYggAq8OJPR4wZMUalZeuMAjLQAeb7pWTEK5k
w5HeamqZH6rjVq5wk7ln2dFsPQm4+RZPtohenMh8sYChvg2YJLulTp0/I0lra2k2
9CU8kO9YgnUL5yZnnixMOJuZG7mze8DlcmH8lmsf7hg2P8YD2WE0S1F9ro3UquCW
Y7b8oVU1j2k8n05QD1tu8TwFuxPWRdlCHg3C1J1KLhl0xH7nAdHk3WItE73a5vZ7
9gEDfInnM0UAhBzRb0QxV/6i4s03hv7k8f15MxN5dqIrqKfhVrmWXDmpG5SGr0dz
83CioJo/KZGnJufTqGnrA3iMvovhoPdkw9QToVHcbbaDhaZohK/G7A==
=TPv5
-END PGP SIGNATURE-


Re: [Dovecot] lmtp_rcpt_check_quota working somewhere?

2012-11-27 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 27 Nov 2012, Timo Sirainen wrote:


On 26.11.2012, at 18.07, Steffen Kaiser wrote:


I'm running Dovecot v2.1 and enabled the

lmtp_rcpt_check_quota

option in conf.d/20-lmtp.conf, because I just found it in the sample config.

When I have the option enabled, I get _no_ response in the RCPT TO phase, if the user is 
under quota. If I go on and enter the DATA keyword eventually, I get 554 5.5.1 No 
valid recipients, so it looks like, the user is really ignored at all.


Fixed: http://hg.dovecot.org/dovecot-2.1/rev/bebe54e1d640


That seems to fix the problem. Works with single and multiple recipients.

Thanks,

- -- 
Steffen Kaiser

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

iQEVAwUBULSSUWoxLS8a3A9mAQLCJgf/apcvh+4WAYQEPciD4UNAAKmRO04naVxZ
6y/Ik/jGfbtmwEHG+k6n9anIIuVwivfs0G7qugN5Drw3rQC//FEMlfpmtIFf7wBg
vS5nvb5m58i6QFTxBzZWbJ11CE5YIN4wG23OzegvvA7xDp6tQmZDNDJUhjQMfnfW
Cs4wOnFj5ZTkX9M+GURXiLJfQCBvqOCktuuocoSo3iJaiDwyhcrKSnqTmeJ474UC
5ZRT6AOjvnaHzYYHXyIFu2Th3fNR0qiurQFub//INCwKNqiDCAa+xFSMIkYaDidS
cFQjAMo/dFS+meEi1h8/S0HwDbO1KjZ6f+05oFB4B3EaA13ubHUPbA==
=Avwv
-END PGP SIGNATURE-


Re: [Dovecot] v2.1.11 soon

2012-11-27 Thread Noel Butler
On Tue, 2012-11-27 at 10:53 +0200, Timo Sirainen wrote:

 Just to let you know: I'm planning on releasing v2.1.11 today/tomorrow. If 
 you wish to get something fixed for it, ask quickly. :)
 



hah, but u won t do it...



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] v2.1.11 soon

2012-11-27 Thread Patrick Westenberg

Timo Sirainen schrieb:

Just to let you know: I'm planning on releasing v2.1.11 today/tomorrow. If you 
wish to get something fixed for it, ask quickly. :)


Backend-Failover would be nice ;-)




[Dovecot] Cannot STORE \Seen flag on some mails

2012-11-27 Thread Frerich Raabe

Hi,

I'm running Dovecot 1.2.17 on FreeBSD (exact output of 'dovecot -n' is 
atttached to this mail). The machine is serving a public mailinglist 
archive which is read-only; all mail arriving for the archive is marked 
as \Seen using Sieve script.


This setup works well most of the time, but I noticed that for *some* 
mails, the \Seen flag doesn't seem to be stored. Right now I have 31255 
mails in one of my folders and I can't seem to mark five of them as 
\Seen - the others work just fine.


I first suspected a client issue so I did a little IMAP session by hand:

* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE 
AUTH=PLAIN AUTH=LOGIN] Dovecot ready.

. LOGIN xx yy
. OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE 
SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT 
IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE 
QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS ACL 
RIGHTS=texk] Logged in

. SELECT Lists/Archive/squish
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $NotJunk)
* OK [PERMANENTFLAGS ()] Read-only mailbox.
* 31250 EXISTS
* 0 RECENT
* OK [UNSEEN 27126] First unseen.
* OK [UIDVALIDITY 1350573750] UIDs valid
* OK [UIDNEXT 31265] Predicted next UID
* OK [HIGHESTMODSEQ 9512] Highest
. OK [READ-ONLY] Select completed.
. SEARCH UNSEEN
* SEARCH 27126 27127 28484 29835 29838
. OK Search completed (0.000 secs).
. STORE 27126 FLAGS \SEEN
. OK Store completed.
. SEARCH UNSEEN
* SEARCH 27126 27127 28484 29835 29838
. OK Search completed (0.000 secs).
. LOGOUT
* BYE Logging out
. OK Logout completed.

Note how the first 'SEARCH UNSEEN' command shows that '27126' is unseen, 
the subsequent 'STORE' command succeeds - but then 'SEARCH UNSEEN' still 
shows 27126 as unseen!


I have all four logging levels being piped to /var/log/maillog (I 
verified this by running dovecot --log-error) but the file does not show 
any problems. I checked the file permissions of the Maildir directories, 
and it all looks dandy to me.


Does anybody have some suggestions how to debug this further, or what 
the reason for this may be?


--
Frerich Raabe - ra...@froglogic.com
www.froglogic.com - Multi-Platform GUI Testing

# 1.2.17: /usr/local/etc/dovecot.conf
# OS: FreeBSD 9.0-RELEASE i386  
protocols: imap imaps managesieve
listen(default): *
listen(imap): *
listen(managesieve): *:2000 *:4190
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(managesieve): /usr/local/libexec/dovecot/managesieve-login
verbose_proctitle: yes
first_valid_uid: 1000
first_valid_gid: 1000
mail_privileged_group: mail
mail_location: maildir:~/Maildir
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(managesieve): /usr/local/libexec/dovecot/managesieve
mail_process_size: 512
mail_plugins(default): acl imap_acl fts fts_squat
mail_plugins(imap): acl imap_acl fts fts_squat
mail_plugins(managesieve): 
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(managesieve): /usr/local/lib/dovecot/managesieve
imap_client_workarounds(default): delay-newmail netscape-eoh 
tb-extra-mailbox-sep
imap_client_workarounds(imap): delay-newmail netscape-eoh tb-extra-mailbox-sep
imap_client_workarounds(managesieve): 
namespace:
  type: private
  separator: /
  inbox: yes
  list: yes
  subscriptions: yes
namespace:
  type: public
  separator: /
  prefix: Lists/
  location: 
maildir:/home/vmail/lists/Maildir:CONTROL=~/Maildir/lists:INDEX=~/Maildir/lists
  list: yes
namespace:
  type: public
  separator: /
  prefix: Lists/Archive/
  location: maildir:/home/vmail/lists/archive/Maildir
  list: yes
lda:
  postmaster_address: postmas...@imap2.froglogic.com
  mail_plugins: sieve acl
  sendmail_path: /usr/sbin/sendmail
auth default:
  mechanisms: plain login
  username_format: %Lu
  passdb:
driver: pam
args: session=yes dovecot
  passdb:
driver: ldap
args: /usr/local/etc/dovecot-ldap.conf
  userdb:
driver: passwd-file
args: username_format=%n /usr/local/etc/dovecot-pseudo-users.passwd
  userdb:
driver: ldap
args: /usr/local/etc/dovecot-ldap.conf
plugin:
  acl: vfile
  sieve_before: /usr/local/etc/keep-broadcast-mail.sieve
  fts: squat
  fts_squat: partial=4 full=4


Re: [Dovecot] Cannot STORE \Seen flag on some mails

2012-11-27 Thread Frerich Raabe

Am 11/27/2012 1:53 PM, schrieb Frerich Raabe:

I first suspected a client issue so I did a little IMAP session by hand:


[..]


Note how the first 'SEARCH UNSEEN' command shows that '27126' is unseen,
the subsequent 'STORE' command succeeds - but then 'SEARCH UNSEEN' still
shows 27126 as unseen!


Sorry, I only now realized that my IMAP session wasn't very useful since 
the dovecot-acl file didn't allow my user to modify the \Seen flag (it 
only allowed it for the user which runs the Sieve script filing the mail 
into the archive [and marking it as seen]) in the first place.


If I relax the ACL, I can mark the mail as seen myself. I guess that 
means the question is - why didn't the sieve_before manage to set the 
flag in all cases.


--
Frerich Raabe - ra...@froglogic.com
www.froglogic.com - Multi-Platform GUI Testing



Re: [Dovecot] Default fallback behaviour

2012-11-27 Thread Nikita Koshikov
Yes, thanks a lot - this config is working as expected.


[Dovecot] IMAP over SSL

2012-11-27 Thread petsy12
Hello.

I've never tried Dovecot. Here is my attempt to enable IMAP over SSL
on port 993. (BTW, I don't want to use port 143 at all.)

# dovecot -n

log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imaps
listen: *:143,[::]:143
ssl_listen: *:993,[::]:993
ssl: required
ssl_cert_file: /etc/dovecot/keycert.pem
ssl_key_file: /etc/dovecot/keycert.pem
ssl_cipher_list: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!NULL:@STRENGTH
login_dir: /var/run/dovecot/login
login_executable: /usr/lib/dovecot/imap-login
mail_privileged_group: mail
mail_location: maildir:~/Maildir
mbox_write_locks: fcntl dotlock
auth default:
  passdb:
driver: pam
  userdb:
driver: passwd

1. Here is a snippet from dovecot.conf. Is it correct? Should I change
something? (Note that I don't want to enable IMAP on port 143.)

protocols = imaps

protocol imap {
 listen = *:143,[::]:143
 ssl_listen = *:993,[::]:993
 }

disable_plaintext_auth = yes

ssl_listen = *:993,[::]:933

ssl = required

ssl_cert_file = /etc/dovecot/keycert.pem
ssl_key_file  = /etc/dovecot/keycert.pem

ssl_cipher_list = TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!NULL:@STRENGTH

2. I don't understand the syntax connected with auth. What auth
options are enabled by default?

dovecot.conf:

No sections (e.g. namespace {}) or plugin settings are added by
default, they're listed only as examples.

Does it mean that passdb pam will use defaults (e.g. session=yes,
setrcred=yes)?

 passdb pam {
# [session=yes] [setcred=yes] [failure_show_msg=yes] [max_requests=n]
# [cache_key=key] [service name]
#
# session=yes makes Dovecot open and immediately close PAM session. Some
# PAM plugins need this to work, such as pam_mkhomedir.
#
# setcred=yes makes Dovecot establish PAM credentials if some PAM plugins
# need that. They aren't ever deleted though, so this isn't enabled by
# default.
#
# max_requests specifies how many PAM lookups to do in one process before
# recreating the process. The default is 100, because many PAM plugins
# leak memory.
#
# cache_key can be used to enable authentication caching for PAM
# (auth_cache_size also needs to be set). It isn't enabled by default
# because PAM modules can do all kinds of checks besides checking
password,
# such as checking IP address. Dovecot can't know about these checks
# without some help. cache_key is simply a list of variables (see
# /usr/share/doc/dovecot-common/wiki/Variables.txt) which must match
# for the cached data to be used.
# Here are some examples:
#   %u - Username must match. Probably sufficient for most uses.
#   %u%r - Username and remote IP address must match.
#   %u%s - Username and service (ie. IMAP, POP3) must match.
#
# The service name can contain variables, for example %Ls expands to
# pop3 or imap.
#
# Some examples:
#   args = session=yes %Ls
#   args = cache_key=%u dovecot
#args = dovecot
  }

3. Here is the output of `openssl s_client -tls1 -connect
mail.example.com:993`. Is it OK?

[snip]

New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: zlib compression
Expansion: zlib compression

[snip]

Verify return code: 18 (self signed certificate)
---
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
AUTH=PLAIN] Dovecot ready.

Also, where can I read about these options?

Any comments are appreciated.




Re: [Dovecot] IMAP over SSL

2012-11-27 Thread Charles Marcus

On 2012-11-27 8:32 AM, pets...@lavabit.com pets...@lavabit.com wrote:

I've never tried Dovecot. Here is my attempt to enable IMAP over SSL
on port 993. (BTW, I don't want to use port 143 at all.)

# dovecot -n

log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imaps


Please don't trim the doveconf -n output...

It shows the version of dovecot (so no one has to ask)...

--

Best regards,

Charles



Re: [Dovecot] panic fts_solr for bad attachment

2012-11-27 Thread Daniel L. Miller

On 11/26/2012 10:08 PM, Timo Sirainen wrote:

On 27.11.2012, at 7.50, Timo Sirainen wrote:


Nov 26, 2012 8:49:29 PM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: Illegal character ((CTRL-CHAR, 
code 8))
at [row,col {unknown-source}]: [1011144,197790]

Something's wrong. The Solr code was already supposed to catch all of these.

http://dovecot.org/tmp/allchars.gz

If you send this mail to yourself and index it, does it fail? (Works for me.)

I think it works - I tried sending it as an attachment (unzipped) and 
then with a command of sendmail -t dmil...@amfes.com  allchars - I 
don't know how else to do it.


Following that by a doveadm search -u dmil...@amfes.com mailbox INBOX 
text test indexed a couple new messages, including I assume these, 
without errors.  Some of my other mailboxes continue to break.


I know you've got a filter that strips out control characters prior to 
sending to solr - so I'm left to assume:

1.  solr is breaking on its own
2.  I have a hardware problem that is corrupting memory (possible, but 
this server is using ECC, so I don't think so).
3.  Somehow in the communication with solr, control characters are being 
introduced.  Perhaps it's a maximum length or buffer issue?

4.  Could it be attachment related?
5.  Could it be zlib related - as in compressed mail, or a mix of 
compressed  uncompressed mail, being processed?


--
Daniel


Re: [Dovecot] panic fts_solr for bad attachment

2012-11-27 Thread Daniel L. Miller

On 11/27/2012 7:28 AM, Daniel L. Miller wrote:

On 11/26/2012 10:08 PM, Timo Sirainen wrote:

On 27.11.2012, at 7.50, Timo Sirainen wrote:


Nov 26, 2012 8:49:29 PM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: Illegal character 
((CTRL-CHAR, code 8))

at [row,col {unknown-source}]: [1011144,197790]
Something's wrong. The Solr code was already supposed to catch all 
of these.




I was taking a brief scan of the code - and as usual I'm probably wrong 
- but I believe the protection comes from the xml_encode functions.  
Could it be that there are some solr writes that don't go through that 
function - because it is assumed that the data in question doesn't need 
that processing?  Like mailbox names, field names, or uids - that 
SHOULDN'T have any garbage but maybe something is creeping in?


--
Daniel


Re: [Dovecot] panic fts_solr for bad attachment

2012-11-27 Thread Timo Sirainen
On 27.11.2012, at 17.38, Daniel L. Miller wrote:

 On 11/27/2012 7:28 AM, Daniel L. Miller wrote:
 On 11/26/2012 10:08 PM, Timo Sirainen wrote:
 On 27.11.2012, at 7.50, Timo Sirainen wrote:
 
 Nov 26, 2012 8:49:29 PM org.apache.solr.common.SolrException log
 SEVERE: org.apache.solr.common.SolrException: Illegal character 
 ((CTRL-CHAR, code 8))
 at [row,col {unknown-source}]: [1011144,197790]
 Something's wrong. The Solr code was already supposed to catch all of 
 these.
 
 
 I was taking a brief scan of the code - and as usual I'm probably wrong - but 
 I believe the protection comes from the xml_encode functions.  Could it be 
 that there are some solr writes that don't go through that function - because 
 it is assumed that the data in question doesn't need that processing?  Like 
 mailbox names, field names, or uids - that SHOULDN'T have any garbage but 
 maybe something is creeping in?

I did go through the code looking for that a few times already but didn't 
notice anything. I went through it once more, and finally found the problem. :) 
http://hg.dovecot.org/dovecot-2.1/rev/6a97faf3e500



Re: [Dovecot] v2.1.11 soon

2012-11-27 Thread Daniel Parthey
Timo Sirainen wrote:
 Just to let you know: I'm planning on releasing v2.1.11 today/tomorrow. If 
 you wish to get something fixed for it, ask quickly. :)

Can you fix these strange stats plugin errors please?
These are the only errors regularly occurring in our 2.1.10 logs:

Nov 27 08:06:54 10.129.3.249 dovecot: stats: Error: Mail server input error: 
UPDATE-SESSION: stats shrank: mlpath 429  622
Nov 27 08:07:06 10.129.3.249 dovecot: stats: Error: Mail server input error: 
UPDATE-SESSION: stats shrank: mlpath 436  622
Nov 27 08:07:36 10.129.3.249 dovecot: stats: Error: Mail server input error: 
UPDATE-SESSION: stats shrank: mlpath 443  622
Nov 27 08:07:51 10.129.3.249 dovecot: stats: Error: Mail server input error: 
UPDATE-SESSION: stats shrank: mlpath 455  622
Nov 27 08:08:21 10.129.3.249 dovecot: stats: Error: Mail server input error: 
UPDATE-SESSION: stats shrank: mlpath 474  622
Nov 27 08:08:51 10.129.3.249 dovecot: stats: Error: Mail server input error: 
UPDATE-SESSION: stats shrank: mlpath 477  622
Nov 27 08:09:21 10.129.3.249 dovecot: stats: Error: Mail server input error: 
UPDATE-SESSION: stats shrank: mlpath 477  622
Nov 27 08:14:21 10.129.3.249 dovecot: stats: Error: Mail server input error: 
UPDATE-SESSION: stats shrank: mlpath 477  622
Nov 27 08:19:21 10.129.3.249 dovecot: stats: Error: Mail server input error: 
UPDATE-SESSION: stats shrank: mlpath 477  622
Nov 27 16:18:44 10.129.3.213 dovecot: stats: Error: Mail server input error: 
UPDATE-SESSION: stats shrank: mrcount 11  13
Nov 27 16:24:20 10.129.3.249 dovecot: stats: Error: Mail server input error: 
UPDATE-SESSION: stats shrank: mlpath 1  2

These messages occur after imap/pop3 logouts.

Only dovecot.conf attached (director does not produce these errors).

Thanks a lot,
Daniel
-- 
https://plus.google.com/103021802792276734820
# 2.1.10: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-44-server x86_64 Ubuntu 10.04.4 LTS 
auth_cache_negative_ttl = 0
auth_cache_size = 10 M
auth_cache_ttl = 1 mins
auth_verbose = yes
auth_verbose_passwords = sha1
deliver_log_format = mailbox: deliver: session=%{session} msgid=%m from=%f: %$
dict {
  quota = mysql:/etc/dovecot/conf.d/dovecot-dict-sql.conf.ext
}
disable_plaintext_auth = no
doveadm_password = 
imapc_features = rfc822.size
imapc_host = local-mailbox
imapc_port = 18143
instance_name = dovecot-mailbox
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
login_greeting = Mailbox
login_log_format = mailbox: login: %$: %s
login_trusted_networks = 10.129.3.0/24
mail_debug = yes
mail_fsync = always
mail_gid = vmail
mail_home = /mail/dovecot/%d/%n
mail_location = mdbox:~/mail
mail_log_prefix = mailbox: mail: %s(%u): %{session}: 
mail_plugins = quota stats
mail_privileged_group = vmail
mail_uid = vmail
managesieve_implementation_string = Sieve
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
mdbox_rotate_interval = 1 weeks
mdbox_rotate_size = 50 M
mmap_disable = yes
namespace {
  inbox = yes
  location = 
  mailbox Archives {
special_use = \Archive
  }
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix = 
  separator = /
  type = private
}
passdb {
  args = /etc/dovecot/conf.d/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  quota = dict:User quota::proxy::quota
  quota_rule = *:storage=10G
  quota_rule2 = Trash:storage=+100M
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  stats_refresh = 30 secs
  stats_track_cmds = yes
}
protocols = imap pop3 lmtp sieve
service auth {
  unix_listener auth-userdb {
group = dovecot
user = dovecot
  }
}
service dict {
  unix_listener dict {
group = vmail
mode = 0660
  }
}
service doveadm {
  inet_listener doveadm-server {
port = 19000
  }
}
service imap-login {
  inet_listener imap {
port = 19143
  }
}
service imap-postlogin {
  executable = script-login /usr/local/bin/dovecot-postlogin
  user = $default_internal_user
}
service imap {
  executable = imap imap-postlogin
}
service lmtp {
  inet_listener lmtp-without-quota {
address = *
port = 19025
  }
  inet_listener lmtp {
address = *
port = 19024
  }
}
service managesieve-login {
  inet_listener sieve {
port = 19200
  }
}
service pop3-login {
  inet_listener pop3 {
port = 19110
  }
}
service pop3-postlogin {
  executable = script-login /usr/local/bin/dovecot-postlogin
  user = $default_internal_user
}
service pop3 {
  executable = pop3 pop3-postlogin
}
service quota-warning {
  executable = script /usr/local/bin/quota-warning
  extra_groups = dovecot
  unix_listener quota-warning {

Re: [Dovecot] Dovecot sieve with postfix.

2012-11-27 Thread Ben Morrow
At 12PM -0800 on 26/11/12 /#!/JoePea wrote:
 Hi Ben,
 Indeed, the mailq command shows my test messages sitting there with mail
 transport unavailable.
 
  ┌─[11:48:22/hypership/root/~]
  └─╼ mailq
  -Queue ID- --Size-- Arrival Time -Sender/Recipient---
  2DCCB580C01 1901 Mon Nov 26 11:45:02  trus...@gmail.com
(mail transport
  unavailable)
   trus...@bettafootwear.com
 
  B1449580C03 1895 Mon Nov 26 11:48:41  trus...@gmail.com
(mail transport
  unavailable)
   trus...@bettafootwear.com
 
  -- 5 Kbytes in 2 Requests.
 
 I checked in /etc/syslog-ng/syslog-ng.conf and it shows destination d_mail
 { file(/var/log/mail.log); }; but there is no such mail.log file so I
 created one.

I don't know how syslog-ng works, but you need to be able to see the
Postfix logs to have any chance of debugging this. Read your system
documentation and get that working before trying anything else.

 I logged in as mailman by doing su -s /bin/bash mailman then ran
 
 /usr/lib/dovecot/dovecot-lda -f trus...@gmail.com -d
 trus...@bettafootwear.com /home/mailman/test_msg.txt
 
 where /home/mailman/test_msg.txt contains a plain text sentence.

A single sentence is not a valid mail. Dovecot mostly doesn't care, but
you will see odd client behaviour if you deliver invalid mails...

 After doing that, mailq shows the new messages, but with the same mail
 transport unavailable message.

(I assume here that you only see the same list as before you attempted
the new delivery? Delivering to LDA by hand shouldn't go anywhere near
the Postfix queue.)

 However, in Roundcube I see a new blank message with no subject for each
 attempt of the dovecot-lda command.

...such as this. It looks like the 'mail' is being successfully
delivered; if you try with a proper mail, something like

From: root@localhost
To: root@localhost
Subject: testing dovecot-lda

1 2 3

it should show up properly in your client.

At this point I think this is a Postfix problem, not a Dovecot problem.
You can apparently successfully deliver mail using dovecot-lda, so
something in your Postfix config is not invoking it properly.

Ben



Re: [Dovecot] Dovecot director doveadm with switch -A error

2012-11-27 Thread Timo Sirainen
On Tue, 2012-11-27 at 13:27 +0100, Ramon Frontera wrote:
 
  # doveadm -D quota get -A
  doveadm(user1): Debug: auth input: user=user1 proxy
 starttls=any-cert
  doveadm(user1): Error: Proxy is missing destination host
  doveadm: Error: Failed to iterate through some users 
..

 connect(8, {sa_family=AF_FILE, path=/var/run/dovecot//auth-userdb},
 110) = 0


It's connecting to auth-userdb, while it should be connecting to
director-userdb. This should have been done by this setting:

protocol doveadm {
  auth_socket_path = director-userdb
}

Make sure doveconf -n shows that. And if nothing seems to work, this at
least should:

doveadm -o auth_socket_path=director-userdb quota get -A




Re: [Dovecot] Cannot STORE \Seen flag on some mails

2012-11-27 Thread Timo Sirainen
On 27.11.2012, at 15.06, Frerich Raabe wrote:

 Am 11/27/2012 1:53 PM, schrieb Frerich Raabe:
 I first suspected a client issue so I did a little IMAP session by hand:
 
 [..]
 
 Note how the first 'SEARCH UNSEEN' command shows that '27126' is unseen,
 the subsequent 'STORE' command succeeds - but then 'SEARCH UNSEEN' still
 shows 27126 as unseen!
 
 Sorry, I only now realized that my IMAP session wasn't very useful since the 
 dovecot-acl file didn't allow my user to modify the \Seen flag (it only 
 allowed it for the user which runs the Sieve script filing the mail into the 
 archive [and marking it as seen]) in the first place.
 
 If I relax the ACL, I can mark the mail as seen myself. I guess that means 
 the question is - why didn't the sieve_before manage to set the flag in all 
 cases.

Difficult to say, but I don't think it's worth debugging with v1.2. Might be 
fixed already in v2.1..



Re: [Dovecot] v2.1.11 soon

2012-11-27 Thread Timo Sirainen
On 27.11.2012, at 23.47, Daniel Parthey wrote:

 Timo Sirainen wrote:
 Just to let you know: I'm planning on releasing v2.1.11 today/tomorrow. If 
 you wish to get something fixed for it, ask quickly. :)
 
 Can you fix these strange stats plugin errors please?
 These are the only errors regularly occurring in our 2.1.10 logs:
 
 Nov 27 08:06:54 10.129.3.249 dovecot: stats: Error: Mail server input error: 
 UPDATE-SESSION: stats shrank: mlpath 429  622
 Nov 27 08:07:06 10.129.3.249 dovecot: stats: Error: Mail server input error: 
 UPDATE-SESSION: stats shrank: mlpath 436  622

It's strange that I can't figure out how to reproduce this no matter what I do. 
Could you with latest hg, especially:

http://hg.dovecot.org/dovecot-2.1/rev/c81f1ca3cda6

and also the attached patch, which simplifies the stats plugin?


diff
Description: Binary data




Re: [Dovecot] v2.1.11 soon

2012-11-27 Thread Timo Sirainen
On 28.11.2012, at 4.31, Timo Sirainen wrote:

 On 27.11.2012, at 23.47, Daniel Parthey wrote:
 
 Timo Sirainen wrote:
 Just to let you know: I'm planning on releasing v2.1.11 today/tomorrow. If 
 you wish to get something fixed for it, ask quickly. :)
 
 Can you fix these strange stats plugin errors please?
 These are the only errors regularly occurring in our 2.1.10 logs:
 
 Nov 27 08:06:54 10.129.3.249 dovecot: stats: Error: Mail server input error: 
 UPDATE-SESSION: stats shrank: mlpath 429  622
 Nov 27 08:07:06 10.129.3.249 dovecot: stats: Error: Mail server input error: 
 UPDATE-SESSION: stats shrank: mlpath 436  622

Also, can you reproduce this really easily? For example with pop3:

telnet localhost 110
user foo
pass bar
list
retr 1
quit

Does that log about this? If not, what about if you run imaptest 
(http://imapwiki.org/ImapTest) against some test user?



Re: [Dovecot] panic fts_solr for bad attachment

2012-11-27 Thread Daniel L. Miller

On 11/27/2012 1:07 PM, Timo Sirainen wrote:

On 27.11.2012, at 17.38, Daniel L. Miller wrote:


On 11/27/2012 7:28 AM, Daniel L. Miller wrote:

On 11/26/2012 10:08 PM, Timo Sirainen wrote:

On 27.11.2012, at 7.50, Timo Sirainen wrote:


Nov 26, 2012 8:49:29 PM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: Illegal character ((CTRL-CHAR, 
code 8))
at [row,col {unknown-source}]: [1011144,197790]

Something's wrong. The Solr code was already supposed to catch all of these.

I was taking a brief scan of the code - and as usual I'm probably wrong - but I 
believe the protection comes from the xml_encode functions.  Could it be that 
there are some solr writes that don't go through that function - because it is 
assumed that the data in question doesn't need that processing?  Like mailbox 
names, field names, or uids - that SHOULDN'T have any garbage but maybe 
something is creeping in?

I did go through the code looking for that a few times already but didn't 
notice anything. I went through it once more, and finally found the problem. :) 
http://hg.dovecot.org/dovecot-2.1/rev/6a97faf3e500


:( Mine still breaks.  Both UTF-8 and Control-Char errors.

--
Daniel


Re: [Dovecot] panic fts_solr for bad attachment

2012-11-27 Thread Timo Sirainen
On 28.11.2012, at 4.43, Daniel L. Miller wrote:

 I did go through the code looking for that a few times already but didn't 
 notice anything. I went through it once more, and finally found the problem. 
 :) http://hg.dovecot.org/dovecot-2.1/rev/6a97faf3e500
 
 :( Mine still breaks.  Both UTF-8 and Control-Char errors.

Can you grab the network traffic between Dovecot and Solr and find the 
problematic stream?



[Dovecot] Missing Messages on IOS device

2012-11-27 Thread David Morsberger
Resending because I didn't get any responses from my first post:

I just converted my old server running UW/Panda to a Mac Mini Server running 
Mountain Lion (ML) Server. I'm using the postfix / dovecot setup provided by 
Apple.

My IMAP clients are not showing all my emails. The Mail App on my iPhone and 
iPad is behaving the worse. I can see the emails that are not showing up in the 
cur directory.

The ML Mail App is stating there are 3854 emails in my INBOX. There are 3948 
files in the 'cur' directory ('ls cur | wc -l' returns 3948). Other mailboxes 
and directories have the same behavior. I'm not sure what to expect here.

My method of conversion was to bulk copy (drag and drop) all the messages from 
one the UW server to the Dovecot server using the Apple Desktop Mail App in 
Mountain Lion. 

Any idea why these messages are not showing up on my devices and how I can get 
them to show up?

bash-3.2# /Applications/Server.app/Contents/ServerRoot/usr/sbin/dovecotd 
--version
2.0.19apple1

bash-3.2# /Applications/Server.app/Contents/ServerRoot/usr/sbin/dovecotd -n
# 2.0.19apple1: /Library/Server/Mail/Config/dovecot/dovecot.conf
# OS: Darwin 12.2.1 x86_64  hfs
aps_topic = com.apple.mail.XServer.fc3bb7c3-c8ef-4fe2-aff3-95ecd927fb11
auth_mechanisms = cram-md5 x-plain-submit plain login apop digest-md5
auth_socket_path = /var/run/dovecot/auth-userdb
auth_username_format = %n
default_internal_user = _dovecot
default_login_user = _dovenull
disable_plaintext_auth = no
first_valid_gid = 6
first_valid_uid = 6
mail_access_groups = mail
mail_location = maildir:/Library/Server/Mail/Data/mail/%u
mail_log_prefix = %s(pid %p user %u): 
mail_plugins = quota zlib fts fts_sk
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
mdbox_rotate_size = 200 M
passdb {
 args = /Library/Server/Mail/Config/dovecot/submit.passdb
 driver = passwd-file
 pass = yes
 submit = yes
}
passdb {
 driver = od
}
plugin {
 fts = sk
 quota = maildir:User quota
 quota_warning = storage=100%% quota-exceeded %u
 sieve = /Library/Server/Mail/Data/rules/%u/dovecot.sieve
 sieve_dir = /Library/Server/Mail/Data/rules/%u
}
postmaster_address = postmas...@mini.mmpcrofton.com
protocols = imap pop3 lmtp sieve
quota_full_tempfail = yes
service auth {
 extra_groups = _keytabusers
 idle_kill = 15 mins
 unix_listener auth-userdb {
   user = _dovecot
 }
}
service dns_client {
 unix_listener dns-client {
   mode = 0600
 }
}
service imap-login {
 inet_listener imap {
   port = 143
 }
 inet_listener imaps {
   port = 993
   ssl = yes
 }
 service_count = 0
}
service imap {
 client_limit = 5
 process_limit = 200
 service_count = 0
}
service lmtp {
 unix_listener lmtp {
   mode = 0600
 }
}
service managesieve-login {
 inet_listener sieve {
   port = 4190
 }
}
service pop3-login {
 inet_listener pop3 {
   port = 110
 }
 inet_listener pop3s {
   port = 995
   ssl = yes
 }
}
service pop3 {
 client_limit = 5
 process_limit = 200
 service_count = 0
}
service quota-exceeded {
 executable = script 
/Applications/Server.app/Contents/ServerRoot/usr/libexec/dovecot/quota-exceeded.sh
 unix_listener quota-exceeded {
   group = mail
   mode = 0660
   user = _dovecot
 }
 user = _dovecot
}
service quota-warning {
 executable = script 
/Applications/Server.app/Contents/ServerRoot/usr/libexec/dovecot/quota-warning.sh
 unix_listener quota-warning {
   group = mail
   mode = 0660
   user = _dovecot
 }
 user = _dovecot
}
ssl_ca = /etc/certificates/*.chain.pem
ssl_cert = /etc/certificates/*.cert.pem
ssl_cipher_list = ALL:!LOW:!SSLv2:!EXP:!aNULL:!ADH:!eNULL
ssl_key = /etc/certificates/*.key.pem
ssl_key_path = /etc/certificates/*.key.pem
syslog_facility = local6
userdb {
 args = partition=/Library/Server/Mail/Config/dovecot/partition_map.conf 
enforce_quotas=no
 driver = od
}
verbose_proctitle = yes
protocol lmtp {
 mail_plugins = quota zlib fts fts_sk sieve push_notify
}
protocol lda {
 mail_plugins = quota zlib fts fts_sk sieve push_notify
}
protocol imap {
 imap_id_log = *
 imap_id_send = name * version *
 mail_max_userip_connections = 20
 mail_plugins = quota zlib fts fts_sk imap_quota imap_zlib imap_fts urlauth
}
protocol pop3 {
 mail_max_userip_connections = 6
}

Re: [Dovecot] Missing Messages on IOS device

2012-11-27 Thread Stan Hoeppner
On 11/27/2012 9:21 PM, David Morsberger wrote:
 Resending because I didn't get any responses from my first post:
 
 I just converted my old server running UW/Panda to a Mac Mini Server running 
 Mountain Lion (ML) Server. I'm using the postfix / dovecot setup provided by 
 Apple.
 
 My IMAP clients are not showing all my emails. The Mail App on my iPhone and 
 iPad is behaving the worse. I can see the emails that are not showing up in 
 the cur directory.
 
 The ML Mail App is stating there are 3854 emails in my INBOX. There are 3948 
 files in the 'cur' directory ('ls cur | wc -l' returns 3948). Other mailboxes 
 and directories have the same behavior. I'm not sure what to expect here.
 
 My method of conversion was to bulk copy (drag and drop) all the messages 
 from one the UW server to the Dovecot server using the Apple Desktop Mail App 
 in Mountain Lion. 
 
 Any idea why these messages are not showing up on my devices and how I can 
 get them to show up?

Not really.  Problem reports are typically accompanied by errors in log
files.  You've provided none.  You've provided only subjective
observation which is rarely useful in troubleshooting.  If you provide
some Dovecot logging related to the problem we may be able to help.
Short of that we can only make wild ass guesses.

Are your clients subscribing all IMAP folders?  Are your clients
checking all folders for new mail?

-- 
Stan



Re: [Dovecot] Missing Messages on IOS device

2012-11-27 Thread Timo Sirainen
On 28.11.2012, at 5.21, David Morsberger wrote:

 My IMAP clients are not showing all my emails. The Mail App on my iPhone and 
 iPad is behaving the worse. I can see the emails that are not showing up in 
 the cur directory.

Delete the account on iPhone and recreate it. Does that help?