iankelling.org
/
git
/
distro-setup
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e2fb88c
)
code cleanup
author
Ian Kelling
<iank@fsf.org>
Sat, 30 Mar 2019 18:57:07 +0000
(14:57 -0400)
committer
Ian Kelling
<iank@fsf.org>
Sat, 30 Mar 2019 18:57:07 +0000
(14:57 -0400)
mail-setup
patch
|
blob
|
history
diff --git
a/mail-setup
b/mail-setup
index 9e867c85b38085bc90ac03470b52452ee360e632..0c543863e777a5bc12f73604579a0672bd80f6c8 100755
(executable)
--- a/
mail-setup
+++ b/
mail-setup
@@
-307,7
+307,9
@@
else # begin exim. has debian specific stuff for now
# we check that a valid cert is there already.
# to put the hostname in the known hosts
if ! ssh -o StrictHostKeyChecking=no root@li.iankelling.org :; then
# we check that a valid cert is there already.
# to put the hostname in the known hosts
if ! ssh -o StrictHostKeyChecking=no root@li.iankelling.org :; then
- openssl x509 -checkend $(( 60 * 60 * 24 * 3 )) -noout -in /etc/openvpn/mail.crt
+ # This just causes failure if our cert is going to expire in the next 30 days.
+ # Certs I generate last 10 years.
+ openssl x509 -checkend $(( 60 * 60 * 24 * 30 )) -noout -in /etc/openvpn/mail.crt
else
# note, man openvpn implies we could just call mail-route on vpn startup/shutdown with
# systemd, buuut it can remake the tun device unexpectedly, i got this in the log
else
# note, man openvpn implies we could just call mail-route on vpn startup/shutdown with
# systemd, buuut it can remake the tun device unexpectedly, i got this in the log
@@
-370,8
+372,7
@@
exim4-config exim4/use_split_config boolean true
EOF
source /a/bin/bash_unpublished/source-semi-priv
EOF
source /a/bin/bash_unpublished/source-semi-priv
- exim_main_dir=/etc/exim4/conf.d/main
- mkdir -p $exim_main_dir
+ mkdir -p /etc/exim4/conf.d/main
@@
-552,8
+553,8
@@
EOF
# MAIN_HARDCODE_PRIMARY_HOSTNAME might mess up the
# smarthost config type, not sure. all other settings
# would be unused in that config type.
# MAIN_HARDCODE_PRIMARY_HOSTNAME might mess up the
# smarthost config type, not sure. all other settings
# would be unused in that config type.
- cat >
$exim_main_dir
/000_localmacros <<EOF
-# i don't have ipv6 setup for my tunnel yet.
+ cat >
/etc/exim4/conf.d/main
/000_localmacros <<EOF
+# i don't have ipv6 setup for my
vpn
tunnel yet.
disable_ipv6 = true
MAIN_TLS_ENABLE = true
disable_ipv6 = true
MAIN_TLS_ENABLE = true
@@
-716,7
+717,7
@@
EOF
#
# would only exist because I wrote it i the previous condition,
# it\'s not part of exim
#
# would only exist because I wrote it i the previous condition,
# it\'s not part of exim
- rm -f
$exim_main_dir
/000_localmacros
+ rm -f
/etc/exim4/conf.d/main
/000_localmacros
debconf-set-selections <<EOF
exim4-config exim4/dc_eximconfig_configtype select mail sent by smarthost; no local mail
exim4-config exim4/dc_smarthost string $smarthost
debconf-set-selections <<EOF
exim4-config exim4/dc_eximconfig_configtype select mail sent by smarthost; no local mail
exim4-config exim4/dc_smarthost string $smarthost