Hi
I am trying to configure the last_login plugin with LDAP dictionary which is causing dict service to crash. Not sure if this is a bug or some configuration parameter I'm getting wrong?
Running latest dovecot but was having the same problem in earlier version 2.2.25
# dovecot --version 2.2.28 (bed8434)
I have configured dovecot like so:
dovecot.conf (before conf.d/*.conf: dict { #quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext #expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext lastlogin = ldap:/etc/dovecot/dovecot-ldap-dict.conf.ext }
conf.d/10-master.conf service dict { # If dict proxy is used, mail processes should have access to its socket. # For example: mode=0660, group=vmail and global mail_access_groups=vmail unix_listener dict { mode = 0660 user = vmail group = vmail } }
conf.d/20-imap.conf: protocol imap { # Space separated list of plugins to load (default is global mail_plugins). mail_plugins = $mail_plugins last_login
# Maximum number of IMAP connections allowed for a user from each IP address. # NOTE: The username is compared case-sensitively. #mail_max_userip_connections = 10 }
90-plugins.conf plugin { #setting_name = value #last_login_dict = proxy::lastlogin last_login_dict = proxy:dict:lastlogin zlib_save = gz zlib_save_level = 6 }
dovecot-ldap-dict.conf.ext: uri = ldap://ldap.internal bind_dn = cn=Manager,dc=mail,dc=com password = XXXX tls = no debug = 1
map { pattern = last-login/$user filter = (&(mail=%{user})(objectClass=mailUser)) # the () is required base_dn = o=domains,dc=mail,dc=com username_attribute = mail value_attribute = lastLoginTime fields { mail=$user } }
I don't see dovecot ever making a connection to the LDAP server I've configured in the dovecot-ldap-dict.conf.ext file.
Log shows
==> /var/log/dovecot.log <==
Mar 22 07:49:30 imap-login: Info: Login: user=leon@mail.com,
method=PLAIN, rip=X.X.X.X, lip=X.X.X.X, mpid=36105, secured,
session=
Backtrace:
# gdb /var/core/36107
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-94.el7
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 "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
[New LWP 36107]
Reading symbols from /usr/libexec/dovecot/dict...Reading symbols from
/usr/lib/debug/usr/libexec/dovecot/dict.debug...done.
done.
Missing separate debuginfo for
Try: yum --enablerepo='*debug*' install
/usr/lib/debug/.build-id/b0/07fede01895dec1aca9d8b8993fe27d70a3a20
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `dovecot/dict'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000000000 in ?? ()
(gdb) bt full
#0 0x0000000000000000 in ?? ()
No symbol table info available.
#1 0x00007fbcf11bd04f in cmd_begin (cmd=0x7fbcf2c02910, line=<optimized
out>) at dict-commands.c:365
trans = 0x7fbcf2c029a0
id = 1
#2 0x00007fbcf11bdef8 in dict_command_input
(conn=conn@entry=0x7fbcf2bf24d0, line=line@entry=0x7fbcf2bf48cb "B1") at
dict-commands.c:625
cmd_func = 0x7fbcf13c85c0