Overview
This guide walks you through the steps to reset the AppManager integration for KerioConnect on macOS systems when encountering registration issues.
Prerequisites
Note: GFIAgent is officially supported on macOS Big Sur and later versions. We do not officially support earlier versions of macOS.
Important: Switch to the root user to make sure all the commands are executed without issues.
Before starting the reset process, please verify that in the /usr/local/gfiagent folder, the “GFIAgentInstaller'' file is present.
If it is not, please download it to that directory using the commands shared below (use "sudo -i" command first to run the below instructions as a root user).
- For M1 machines:
cd /usr/local/kerio/GFIAgent/ curl -O https://appmanager.gfi.com/1.2.latest/darwin-arm64/GFIAgentInstaller
- For Intel machines:
cd /usr/local/kerio/GFIAgent/ curl -O https://appmanager.gfi.com/1.2.latest/darwin-amd64/GFIAgentInstaller
Make sure the installer has execute rights - in the above folder run the chmod +x GFIAgentInstaller
command.
Reset Process
Step 1: Stop KerioConnect Service
- Press `Command + Spacebar` to open Spotlight search.
- Type "Kerio Connect Monitor" and launch the application.
- Click "Stop Server" to stop the KerioConnect service.
Step 2: Stop GFIAgent Service
- Open Terminal.
- Execute the following command to stop the GFIAgent service:
sudo launchctl unload -w /Library/LaunchDaemons/gfiagent.plist
Note: This step may fail if the service is not running. This is expected and you can continue with the rest of the steps.
Step 3: Modify the 'mailserver.cfg' File
- Navigate to the Kerio Connect installation folder: /usr/local/kerio/mailserver
- Find and open the mailserver.cfg file.
- In the "AppManager" table, locate the variables "ApplianceId" and "RegistrationUrl". Empty their values. Ultimately, the table should look as below:
- Find the "SpecialAccount" table, find the node with the value ".CloudAdmin". Remove the entire <listitem> node that encompasses it (highlighted in the below image).
Step 4: Remove Agent Appliance Folder
- Navigate to the GFIAgent appliances directory:
cd /var/gfiagent/appliances
- Delete the configuration file and the appliance directory:
sudo rm -f config.toml
sudo rm -rf <alphanumeric_string_for_applianceID>
Note: If you see multiple "applianceIDs" in the folder, delete each of them one by one.
Step 5: Start KerioConnect Service
- Open "Kerio Connect Monitor" via Spotlight.
- Click "Start Server" to restart KerioConnect.
Step 6: Re-enable GFIAgent Service
- In Terminal, execute the following command to enable the GFIAgent service:
sudo launchctl load -w /Library/LaunchDaemons/gfiagent.plist
Step 7: Reinstall GFIAgent
- Reinstall the GFIAgent using the following command:
- For M1 machines:
sudo /usr/local/kerio/GFIAgent/GFIAgentInstaller kerio-connect /usr/local/kerio/ "https://appmanager.gfi.com/1.2.latest/darwin-arm64/"
- For Intel machines:
sudo /usr/local/kerio/GFIAgent/GFIAgentInstaller kerio-connect /usr/local/kerio/ "https://appmanager.gfi.com/1.2.latest/darwin-amd64/"
- For M1 machines:
Troubleshooting
If the register still fails, please check the Agent logs in the log section. If you find the below error in the logs, please follow the resolution steps stated below it:
"failed to load server configs: open /usr/local/gfiagent/mailserver/mailserver.cfg: no such file or directory".
Please navigate to the /usr/local/gfiagent folder and create a new folder within that , and name it "mailserver". Then, copy the current version of the mailserver.cfg file into that folder.
Conclusion
Following these steps should successfully reinstall the GFIAgent on your macOS system. Please try to register to AppManager again. If you continue to experience issues, please gather a fresh copy of the GFIAgent logs (from the logs section), as well as the mailserver.cfg file and share that with the GFI support team for further assistance.