Skip to content

Commit

Permalink
Add tidy, fix mail symlink script
Browse files Browse the repository at this point in the history
  • Loading branch information
obscurerichard committed Jan 20, 2024
1 parent aa434f2 commit f0489fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions mail-symlink-inbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ set -euo pipefail

DEBUG=${DEBUG:-false}

# Thanks https://stackoverflow.com/a/17805088
$DEBUG && export PS4='${LINENO}: ' && set -x

# Symlink /home/user/mail/inbox to /var/spol/mail/inbox
# This lets dovecot autodetect the ~/mail directory - needed
# as part of the emergency migration to Obscure's new server.
Expand All @@ -15,8 +18,9 @@ DEBUG=${DEBUG:-false}
# https://doc.dovecot.org/configuration_manual/mail_location/
cd /home
find . -maxdepth 2 -type d -name mail | while read -r mailuser; do
user=$(cut -d/ -f1 <<<"$mailuser")
$DEBUG && echo "$user"
$DEBUG && echo -n "mailuser:$mailuser"
user=$(cut -d/ -f2 <<<"$mailuser")
$DEBUG && echo "user:$user"
mail="/home/$user/mail"
inboxlink="$mail/inbox"
varspool="/var/spool/mail/$user"
Expand All @@ -28,3 +32,4 @@ find . -maxdepth 2 -type d -name mail | while read -r mailuser; do
$DEBUG && echo "$user did not qualify"
fi
done
exit 0
4 changes: 3 additions & 1 deletion tiamat-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ whois

extra_packages='
alpine
shellcheck'
ntfs-3g
shellcheck
tidy'

firewall_services_allow='
dns
Expand Down

0 comments on commit f0489fc

Please sign in to comment.