GWilliams-Notes: Difference between revisions
No edit summary |
|||
Line 72: | Line 72: | ||
#!/bin/bash | #!/bin/bash | ||
domain="domain.com" | domain="domain.com" | ||
message="From: Postmaster <postmaster@\${RECIPIENT_DOMAIN}>\${NEWLINE}To: \${RECIPIENT_NAME} <\${RECIPIENT_ADDRESS}>\${NEWLINE}Subject: *** | message="From: Postmaster <postmaster@\${RECIPIENT_DOMAIN}>\${NEWLINE}To: \${RECIPIENT_NAME} <\${RECIPIENT_ADDRESS}>\${NEWLINE}Subject:***WARNING - your mailbox size is nearing your quota - please archive or delete some messages***\${NEWLINE}Date: \${DATE}\${NEWLINE}Content-Type: text/plain\${NEWLINE}\${NEWLINE}Your mailbox size has reached \${MBOX_SIZE_MB}MB, which is over \${WARN_PERCENT}% of your \${QUOTA_MB}MB quota.\${NEWLINE}If your mailbox reaches the quota you may not be able to send or receive any new mail.\${NEWLINE}Please archive or delete some messages to avoid exceeding your quota.\${NEWLINE}\(Please contact your IT Department if you require assistance witharchiving to a local folder.\)\${NEWLINE}N.B. Remember that any messages left in your Trash folder are included in your quota and that the Trash folder must be emptied to free up that space.\${NEWLINE}" | ||
output="/tmp/quotamessage" | output="/tmp/quotamessage" | ||
rm -f $output | rm -f $output | ||
touch $output | touch $output | ||
chmod +x $output | |||
echo "#!/bin/bash" > $output | |||
/opt/zimbra/bin/zmprov -l gaa | grep $domain | while read line | /opt/zimbra/bin/zmprov -l gaa |grep $domain|sort|while read line | ||
do | do | ||
user=`echo $line` | user=`echo $line|cut -f1 -d " "` | ||
/opt/zimbra/bin/zmprov -l ma $user zimbraQuotaWarnMessage $message | echo "/opt/zimbra/bin/zmprov -l ma $user zimbraQuotaWarnMessage \"$message\"" >> $output | ||
done | done | ||
sed -i 's/\$/\\\$/g' $output | |||
$output | |||
[[Category:Notes]] | [[Category:Notes]] |
Latest revision as of 14:52, 16 September 2010
ZCS 6.x
Create Domain Admin User
Create Domain, Account and Distribution List
su - zimbra /opt/zimbra/bin/zmprov -m -l cd domain.com /opt/zimbra/bin/zmprov -m -l ca manager@domain.com zimbraIsDelegatedAdminAccount TRUE zimbraIsDomainAdminAccount TRUE /opt/zimbra/bin/zmprov -m -l cdl zimbraDomainAdmins@domain.com zimbraIsAdminGroup TRUE zimbraMailStatus disabled zimbraAdminConsoleUIComponents accountListView zimbraAdminConsoleUIComponents aliasListView zimbraAdminConsoleUIComponents DLListView zimbraAdminConsoleUIComponents resourceListView zimbraAdminConsoleUIComponents saveSearch /opt/zimbra/bin/zmprov -m -l grr domain domain.com grp zimbraDomainAdmins@domain.com +domainAdminConsoleRights /opt/zimbra/bin/zmprov -m -l grr global grp zimbraDomainAdmins@domain.com +domainAdminZimletRights
Set Global Admin Rights and reset to Normal Rights
- Log into webAdminUI as global admin
- Set manager@domain.com as member of zimbraDomainAdmins@domain.com
- Set manager@domain.com as global admin
- Log out of webAdminUI
- Log into webAdminUI as manager@domain.com
- Log out of webAdminUI
- Log into webAdminUI as global admin
- Remove global admin for manager@domain.com
- Log out of webAdminUI
- Log into webAdminUI as manager@domain.com (might need to wait a couple of minutes - depends on server performance)
Domain Admin link when logged in as user
zmprov md <domain_name> zimbraWebClientAdminReference <domain_admin_site>
zmprov md mail.domain.com zimbraWebClientAdminReference https://admin.domain.com:7071/
Restart Zimbra mailbox service
zmmailboxdctl restart
Admin Console tabs and buttons missing
"Rights", "Global ACL" and "Account limits tab" missing? Log into CLi and run:
su - zimbra zmzimletctl listZimlet all
Check that "com_zimbra_delegatedadmin" zimlet is deployed. I found that it was deployed, but was disabled on my LDAP server. I fixed this by running:
zmzimletctl enable com_zimbra_delegatedadmin
Viola... All my missing admin buttons and tabs appeared.
Backups
- Configure e-mail settings for backup reports:
zmprov gacf | grep -i backup zmprov mcf zimbraBackupReportEmailRecipients e@mail.address zmprov mcf zimbraBackupReportEmailSender e@mail.address zmprov mcf zimbraBackupReportEmailSubjectPrefix Subject of message
- Display current backup schedule:
zmschedulebackup -q
- To display the schedules on one line as a command, so that they can be copied to a text file and saved to be used if the application needs to be restored.
zmschedulebackup -s
- To schedule the default full and incremental backup
zmschedulebackup -D
- To replace the existing schedule with a new schedule
zmschedulebackup -R f [“schedule”]
- To add an additional full backup to the existing schedule
zmschedulebackup -A f [“schedule”]
- To add an additional incremental backup to the existing schedule
zmschedulebackup -A i [“schedule”]
- Example:
zmschedulebackup -R f "0 1 * * 6" i "0 1 * * 0-5" d 14d "0 0 * * *"
Directing Users to the correct Change Password Page
- Set the zimbraChangePasswordURL attribute to the URL of your password change page. The Change Password link in the Preferences>General tab goes to this URL and when passwords expire, users are sent to this page.
- This is changed from the zmprov CLI.
zmprov md exampledomain.com zimbraChangePasswordURL https://mail.exampledomain.com/h/changepass
Modify zimbraQuotaWarnMessage for an entire domain
Explanation of script:
- This script will getAllAccounts for the domain ("domain.com" in this case) and will modify the default zimbraQuotaWarnMessage attribute with the "message" for all those accounts.
#!/bin/bash domain="domain.com" message="From: Postmaster <postmaster@\${RECIPIENT_DOMAIN}>\${NEWLINE}To: \${RECIPIENT_NAME} <\${RECIPIENT_ADDRESS}>\${NEWLINE}Subject:***WARNING - your mailbox size is nearing your quota - please archive or delete some messages***\${NEWLINE}Date: \${DATE}\${NEWLINE}Content-Type: text/plain\${NEWLINE}\${NEWLINE}Your mailbox size has reached \${MBOX_SIZE_MB}MB, which is over \${WARN_PERCENT}% of your \${QUOTA_MB}MB quota.\${NEWLINE}If your mailbox reaches the quota you may not be able to send or receive any new mail.\${NEWLINE}Please archive or delete some messages to avoid exceeding your quota.\${NEWLINE}\(Please contact your IT Department if you require assistance witharchiving to a local folder.\)\${NEWLINE}N.B. Remember that any messages left in your Trash folder are included in your quota and that the Trash folder must be emptied to free up that space.\${NEWLINE}" output="/tmp/quotamessage" rm -f $output touch $output chmod +x $output echo "#!/bin/bash" > $output /opt/zimbra/bin/zmprov -l gaa |grep $domain|sort|while read line do user=`echo $line|cut -f1 -d " "` echo "/opt/zimbra/bin/zmprov -l ma $user zimbraQuotaWarnMessage \"$message\"" >> $output done sed -i 's/\$/\\\$/g' $output $output