I changed the script but the imap.log is empty.
I commited the delete lines in the script so the log files now exists on my system.
Started to do it manually:
Code:
/var/www/ispcp/engine/traffic# cat /var/log/mail.log|grep 'imap-login'|grep 'user='|grep 'body='|grep -v 'ip=\\[::ffff:127.0.0.1\\]'|awk '{print \$7,\$9,substr(\$10,1,length(\$10)-1);}'
awk: {print \$7,\$9,substr(\$10,1,length(\$10)-1);}
awk: ^ backslash not last character on line
Until here it works:
Code:
cat /var/log/mail.log|grep 'imap-login'|grep 'user='
Nov 28 12:52:18 vs248XX dovecot: imap-login: Login: user=<bene@mydomain.de>, method=plain, rip=217.243.170.XXX, lip=62.75.24X.XX, TLS
Nov 28 13:41:07 vs248XX dovecot: imap-login: Login: user=<bene@mydomainde>, method=plain, rip=217.243.170.XXX, lip=62.75.24X.XX, TLS
Looks like an awk error ?
Greez BeNe