Zimbra: Get mailbox size with status, created and last login date

Shell script to get mailbox size with status, created and last login date in Zimbra Server

zmaccts | grep “@” | awk ‘{print $1}’ > /tmp/mboxes.list
date > /tmp/mboxsize.txt
#echo “\n” >> /tmp/mboxsize.txt
for mb in `cat /tmp/mboxes.list`;
do
status=`zmaccts | grep $mb | awk ‘{print $1,”,”$2,”,”$3,”,”$5}’`;
msize=`zmmailbox -z -m $mb gms`;
echo “$status,$msize” >> /tmp/mboxsize.txt
done
echo “Completed”

Posted in Zimbra | Leave a comment

Zimbra fix: A network service error has occurred on Zimbra web client

By default Zimbra uses DoSFilter Throttling Mechanism to avoid large number of request over a short period of time. So if the Zimbra server see requests more than safe amount from an specific IP address / user that will be throttled and the user may face the “A network service error has occurred” error.

This feature is available in 8.5+ to prevent a malicious IP from trying brute force attacks.
For ZCS 8.7 or above

zmprov mcf zimbraHttpThrottleSafeIPs 10.1.1.2/32 zimbraHttpThrottleSafeIPs 192.168.9.0/24

or to append to an existing list of multi-valued zimbraHttpThrottleSafeIPs

zmprov mcf +zimbraHttpThrottleSafeIPs 10.1.1.2/32
zmprov mcf +zimbraHttpThrottleSafeIPs 192.168.9.0/24

For ZCS 8.6, 8.5 or previous

zmprov mcf zimbraHttpThrottleSafeIPs 10.1.1.2 zimbraHttpThrottleSafeIPs 192.168.9.5

or to append to an existing list of multi-valued zimbraHttpThrottleSafeIPs

zmprov mcf +zimbraHttpThrottleSafeIPs 10.1.1.2
zmprov mcf +zimbraHttpThrottleSafeIPs 10.1.1.50
zmprov mcf +zimbraHttpThrottleSafeIPs 192.168.9.5
zmprov mcf +zimbraHttpThrottleSafeIPs 192.168.9.6

Mailbox server restart is required when modifying these attributes.

zmmailboxdctl restart

Check these links below for more parameters on blocking

https://wiki.zimbra.com/wiki/DoSFilter
https://wiki.zimbra.com/wiki/Users_get_%27Network_service_error%27,_and_mailbox.log_shows_%27Access_to_IP_x.x.x.x_suspended,_for_repeated_failed_login%27

Posted in Zimbra | Leave a comment

Assign COS rights to user in Zimbra Server

zmprov grr global usr yourmail@yourdomain.com getCos
zmprov grr global usr yourmail@yourdomain.com listCos
zmprov grr global usr yourmail@yourdomain.com assignCos

Posted in Zimbra | Leave a comment

Enable Global Admin in Zimbra Server except “View Mail” option

zmprov ma admin@yourdomain.com zimbraAdminConsoleUIComponents accountListView  zimbraAdminConsoleUIComponents DLListView zimbraAdminConsoleUIComponents aliasListView zimbraAdminConsoleUIComponents resourceListView zimbraAdminConsoleUIComponents COSListView zimbraAdminConsoleUIComponents domainListView zimbraAdminConsoleUIComponents serverListView zimbraAdminConsoleUIComponents zimletListView zimbraAdminConsoleUIComponents adminZimletListView zimbraAdminConsoleUIComponents globalConfigView zimbraAdminConsoleUIComponents globalServerStatusView zimbraAdminConsoleUIComponents helpSearch zimbraAdminConsoleUIComponents saveSearch zimbraAdminConsoleUIComponents mailQueue zimbraAdminConsoleUIComponents backupsView zimbraAdminConsoleUIComponents certsView zimbraAdminConsoleUIComponents softwareUpdatesView zimbraAdminConsoleUIComponents bulkProvisionTasksView zimbraAdminConsoleUIComponents perServerStatisticsView zimbraAdminConsoleUIComponents globalPermissionView zimbraAdminConsoleUIComponents rightListView

Note: Below are list of Admin view’s available which can be assigned to delegated admin account.

Account List View           :    accountListView
Distribution List View      :    DLListView
Alias List View             :    aliasListView
Resource List View          :     resourceListView
Class of Service LIst View  :     COSListView
Domain List View            :    domainListView
Server List View            :    serverListView
Zimlet List View            :     zimletListView
Admin Zimlet List View      :    adminZimletListView
Global Settings View        :     globalConfigView
Global Server Status View   :    globalServerStatusView
Help Search View            :    helpSearch
Saved Searches View         :     saveSearch
Mail Queue View             :     mailQueue
Backups  View               :     backupsView
Certificates View           :     certsView
Software Updates            :     softwareUpdatesView
Account Migration           :    bulkProvisionTasksView
Per Server Statistics View  :     perServerStatisticsView
Global ACL View             :     globalPermissionView
Right List View             :    rightListView

Posted in Zimbra | Leave a comment

Revoke Rights for an admin user in Zimbra Server

zmprov revokeRight domain yourdomain.com usr email@yourdomain.com domainAdminRights
zmprov revokeRight domain yourdomain.com usr email@yourdomain.com domainAdminDistributionListRights

 

Posted in Zimbra | Leave a comment

Restrict admin access to specified domain in Zimbra Server using zimbraIsDelegatedAdminAccount

zmprov ma marskarthik@yourdomain.com zimbraAdminConsoleUIComponents accountListView zimbraAdminConsoleUIComponents DLListView zimbraAdminConsoleUIComponents COSListView zimbraAdminConsoleUIComponents rightListView
zmprov ma marskarthik@yourdomain.com zimbraIsDelegatedAdminAccount TRUE
zmprov ma marskarthik@yourdomain.com +zimbraAdminConsoleUIComponents accountListView
zmprov grr domain yourdomain.com usr marskarthik@yourdomain.com domainAdminRights
zmprov grr domain yourdomain.com usr marskarthik@yourdomain.com +deleteAccount
zmprov grr domain yourdomain.com usr marskarthik@yourdomain.com +listAccount
zmprov grr domain yourdomain.com usr marskarthik@yourdomain.com +renameAccount
zmprov grr domain yourdomain.com usr marskarthik@yourdomain.com +setAccountPassword
zmprov grr domain yourdomain.com usr marskarthik@yourdomain.com createAccount
zmprov grr domain yourdomain.com usr marskarthik@yourdomain.com listDomain
zmprov grr domain yourdomain.com usr marskarthik@yourdomain.com set.account.zimbraAccountStatus
zmprov grr domain yourdomain.com usr marskarthik@yourdomain.com set.account.sn
zmprov grr domain yourdomain.com usr marskarthik@yourdomain.com set.account.displayName
zmprov grr domain yourdomain.com usr marskarthik@yourdomain.com set.account.zimbraPasswordMustChange

Posted in Zimbra | Leave a comment

How to change admin account password in Zimbra Server

#zmprov sp admin@yourdomain.com YOURNEWPASSWORD

Posted in Zimbra | Leave a comment

How to create an Admin account in Zimbra Server

# zmprov ca accountname@yourdomain.com yourpassword zimbraIsAdminAccount TRUE

Posted in Zimbra | Leave a comment

How to change a normal user account to an Admin account in Zimbra Server

# zmprov ma accountname@yourdomain.com zimbraIsAdminAccount TRUE

Posted in Zimbra | Leave a comment

Check the MySQL DB for corruption in Zimbra Server

/opt/zimbra/libexec/zmdbintegrityreport -m -v

Posted in Zimbra | Leave a comment