1 (edited by JerryAllen 2014-08-15 04:25:14)

Topic: Dovecot 2 last login tracking

==== Required information ====
- iRedMail version: iRedMail-0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Debian 7.6 (wheezy)
- Related log if you're reporting an issue:
====

Coming from a very old iRedmail with a full new install and migration. I am down to last login tracking. The official docs for dovecot are really not clear on how to accomplish this with dovecot 2.x

Has anyone a working example of last login tracking with Dovecot 2.x ?

Jerry Allen

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Dovecot 2 last login tracking

I think its official doc is pretty clear:
http://wiki2.dovecot.org/PostLoginScripting

3

Re: Dovecot 2 last login tracking

I have got to be doing this in the wrong config file then. Follows is the config that I used, no errors logged it simply did not execute lastlogin.sh

/etc/dovecot/conf.d/10-master.conf

...
service pop3 {
executable = pop3 pop3-postlogin
  # Max. number of POP3 processes (connections)
  #process_limit = 1024
}

service pop3-postlogin {
  executable = script-login /usr/sbin/lastlogin.sh
  user = $default_internal_user
  unix_listener pop3-postlogin {
  }
}

...
lastlogin.sh (very simple test)
#!/bin/sh
/bin/date >> /tmp/lastlogin
echo test >> /tmp/lastlogin
exec "$@"

4

Re: Dovecot 2 last login tracking

Dovecot does not auto load the conf.d directory.

On to getting the database update.

Jerry Allen

5

Re: Dovecot 2 last login tracking

iRedMail configures Dovecot to read /etc/dovecot/dovecot.conf as main config file, it doesn't include other files under /etc/dovecot/conf.d/. So please just update dovecot.conf.