Re: [Dovecot] panic in dovecot when using fts with solr

2013-03-03 Thread Andre Rodier

Hello again,

Sorry for the duplicate post earlier.

My dovecot version is 2.1.7-7 (included in Debian Wheezy)

I don't think that addinf doveconf output would be useful, but I can add 
it if you are interested.


Kind regards,
André Rodier

On 02/03/13 22:57, Andre Rodier wrote:

Hello All,

I have a panic error in dovecot when I try to use the fts search with Solr.

The version of dovecot I use is version 2.1

I have used a telnet session to search, but I don't know if this make a
difference:

telnet localhost imap
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
1 login andre-rodier XX
1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND
UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE
QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS
SPECIAL-USE SEARCH=FUZZY QUOTA ACL RIGHTS=texk] Logged in
2 select Inbox
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk
$labels_4f9cce7caf4df $Forwarded $MDNSent Junk $labels_50f53a5862fb9
$label2 $label1 $label4 $label3 announce announces
$ulabels_50f548e03429e feedback)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk
$labels_4f9cce7caf4df $Forwarded $MDNSent Junk $labels_50f53a5862fb9
$label2 $label1 $label4 $label3 announce announces
$ulabels_50f548e03429e feedback \*)] Flags permitted.
* 2158 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1354776694] UIDs valid
* OK [UIDNEXT 2568] Predicted next UID
* OK [HIGHESTMODSEQ 9739] Highest
2 OK [READ-WRITE] Select completed.
3 search text Valentine
* OK Searched 47% of the mailbox, ETA 0:10
* OK Searched 79% of the mailbox, ETA 0:05
* SEARCH 1120 1238 1279 1975 1990 1991 1992 1998 1999 2000 2001 2002
2058 2106 2107 2110 2151
3 OK Search completed (32.210 secs).


--
Mar 2 22:48:02 lapetus dovecot: indexer-worker(andre
rod...@indiefield.co.uk): Panic: file solr-connection.c: line 545
(solr_connection_post_more): assertion failed: (maxfd >= 0)
Mar 2 22:48:02 lapetus dovecot: indexer-worker(andre
rod...@indiefield.co.uk): Error: Raw backtrace:
/usr/lib/dovecot/libdovecot.so.0(+0x4414a) [0x7f5f4237214a] ->
/usr/lib/dovecot/libdovecot.so.0(+0x4418e) [0x7f5f4237218e] ->
/usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f5f4234982a] ->
/usr/lib/dovecot/modules/lib21_fts_solr_plugin.so(solr_connection_post_more+0x249)
[0x7f5f402d48d9] ->
/usr/lib/dovecot/modules/lib21_fts_solr_plugin.so(+0x4ac7)
[0x7f5f402d1ac7] ->
/usr/lib/dovecot/modules/lib20_fts_plugin.so(fts_build_mail+0x339)
[0x7f5f408f1f19] ->
/usr/lib/dovecot/modules/lib20_fts_plugin.so(+0xc6e0) [0x7f5f408f66e0]
-> dovecot/indexer-worker(+0x28d4) [0x7f5f42ae88d4] ->
/usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x36) [0x7f5f4237f016]
-> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xa7)
[0x7f5f4237fcc7] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x28)
[0x7f5f4237ea28] ->
/usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13)
[0x7f5f4236b483] -> dovecot/indexer-worker(main+0xfe) [0x7f5f42ae834e]
-> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)
[0x7f5f41fc2ead] -> dovecot/indexer-worker(+0x23f5) [0x7f5f42ae83f5]
Mar 2 22:48:02 lapetus dovecot: indexer: Error: Indexer worker
disconnected, discarding 1 requests for andre rod...@indiefield.co.uk
Mar 2 22:48:02 lapetus dovecot: imap(andre rod...@indiefield.co.uk):
Error: indexer failed to index mailbox INBOX
Mar 2 22:48:02 lapetus dovecot: indexer-worker(andre
rod...@indiefield.co.uk): Fatal: master: service(indexer-worker): child
19644 killed with signal 6 (core dumps disabled)
--

Regards,
Andre




[Dovecot] tcpwrap: Fatal: master: service(tcpwrap): child $PID killed with signal 11

2013-03-03 Thread Pascal Volk
Hi Timo,

today I've started Dovecot v2.2.rc2 (976bf9e69367) for the first time.

/var/log/mail.log:

Mar  3 14:28:33 mail dovecot: master: Dovecot v2.2.rc2 (976bf9e69367) starting 
up
Mar  3 14:28:38 mail dovecot: master: Error: service(tcpwrap): command startup 
failed, throttling for 2 secs
Mar  3 14:28:38 mail dovecot: tcpwrap: Fatal: master: service(tcpwrap): child 
$PID killed with signal 11 (core dumped)
Mar  3 14:28:38 mail dovecot: imap-login: Error: read(tcpwrap) failed: 
Connection reset by peer
Mar  3 14:28:38 mail dovecot: imap-login: access(tcpwrap): Client refused 
(rip=$RIP)
Mar  3 14:28:38 mail dovecot: auth: pgsql(/var/run/postgresql): Connected to 
database mailsys


Regards,
Pascal
-- 
The trapper recommends today: f007ba11.1306...@localdomain.org
el-tio ~ # gdb /usr/local/libexec/dovecot/tcpwrap /var/run/dovecot2/core
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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 "x86_64-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/local/libexec/dovecot/tcpwrap...done.
[New LWP 29930]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `dovecot/tcpwrap'.
Program terminated with signal 11, Segmentation fault.
#0  0x7fd7c345caf4 in master_service_init (name=0x4016b7 "tcpwrap", 
flags=0, argc=0x7fffc2c0920c, argv=0x7fffc2c09200, getopt_str=0x0) at 
master-service.c:153
153 service->getopt_str = *getopt_str == '\0' ?
(gdb) bt full
#0  0x7fd7c345caf4 in master_service_init (name=0x4016b7 "tcpwrap", 
flags=0, argc=0x7fffc2c0920c, argv=0x7fffc2c09200, getopt_str=0x0) at 
master-service.c:153
service = 0x9875b0
value = 0x7fd7c372e310 
"UH\211\345AWAVAUATE1\344S1\333H\203\354HH\307E\260"
count = 0
__FUNCTION__ = "master_service_init"
#1  0x004014d0 in main (argc=1, argv=0x987390) at tcpwrap.c:115
No locals.
(gdb)
# 2.2.rc2 (976bf9e69367): /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.0 
auth_mechanisms = plain login cram-md5
base_dir = /var/run/dovecot2
debug_log_path = /var/log/dovecot_dbg.log
dict {
  quota = pgsql:/usr/local/etc/dovecot/dovecot-dict-sql.conf.ext
}
first_valid_gid = 7
first_valid_uid = 7
hostname = mail.example.com
listen = 192.0.2.1, 127.0.0.1, ::1, 2001:db8:4:f1::4
lmtp_save_to_detail_mailbox = yes
login_access_sockets = tcpwrap
mail_access_groups = dovemail
mail_location = mdbox:~/mdbox
mail_plugins = quota stats zlib
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 {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix = 
  separator = /
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  quota = dict:user:%{uid}:noenforcing:proxy::quota
  quota_rule = *:storage=2G:messages=0
  quota_rule2 = Trash:storage=+100M
  recipient_delimiter = +
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  stats_refresh = 1min
  zlib_save = bz2
  zlib_save_level = 6
}
postmaster_address = postmas...@example.com
protocols = lmtp pop3 imap sieve
service auth-worker {
  unix_listener auth-worker {
group = $default_internal_user
mode = 0660
user = doveauth
  }
  user = doveauth
}
service auth {
  client_limit = 1425
  unix_listener /var/spool/postfix/private/dovecot-auth {
group = postfix
mode = 0600
user = postfix
  }
  user = doveauth
}
service dict {
  idle_kill = 150 secs
  unix_listener dict {
group = dovemail
mode = 0660
  }
}
service imap-login {
  process_limit = 256
}
service imap {
  process_limit = 256
}
service lmtp {
  executable = lmtp -D
  inet_listener lmtp {
address = ::1 127.0.0.1
port = 24
  }
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
}
service stats {
  fifo_listener stats-mail {
mode = 0666
  }
}
service tcpwrap {
  unix_listener login/tcpwrap {
group = $default_login_user
mode = 0600
user = $default_login_user
  }
}
ssl = required
ssl_cert = 
  mail_plugins = quota stats zlib imap_quota imap_stats imap_zlib
}
protocol lmtp {
  mail_plugins = quota stats zlib sieve
}


Re: [Dovecot] Random LDA failure to access auth socket

2013-03-03 Thread Daniel Parthey
Hi Chris,

Chris Richards wrote:
> service auth {
>   unix_listener /var/spool/postfix/private/auth {
> group = postfix
> mode = 0666
> user = postfix
>   }
>   unix_listener auth-userdb {
> group = vmail
> mode = 0600
> user = vmail
>   }
>   user = $default_internal_user
> }

In order for dovecot-lda to work, default internal user "dovecot"
seems to need permission for the user listing. This should work,
but you should try to narrow the permissions down:

service auth {
  unix_listener auth-userdb {
group = dovecot
mode = 0666
user = dovecot
  }
}

Documentation http://wiki2.dovecot.org/LDA says:

The auth-userdb socket can be used to do userdb lookups for given usernames or
get a list of all users. Typically the result will contain the user's UID, GID
and home directory, but depending on your configuration it may return other
information as well. So the information is similar to what can be found from
eg. /etc/passwd for system users. This means that it's probably not a problem
to use mode=0666 for the socket, but you should try to restrict it more just to
be safe.

> hermes conf.d # stat /usr/libexec/dovecot/deliver
>   File: '/usr/libexec/dovecot/deliver' -> 'dovecot-lda'
>   Size: 11  Blocks: 0  IO Block: 4096   symbolic link
> Device: 805h/2053d  Inode: 267375  Links: 1
> Access: (0777/lrwxrwxrwx)  Uid: (0/root)   Gid: (0/root)
> Access: 2012-11-24 17:44:04.440976879 +
> Modify: 2012-11-24 17:44:04.440976879 +
> Change: 2012-11-24 17:44:04.440976879 +
>  Birth: -

deliver is a symbolic link to dovecot-lda, so its basically the same.

> hermes conf.d # stat /usr/libexec/dovecot/dovecot-lda
>   File: '/usr/libexec/dovecot/dovecot-lda'
>   Size: 22432   Blocks: 48 IO Block: 4096   regular file
> Device: 805h/2053d  Inode: 849010  Links: 1
> Access: (0755/-rwxr-xr-x)  Uid: (0/root)   Gid: (0/root)
> Access: 2012-11-24 17:43:57.124794021 +
> Modify: 2012-11-24 17:44:02.204920992 +
> Change: 2012-11-24 17:44:04.444976978 +
>  Birth: -

No setuid/setgid flags set.

> >> In Postfix master.cf, I have the following:
> >> dovecot   unix -n   n   -   -   pipe
> >>   flags=DRhu user=vmail:users argv=/usr/libexec/dovecot/deliver -f
> >> ${sender} -d ${user}@${nexthop}

I'm wondering why user=vmail:users does not have the desired effect
and dovecot-lda uses the effective uid "dovecot" and effective gid "dovecot"
to do the user lookups.

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


[Dovecot] Exposing masteruser info to cllients via lmtp-proxy connections

2013-03-03 Thread Alexandr Sabitov
Hello,

Please somebody suggest me how to remove the "*masteruser" appendix from the 
dovecot director database while using masteruser authentication.

My situation is:
- all users get authenticated in LDAP on the dovecot-director frontend
- then they are forwarded to dovecot backend as username*masteruser ( this is a 
way how to proxy users with encrypted passwords). To enable it a added an extra 
field in LDAP-dovecot configuration: destuser=%u*masteruser

This works OK, but problems are:
- I have lmtp-proxy on the dovecot frontend and I have to use the same  
"%u*masteruser" field in lmtp passdb because the director thinks that 
m...@mail.com and m...@mail.com*masteruser are different users and would send 
lmtp-proxy connections to other dovecot backend.
Here is a problem: "Delivery-To" and "Received" fields in any email contains 
"*masteruser" ! I need to remove any mentions about "masteruser" authentication 
from client emails.

Also another little problem:
- If I run "doveadm status" tool then to get user's data I need to specify user 
as "username*masteruser"

Thank you in advance.

Alexandr Sabitov
Netregistry





Re: [Dovecot] Random LDA failure to access auth socket

2013-03-03 Thread Chris Richards

> In order for dovecot-lda to work, default internal user "dovecot"
> seems to need permission for the user listing. This should work,
> but you should try to narrow the permissions down:
>
> service auth {
>   unix_listener auth-userdb {
> group = dovecot
> mode = 0666
> user = dovecot
>   }
> }

I'll give this a whirl tomorrow during off-mail time.  I'm thinking there
was a reason I did vmail:users, but it's not coming to me at the moment.

I'm also puzzled by why lda is using dovecot:dovecot rather than
vmail:users.  Does it drop back to dovecot:dovecot and retry if the
requested uid:gid fails to work?  I can't imagine where postfix would get
uid:gid of dovecot:dovecot to call with, so I don't think it's a postfix
problem.

Thanks for your help!

Chris



[Dovecot] lda: duplicate prefix?

2013-03-03 Thread Larry Rosenman
I've just started using Dovecot, and can't seem to get the LDA to work.

I get the  following error:
Mar  4 00:47:19 thebighonker dovecot: lda(ler): Error: user ler:
Initialization failed: namespace configuration error: Duplicate namespace
prefix: ""
Mar  4 00:47:19 thebighonker dovecot: lda(ler): Fatal: Invalid user
settings. Refer to server log for more information.
Mar  4 00:47:19 thebighonker exim[76281]: 1UCPB8-000JqI-L7 ==
/home/ler/clamav-rules  R=userforward
T=address_file_dovecot defer (0): Child process of address_file_dovecot
transport returned 75 (could mean temporary error) from command:
/usr/local/libexec/dovecot/dovecot-lda


dovecot -n attached.

the invocation from my exim config for other than inbox:

address_file_dovecot:
  driver = pipe

  # Use /usr/lib/dovecot/dovecot-lda  if using Debian's package.
  # You may or may not want to add -d $local_part@$domain depending on if
you ne
ed a userdb lookup done.
  command = /usr/local/libexec/dovecot/dovecot-lda -f $sender_address -m
~/mail/
${sg{$address_file}{$home}{}}

  message_prefix =
  message_suffix =
  log_output
  delivery_date_add
  envelope_to_add
  return_path_add
  #group = mail
  #mode = 0660
  temp_errors = 64 : 69 : 70: 71 : 72 : 73 : 74 : 75 : 78


What am I doing wrong?
-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 (c) E-Mail: larry...@gmail.com
US Mail: 430 Valona Loop, Round Rock, TX 78681-3893


dovecot.n.conf
Description: Binary data