Hey all, I'm running a script to normalize a build of our Zimbra product. It's a 1-server-per-small business based on the
Zimbra/Samba solution.
For additional information on my project click on the link next to my avatar: "todd_dsm's Zimbra Wiki Sandbox Page".
All works well except when making some zmprov modifications to normalize the install. I've cut the script down to relevant changes in the order of execution:
Code:
#!/bin/bash
export PATH=$PATH:/opt/zimbra/bin
export PATH=$PATH:/opt/zimbra/libexec
###---
### Turn off Server IMAP "Enable clear text login"
###---
infobreak ${LINENO} "Turning off Server imap clear text logins..."
zmprov ms zerver.${DOMAIN} zimbraImapCleartextLoginEnabled FALSE
check_errs $? "imap clear text logins are still enabled"
zmprov gas -v | grep zimbraImapCleartextLoginEnabled
###---
### Insure that the Reverse Proxy Lookup Target is set to false in the Server
###---
infobreak ${LINENO} "Turning off the zimbraReverseProxyLookupTarget in the Server..."
zmprov ms zerver.${DOMAIN} zimbraReverseProxyLookupTarget FALSE
check_errs $? "Server zimbraReverseProxyLookupTarget is still on"
zmprov gas -v | grep -i zimbraReverseProxyLookupTarget
###---
### The Global zimbraSmtpHostname is set to localhost on a single server install
### Set this variable to another resolvable host if there is more than 1
### and you wish to use the other for processing email.
### NOTE: This also changes the Server > MTA > 'Web mail MTA Hostname' (zimbraSmtpHostname).
###---
infobreak ${LINENO} "Insure the Global zimbraSmtpHostname resolves to:"
echo " Single Server: localhost"
echo " Multi Server: hostname of inbound MTA"
zmprov mcf zimbraSmtpHostname localhost
check_errs $? "zimbraSmtpHostname is still set to zerver.${DOMAIN}"
zmprov gcf zimbraSmtpHostname
###---
### Now do the same for the Server
###---
infobreak ${LINENO} "Now setting the Server to localhost as well..."
zmprov ms zerver.${DOMAIN} zimbraSmtpHostname localhost
check_errs $? "Server zimbraSmtpHostname is still set to zerver.${DOMAIN}"
zmprov gas -v | grep zimbraSmtpHostname
###---
### Turn off POP3 access in Global Settings:
### NOTE: All POP3 modifications have to be last in this script or else it will fail.
###---
infobreak ${LINENO} "Turning off Global POP3SSL access in Global Settings..."
zmprov mcf zimbraPop3SSLServerEnabled FALSE
check_errs $? "POP3SSL is still enabled in Global Settings"
zmprov gcf zimbraPop3SSLServerEnabled
infobreak ${LINENO} "Turning off POP3 access in Global Settings..."
zmprov mcf zimbraPop3ServerEnabled FALSE
check_errs $? "Pop3 Server is still Enabled in Global Settings"
zmprov gcf zimbraPop3ServerEnabled
###---
### Turn off POP3 access for clients in COS:
###---
infobreak ${LINENO} "Turning off COS External POP3 access in COS..."
zmprov mc default zimbraFeaturePop3DataSourceEnabled FALSE
check_errs $? "POP3 Data Source is still Enabled in COS"
zmprov gac -v | grep zimbraFeaturePop3DataSourceEnabled
infobreak ${LINENO} "Turning off COS Internal POP3 access in COS..."
zmprov mc default zimbraPop3Enabled FALSE
check_errs $? "POP3 is still Enabled in COS"
zmprov gac -v | grep zimbraPop3Enabled
###---
### Turn off POP3 access for clients in Server
###---
infobreak ${LINENO} "Turning off POP3SSLServer access in Server..."
zmprov ms zerver.${DOMAIN} zimbraPop3SSLServerEnabled FALSE
check_errs $? "Pop3 SSL is still Enabled in Server"
zmprov gas -v | grep zimbraPop3SSLServerEnabled
infobreak ${LINENO} "Turning off POP3 access in Server..."
zmprov ms zerver.${DOMAIN} zimbraPop3ServerEnabled FALSE
check_errs $? "Pop3 Server is still Enabled in Server"
zmprov gas -v | grep zimbraPop3ServerEnabled NOTE: The script runs without error and the check_errs function looks for a non zero exit status for each issued command. The error is encountered in the Admin UI.
All tabs in COS and Domain look as you would expect with the changes. The Server shows some odd behaviour though:
1) General Tab:
"This server is a reverse proxy lookup target" is highlighted in yellow and displays the
[Reset to Global value] button.
When you click the button, the yellow highlight goes away and the button disappears.
I would expect the change to have been made per the script and the button not to be displayed.
2) The MTA Tab:
"Web mail MTA Hostname" is highlighted in yellow and displays the
[Reset to Global value] button.
When you click the button, the yellow highlight goes away and the button disappears.
Again, I would expect the change to have been made per the script and the button not to be displayed.
3) The IMAP Tab:
"Enable clear text login" is not checked (per the script) it's highlighted in yellow and displays the
[Reset to Global value] button, and a message is displayed at the top: Note: Changes to settings requires server restart in order to take effect.
When you click the button, the yellow highlight goes away and the button disappears.
I would expect the change to have been made per the script and the button not to be displayed.
4) The POP Tab:
"Enable POP3 service" and "Enable SSL for POP3 service" are both unchecked and highlighted in yellow. The
[Reset to Global value] button is displayed to the right of "Enable POP3 service", and a message is displayed at the top: Note: Changes to settings requires server restart in order to take effect.
When you click the button, the yellow highlight and the button disappears for the "Enable POP3 service". Enable SSL for POP3 service is still highlighted in yellow with no button next to it.
After a reboot most changes are made. The Server IMAP and POP Tabs still display the message: Note: Changes to settings requires server restart in order to take effect. "Enable SSL for POP3 service" is still unchecked but also still highlighted in yellow with no button next to it.
There's an example of the Admin UI screen elements below.
Q: When making these changes with zmprov is there a certain order in which the commands should be executed in order to avoid this behaviour?
Q: What am I missing that I should be aware of?
Q: OR is this a defect?
Thanks in advance,
todd_dsm
Don't forget to Vote for this RFE:
RFE: A place To Display the contents of 'My Documents' Reasoning: It's new, bold, and cool.