31 Oct
2009
31 Oct
'09
5:09 p.m.
Hi, all.
I want to track user last login data (ip address, login date, etc)
with dovecot, followed dovecot tutorial[1], and it now works with
IMAP, but failed with POP3. i don't know why.
My script:
LDAP_URI='ldap://127.0.0.1:389' LDAP_BASEDN='o=domains,dc=iredmail,dc=org' BIND_DN='cn=vmailadmin,dc=iredmail,dc=org' BIND_PW='plain_passwd'
if [ X"${USER}" != X"dump-capability" ]; then
ldapmodify -c -x
-H "${LDAP_URI}"
-D "${BIND_DN}"
-w "${BIND_PW}" <
'{print $2}'),${LDAP_BASEDN}
changetype: modify
replace: lastLoginDate
lastLoginDate: $(date +%Y%m%d%H%M%SZ)
replace: lastLoginIP lastLoginIP: ${IP}
replace: lastLoginProtocol lastLoginProtocol: pop3 EOF
fi
It works with IMAP protocol, but failed with POP3 protocol. Error msg in Thunderbird:
The STAT command did not succeed. Error getting message number and
sizes.
Mail server r6.iredmail.org responsed: ying entry
"mail=www@a.cn,ou=Users,domainName=a.cn,o=domains,dc=iredmail,dc=org"
[1] Post-login scripting: http://wiki.dovecot.org/PostLoginScripting
-- Best Regards.
Zhang Huangbin
- Open Source Mail Server Solution for Red Hat(R) Enterprise Linux, CentOS, Debian, Ubuntu: http://www.iredmail.org/