iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
various fixes and improvements
[distro-setup]
/
mail-setup
diff --git
a/mail-setup
b/mail-setup
index 68478bec55a07860a6c86d82ec3cefaae97704c9..3dd3e970cde04fb3a77618c64b6e1e748c9f88f1 100755
(executable)
--- a/
mail-setup
+++ b/
mail-setup
@@
-358,6
+358,8
@@
m systemctl enable mailcert.timer
# * common exim4 config
source /a/bin/bash_unpublished/source-state
# * common exim4 config
source /a/bin/bash_unpublished/source-state
+m sudo gpasswd -a iank adm #needed for reading logs
+
### make local bounces go to normal maildir
# local mail that bounces goes to /Maildir or /root/Maildir
### make local bounces go to normal maildir
# local mail that bounces goes to /Maildir or /root/Maildir
@@
-676,7
+678,7
@@
EOF
server=/mail.iankelling.org/127.0.1.1
EOF
if systemctl is-active dnsmasq >/dev/null; then
server=/mail.iankelling.org/127.0.1.1
EOF
if systemctl is-active dnsmasq >/dev/null; then
- m systemctl re
load
dnsmasq
+ m systemctl re
start
dnsmasq
m nscd -i hosts
fi
m nscd -i hosts
fi
@@
-810,7
+812,7
@@
EOF
echo | /a/exe/cedit mail /etc/dnsmasq-servers.conf || [[ $? == 1 ]]
if systemctl is-active dnsmasq >/dev/null; then
m nscd -i hosts
echo | /a/exe/cedit mail /etc/dnsmasq-servers.conf || [[ $? == 1 ]]
if systemctl is-active dnsmasq >/dev/null; then
m nscd -i hosts
- m systemctl re
load dnsmasq
+ m systemctl re
start dnsmasq # reload does not ensure new config is used
fi
m systemctl disable mailclean.timer &>/dev/null ||:
fi
m systemctl disable mailclean.timer &>/dev/null ||:
@@
-832,6
+834,12
@@
EOF
hostname -f >/etc/mailname
hostname -f >/etc/mailname
+ f=/p/c/filesystem/etc/exim4/passwd.client
+ if [[ ! -e $f ]]; then
+ f=/p/c/machine_specific/$HOSTNAME/filesystem/etc/exim4/passwd.client
+ fi
+ m sudo rsync -ahhi --chown=root:Debian-exim --chmod=0640 $f /etc/exim4/
+
;;&
## we use this host to monitor MAIL_HOST
l2)
;;&
## we use this host to monitor MAIL_HOST
l2)
@@
-851,13
+859,9
@@
EOF
/^root:/d
EOF
;;
/^root:/d
EOF
;;
+ # not l2 and not MAIL_HOST
*)
*)
- f=/p/c/filesystem/etc/exim4/passwd.client
- if [[ ! -e $f ]]; then
- f=/p/c/machine_specific/$HOSTNAME/filesystem/etc/exim4/passwd.client
- fi
- sudo rsync -ahhi --chown=root:Debian-exim --chmod=0640 $f /etc/exim4/
# This ends up at alerts mailbox on MAIL_HOST, but using a user that doesn't exist elsewhere
# is no good.
# This ends up at alerts mailbox on MAIL_HOST, but using a user that doesn't exist elsewhere
# is no good.