Zimbra Mail Commands 8.5

Created: July 23, 2018, 7:45 p.m.
Update: March 31, 2020, 11:47 p.m.
Line commands for Zimbra Virtual Env

Ambience

Ubuntu Linux
Zimbra 8.8
$$ = zimbra user / sudo su - zimbra
$ = root user

Importants log to check

/opt/zimbra/log/audit.log
/opt/zimbra/log/mail.log

How to close a lot emails accounts. List all email accounts of server. Export for a file and select accounts that will be closed.

$$ zmprov -l gaa > /tmp/accounts

Format:

gente@domain.com	active      07/11/12 11:12   07/18/12 11:46
baffa@domain.com active 11/12/11 13:02 never
tatiane@domain.com lockout 02/10/12 09:19 03/02/16 16:03
thales@domain.com active 01/20/16 10:20 01/04/17 09:58
thiago@domain.com active 05/11/15 10:26 06/07/17 10:31
santos@domain.com locked 11/12/11 13:02 12/17/15 12:56
many@domain.com lockout 10/09/15 10:10 10/21/15 23:13

Commad to close each account, bash!

$$ IFS=$'\n'
$$ for X in `cat /tmp/accounts`;
do AC=$(echo $X| cut -d '@' -f1);
zmprov ma $AC zimbraAccountStatus closed;
echo $AC;
done;
How to delete LOT of messages in queue from a email address?
A email account using a weak password was used to spam and I had a big problem per 2 full days, 350 thousand emails come back to account SPAM. How to fix this?! A simple line command! :)

CBPolicy - Easy Install

After a hacked account, the STUPID sent 80 thousand emails by 24 hours. The best way to avoid this is a diary limit to send email.

Install http://imanudin.net/20

Set Rules 

limit to send
limit to receive
log to check quota=2.71/2 (135.5%)


Tiago de Souza Moraes - teago.futuria.com.br - 2020 // CSS by UIKIT CSS