GoDom is a command-line tool written in Go, designed to check the validity of domain names and SSL certificates expirations, and then send notifications via email. It's an efficient way to stay ahead of domain and SSL renewals, ensuring your websites and services remain uninterrupted.
- Check domain validity and SSL certificate expiration from a list of domains.
- Send email notifications with domain validity and SSL expiration details.
- Supports reading a list of domains from a file.
- Configurable via command-line arguments for flexibility and ease of use.
- Go 1.20 or higher recommended (for build).
- Access to an SMTP server for sending emails.
- (Optional) Making a cronjob out of this is the intended way to use it.
-
Download the binary with wget:
wget https://github.com/KeepSec-Technologies/GoDom/releases/download/1.1/godom_linux_amd64_1.1.tar.gz
-
Unpack it with tar
tar -xf godom_linux_amd64_1.1.tar.gz
-
Move it to your /usr/local/bin/ (Optional):
sudo mv godom /usr/local/bin/godom
-
I recommend making it a cronjob like so (Optional):
Put this in '/etc/cron.d/godom-cron':
0 0 1 * * root /usr/local/bin/godom -c path/to/config.json -t admin@example.com -d path/to/domains.txt
This will run the first of every month.
-
Ensure you have Go installed on your system. You can download Go from here.
-
Clone the repository:
git clone https://github.com/KeepSec-Technologies/GoDom
-
Navigate to the cloned directory:
cd GoDom
-
Build the tool:
CGO_ENABLED=0 go build -a -installsuffix cgo -o godom .
Put your domains in a text file, eg: domains.txt:
example.com
example.org
example.ca
Run the GoDom tool with the required flags:
./godom --smtp-server <smtp_server> --smtp-port <smtp_port> \
--smtp-username <username> --smtp-password <password> \
--from-email <from_email> --to-email <to_email> \
--domains-file <path_to_domains_file>
Flags:
-s, --smtp-server SMTP server for sending emails
-p, --smtp-port SMTP server port
-u, --smtp-username Username for SMTP authentication
-w, --smtp-password Password for SMTP authentication
-f, --from-email Email address to send notifications from
-c, --config Path to the SMTP json config file which replaces the above arguments
-t, --to-email Email address to send notifications to
-d, --domains-file Path to the file containing domain names
Examples:
./godom -s smtp.example.com -p 587 -u user@example.com -w password123 -f godom@example.com -t admin@example.com -d domains.txt
or
./godom -c path/to/config.json -t admin@example.com -d domains.txt
Example of json config file to pass to GoDom:
{
"smtp_server": "mail.example.com",
"smtp_port": 587,
"smtp_username": "user@example.com",
"smtp_password": "password123",
"from_email": "mail2go@example.com"
}
Contributions are welcome! Feel free to submit pull requests or open issues to improve the functionality or fix problems with GoDom.
This project is licensed under MIT - see the LICENSE file for details.