This script simplifies the setup of a secure server with email configuration using an Ubuntu system. It's inspired by Derek Sivers' script and relies on a refactored version of a script he wrote for OpenBSD operating systems. Let's get your server up and running independently!
- Run as Root:
sudo ./ubuntu_email_config.sh
- Enter the required information as prompted.
- The script will handle the initial setup, download essential configuration files, and guide you through the setup.
- Once done, reboot your system to apply the changes.
- Ubuntu system
- Root access (sudo privileges)
The script will download the following configuration files:
httpd.conf
: HTTP server configurationrelayd.conf
: Relay daemon configurationacme-client.conf
: ACME client configuration for Let's Encrypt.muttrc
: Mutt email client configuration.mailcap
: Mailcap configuration for MIME typesdovecot.conf
: Dovecot IMAP and POP3 server configuration
Note: If pf.conf
is found, it will be moved to /etc/pf.conf
, which may not be relevant for Ubuntu.
-
Domain Name:
- Enter your domain name when prompted.
-
Username:
- Provide a lowercase username with no spaces.
-
Verify Email and Login:
- Confirm that the displayed email and login details are correct.
- The script also configures:
ufw
firewall to allow SSH, HTTP, and HTTPS traffic.
Congratulations! 🎊 Your email setup is now complete. Reboot your system, and you're good to go!
Acknowledgment: Special thanks to Derek Sivers for this. Check out Derek Sivers' website for more insights.
Enjoy owning and controlling your own data! 📬✨