#!/bin/sh
cd /etc/virtual
for i in `cat domains`; do
{
if [ ! -s $i/passwd ]; then
continue;
fi
for u in `cat $i/passwd | cut -d: -f1`; do
{
echo "$u@$i";
Here can wirte script:
-----------------------------------------------------------------------------------
first if
check log time from here > /home/$DAUSER/imap/$DOMAIN/$EMLUSER/Maildir/dovecot.index.log`
if email accounts and domain = $u@$i
second if look > today date.time - last login time bigger than "x" time
echo emailccount@domain was not login durin x time...
-------------------------------------------------------------------------------------
Hello,
Yes I can do it. But I don't have time. Maybe some other friends can do it faster for you.
And than you can add script auto suspend in it.
Its simple solution mentioned above. To make it better have to write that code OOP logic.