Compare commits

..

2 Commits

Author SHA1 Message Date
Matthew Saunders Brown
0f01c32bab info about mail server options 2024-03-14 15:22:38 -07:00
Matthew Saunders Brown
2f8c7c4781 check for dpkg lock, note about mail server 2024-03-14 15:22:09 -07:00
2 changed files with 24 additions and 2 deletions

View File

@ -3,6 +3,7 @@
Base Stack installs some basic applications and configs that are common to any server build. Specifically firewald & fail2ban to lock a server down. Base Stack installs some basic applications and configs that are common to any server build. Specifically firewald & fail2ban to lock a server down.
## Install ## Install
``` ```
cd /usr/local/src/ cd /usr/local/src/
git clone https://git.stack-source.com/msb/base-stack.git git clone https://git.stack-source.com/msb/base-stack.git
@ -10,6 +11,19 @@ cd base-stack
bash install.sh bash install.sh
``` ```
## MTA
For an integrated and full featured mail server configuration it's recommended to install vmail-stack:
https://git.stack-source.com/msb/vmail-stack
If you just want a minimal smtp mail server for getting automated emails (cron, website contact forms, etc.) off the server you can install and configure exim4-daemon-light with these commands:
```
apt -y install exim4-daemon-light mailutils
sed -i "s|dc_eximconfig_configtype='local'|dc_eximconfig_configtype='internet'|g" /etc/exim4/update-exim4.conf.conf
/usr/sbin/update-exim4.conf
systemctl restart exim4
echo "user@example.com" > /root/.forward
```
## License ## License
Copyright (c) 2022 Matthew Saunders Brown <matthewsaundersbrown@gmail.com>\ Copyright (c) 2022 Matthew Saunders Brown <matthewsaundersbrown@gmail.com>\
GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

View File

@ -9,7 +9,7 @@
# require root # require root
if [ "${EUID}" -ne 0 ]; then if [ "${EUID}" -ne 0 ]; then
echo "This script must be run as root" echo "This script must be run as root."
exit 1 exit 1
fi fi
@ -17,7 +17,14 @@ fi
os_id=`lsb_release -is` os_id=`lsb_release -is`
os_release=`lsb_release -rs` os_release=`lsb_release -rs`
if [ $os_id != Ubuntu ] || [ $os_release != 22.04 ]; then if [ $os_id != Ubuntu ] || [ $os_release != 22.04 ]; then
echo "this installer only runs on Ubuntu 22.04, bailing out" echo "This installer only runs on Ubuntu 22.04, bailing out."
exit 1
fi
if lsof /var/lib/dpkg/lock-frontend ; then
echo "Could not get lock /var/lib/dpkg/lock-frontend"
echo "See output above for info on what is holding the lock."
echo "What for the command above to complete, then re-run this script."
exit 1 exit 1
fi fi
@ -132,3 +139,4 @@ cp sbin/* /usr/local/sbin/
echo "" echo ""
echo "Unattended upgrades & fail2ban are configured to send notifications to $WEBMASTER." echo "Unattended upgrades & fail2ban are configured to send notifications to $WEBMASTER."
echo "Update /etc/apt/apt.conf.d/50unattended-upgrades and /etc/fail2ban/jail.local to suit your needs." echo "Update /etc/apt/apt.conf.d/50unattended-upgrades and /etc/fail2ban/jail.local to suit your needs."
echo "NOTE: No mail server has been installed and emails won't send without one. See the README for more info."