Email programs connect to your server's IMAP service on port 993 with SSL. For this to work, the IMAP hostname must be valid, must point to this server, and must have a matching SSL certificate. /go/checkimap tests all three, in that order. It: When the hostname or DNS is wrong, it also alerts the administrator by email and WhatsApp. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
/go/checkimap
Options
None. Any arguments you pass are ignored.
Examples
# Check IMAP
/go/checkimap
# See which hostname the command checks
cat /etc/imap
# Check the A record yourself
dig imap.example.com +short
# See which certificate port 993 is using
openssl s_client -connect localhost:993 </dev/null 2>/dev/null | grep -i subject
Output
The command prints nothing when everything is correct. Otherwise it prints one of these messages and stops with status 1:
| Message | Meaning |
|---|---|
Invalid IMAP Hostname (<hostname>), IMAP hostname should consist of a name and a domain name. All valid hostnames should have 2 dots in them. |
The hostname in /etc/imap has fewer than 2 dots, for example example.com. Use a name such as imap.example.com. |
Please Point <hostname> to A Record: <server-ip> |
The hostname does not resolve to this server’s public IP address. |
Each of these two problems also sends the administrator an email and a WhatsApp message with the same text.
A certificate repair prints nothing of its own. You may see raw openssl messages on screen during the check. Each run adds a line to /var/log/go/checkimap.log.
See the full reference at /go/checkimap and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
