From 5bce74f6fd4a5627eceecb5596ace8aa8d26cb18 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Thu, 15 Apr 2021 09:31:24 -0700 Subject: [PATCH] move mini_sendmail to sbin --- README.md | 6 ++++++ bin/vhost-user-jail-reset.sh | 2 +- bin/vhost-user-jail.sh | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7fd2b8e..00ff65f 100644 --- a/README.md +++ b/README.md @@ -15,3 +15,9 @@ cp mini_sendmail /usr/local/bin gzip mini_sendmail.8 cp mini_sendmail.8.gz /usr/local/share/man/man8 ``` + +# configure a minimal smtp server so automated emails (cron etc) can be sent +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 diff --git a/bin/vhost-user-jail-reset.sh b/bin/vhost-user-jail-reset.sh index e92f2f9..f2a7889 100644 --- a/bin/vhost-user-jail-reset.sh +++ b/bin/vhost-user-jail-reset.sh @@ -57,7 +57,7 @@ echo rm -r /usr/jails/$username # (re)create jail echo jk_init -k -j /usr/jails/$username shellstack echo mkdir -p /usr/jails/$username/opt /usr/jails/$username/usr/sbin /usr/jails/$username/tmp /usr/jails/$username/var/www -echo ln -s /usr/local/bin/mini_sendmail /usr/jails/$username/usr/sbin/sendmail +echo ln -s /usr/local/sbin/mini_sendmail /usr/jails/$username/usr/sbin/sendmail echo chmod a+rwx /usr/jails/$username/tmp echo install -d -o $username -g $username -m 755 /usr/jails/$username/home/$username echo jk_jailuser -n -j /usr/jails/$username -s /bin/bash $username diff --git a/bin/vhost-user-jail.sh b/bin/vhost-user-jail.sh index cb1210d..a6e9f4e 100644 --- a/bin/vhost-user-jail.sh +++ b/bin/vhost-user-jail.sh @@ -37,7 +37,7 @@ fi jk_init -k -j /usr/jails/$username shellstack mkdir -p /usr/jails/$username/opt /usr/jails/$username/usr/sbin /usr/jails/$username/tmp /usr/jails/$username/var/www -ln -s /usr/local/bin/mini_sendmail /usr/jails/$username/usr/sbin/sendmail +ln -s /usr/local/sbin/mini_sendmail /usr/jails/$username/usr/sbin/sendmail chmod a+rwx /usr/jails/$username/tmp install -d -o $username -g $username -m 755 /usr/jails/$username/home/$username mount --bind /home/$username /usr/jails/$username/home/$username