1 (edited by Energia 2014-11-04 15:01:40)

Topic: A easy way to list out mail accounts that have not been used (logged o

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

Hi, is it an easy way to list accounts that is not in use. i.e. user have no logged on within the last 100 days?

----

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

2

Re: A easy way to list out mail accounts that have not been used (logged o

Unfortunately, no.

You can filter account login info in Dovecot log file.

3 (edited by bartoruiz 2014-11-05 14:33:05)

Re: A easy way to list out mail accounts that have not been used (logged o

Energia wrote:

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

Hi, is it an easy way to list accounts that is not in use. i.e. user have no logged on within the last 100 days?

http://www.iredmail.org/forum/topic379- … tocol.html
http://wiki2.dovecot.org/PostLoginScripting

Here is my postlogin.sh file:

----------------------
#!/bin/sh
echo "UPDATE mailbox SET lastlogindate = now(), lastloginipv4 = '$IP' WHERE username = '$USER'" | /usr/local/bin/mysql -uvmailadmin -pYOURMYSQLPASSWORD vmail
exec "$@"
----------------------

I also edited lastloginipv4 field to varchar(15)