acat() {
ngset
- hrcat /m/md/alerts/new/*
+ hrcat /m/md/alerts/{cur,new}/*
ngreset
hr; echo bk; hr
ssh bk.b8.nz "shopt -s nullglob; hrcat /m/md/INBOX/new/* /m/md/INBOX/cur/*"
}
aclear() {
ngset
- rm -f /m/md/alerts/new/*
+ rm -f /m/md/alerts/{cur,new}/*
ngreset
ssh bk.b8.nz "shopt -s nullglob; rm -f /m/md/INBOX/new/* /m/md/INBOX/cur/*"
system-status _
}
ad() {
pushd /a/bin/distro-setup/a >/dev/null
- ansible-playbook site.yml
+ ansible-playbook site.yml "$@"
popd >/dev/null
}
target send-receive $vol/btrbk
EOF
fi
- if (( ${#target[@]} )); then
+ if (( ${#targets[@]} )); then
cat >>/etc/btrbk.conf <<EOF
volume $vol
subvolume $sub
fi
-
-# trisquel 8 = openvpn, debian stretch = openvpn-client
-sd /etc/systemd/system/transmission-daemon-nn.service <<EOF
-[Unit]
-Description=Transmission BitTorrent Daemon netns
-After=network.target
-Requires=openvpn-client-tr@client.service
-After=openvpn-client-tr@client.service
-JoinsNamespaceOf=openvpn-client-tr@client.service
-
-[Service]
-User=debian-transmission
-Type=notify
-ExecStart=/usr/bin/transmission-daemon -f --log-error
-ExecReload=/bin/kill -s HUP \$MAINPID
-ExecStop=/bin/kill -s STOP \$MAINPID
-PrivateNetwork=true
-Nice=19
-BindReadOnlyPaths=/etc/nn-resolv:/run/systemd/resolve:norbind /etc/nn-resolv:/etc/nsswitch:norbind
-
-[Install]
-WantedBy=multi-user.target
-EOF
-ser daemon-reload
-
case $HOSTNAME in
kd|rp)
sgo transmission-daemon-nn
10.2.0.1)
dynhost=b8.nz
;;
- 10.0.0.1)
- dynhost=t.b8.nz
- ;;
*)
exit 0
;;
fi
if $up6; then
- if [[ $HOSTNAME == tp ]]; then
- cat >>$f <<EOF
-update delete $dynhost. AAAA
-update add $dynhost. 60 AAAA $ip6
-EOF
- fi
cat >>$f <<EOF
update delete $fqdn. AAAA
update add $fqdn. 60 AAAA $ip6
EOF
+else
+ cat >>$f <<EOF
+update delete $fqdn. AAAA
+EOF
fi
cat >>$f <<EOF
ExecStartPre=/sbin/iptables-restore /a/bin/distro-setup/transmission-firewall/netns.rules
ExecStopPost=/usr/bin/flock -w 20 /tmp/newns.flock /a/bin/newns/newns stop %i
PrivateNetwork=true
-BindReadOnlyPaths=/etc/nn-resolv:/run/systemd/resolve:norbind /etc/nn-resolv:/etc/nsswitch:norbind
+BindReadOnlyPaths=/etc/tr-resolv:/run/systemd/resolve:norbind /etc/nn-resolv:/etc/nsswitch:norbind
[Install]
WantedBy=multi-user.target
--- /dev/null
+[Unit]
+Description=Transmission BitTorrent Daemon netns
+After=network.target
+Requires=openvpn-client-tr@client.service
+After=openvpn-client-tr@client.service
+JoinsNamespaceOf=openvpn-client-tr@client.service
+
+[Service]
+User=debian-transmission
+Type=notify
+ExecStart=/usr/bin/transmission-daemon -f --log-error
+ExecReload=/bin/kill -s HUP $MAINPID
+ExecStop=/bin/kill -s STOP $MAINPID
+PrivateNetwork=true
+Nice=19
+BindReadOnlyPaths=/etc/tr-resolv:/run/systemd/resolve:norbind /etc/nn-resolv:/etc/nsswitch:norbind
+
+[Install]
+WantedBy=multi-user.target
--- /dev/null
+nameserver 8.8.8.8
+options edns0
bindsym $mod+4 exec "x-www-browser -no-remote -P firefox-main-profile"
bindsym $mod+5 exec "/usr/local/bin/start-tor-browser"
bindsym $mod+6 exec "/a/bin/redshift.sh"
-bindsym $mod+equal exec "t s w; t in"
-bindsym $mod+Home exec "t out"
-#bindsym $mod+End exec "t s x; t in"
-bindsym $mod+grave exec "t s lunch; t in; t out -a '45 minutes from now'"
+# bindsym $mod+equal exec "t s w; t in"
+# bindsym $mod+Home exec "t out"
+# #bindsym $mod+End exec "t s x; t in"
+# bindsym $mod+grave exec "t s lunch; t in; t out -a '45 minutes from now'"
bindsym $mod+w focus parent
# ran. Very strange, dunno why, but rsync won't do anything unless these
# changed, so that should fix it.
rsync -t --chmod=755 --chown=root:root /a/bin/log-quiet/log-once switch-mail-host btrbk-run mount-latest-subvol \
- check-subvol-stale system-status myi3status /usr/local/bin
+ check-subvol-stale system-status myi3status mailtest-check /usr/local/bin
rsync -t --chmod=755 --chown=root:root /a/bin/errhandle/err /usr/local/lib
# I might add somethign later.
EOF
+i /etc/exim4/conf.d/local_deny_exceptions_acl <<'EOF'
# This acl already exists in rcpt, this just makes it more widespread.
# See the comment there for its rationale. The reason it needs to be
# more widespread is that I've turned on sender verification, but cron
# emails can fail sender verification since I may be in a network that
# doesn't have my local dns.
-i /etc/exim4/conf.d/local_deny_exceptions_acl <<'EOF'
accept
authenticated = *
+
+# i setup a local programs smtp to mail.iankelling.org, this
+# skips sender verification for it.
+accept
+ hosts = 10.173.8.1
EOF
rm -fv /etc/exim4/data_local_acl # old path
# I originally set this to li.iankelling.org, but then ended up with errors when li tried to send
# mail to kd, so this should basically be a name that no host has as their
# canonical hostname since the actual host sits behind a nat and changes.
-# Seems logical for this to be the same as mailname.
MAIN_HARDCODE_PRIMARY_HOSTNAME = mail.iankelling.org
+# I used this to avoid sender verification, didnt work but it still
+# makes sense based on the spec.
+hosts_treat_as_local = defaultnn.b8.nz
EOF
/a/exe/cedit defaultnn /etc/hosts <<'EOF' || [[ $? == 1 ]]
-# this is just here to avoid mainlog errors, however, it doesnt seem to work
-# todo: look into it more. nsswitch.conf? cached result? i dunno
-# list matching forced to fail: failed to find host name for 10.173.8.1
10.173.8.1 defaultnn.b8.nz
EOF
;;&
# file, so I've saved that into ./mail-notes.conf.
cat >>/etc/exim4/update-exim4.conf.conf <<EOF
# man page: is used to build the local_domains list, together with "localhost"
-# iank.bid is for testing
-# mail.iankelling.org is for machines i own
-# this is duplicated in a later router
+# this is duplicated in a later router.
dc_other_hostnames='iankelling.org;zroe.org;r2e.iankelling.org'
EOF
vpnmanual:
debug_print = "R: dnslookup for $local_part@$domain"
driver = manualroute
- domains = iankelling.org:zroe.org:r2e.iankelling.org
+ domains = iankelling.org : zroe.org:r2e.iankelling.org
transport = remote_smtp
same_domain_copy_routing = yes
route_list = * 10.8.0.4
fi
done
if (( ${#results[@]} || ${#missing[@]} )); then
- printf "$HOSTNAME spamtest %s %s/%s\n" "$folder" "$latest"
+ printf "$HOSTNAME spamtest %s/%s\n" "$folder" "$latest"
if (( ${#results[@]} )); then
printf "unexpected %s" "${!results[*]} "
fi
printf "missing %s" "${missing[*]}"
fi
echo
+ spamassassin -D <"$latest"
fi
else
echo $HOSTNAME mailtest spamd pid not found
bindsym $mod+4 exec "x-www-browser -no-remote -P firefox-main-profile"
bindsym $mod+5 exec "/usr/local/bin/start-tor-browser"
bindsym $mod+6 exec "/a/bin/redshift.sh"
-bindsym $mod+equal exec "t s w; t in"
-bindsym $mod+Home exec "t out"
-#bindsym $mod+End exec "t s x; t in"
-bindsym $mod+grave exec "t s lunch; t in; t out -a '45 minutes from now'"
+# bindsym $mod+equal exec "t s w; t in"
+# bindsym $mod+Home exec "t out"
+# #bindsym $mod+End exec "t s x; t in"
+# bindsym $mod+grave exec "t s lunch; t in; t out -a '45 minutes from now'"
bindsym $mod+w focus parent
bindsym $mod+4 exec "x-www-browser -no-remote -P firefox-main-profile"
bindsym $mod+5 exec "/usr/local/bin/start-tor-browser"
bindsym $mod+6 exec "/a/bin/redshift.sh"
-bindsym $mod+equal exec "t s w; t in"
-bindsym $mod+Home exec "t out"
-#bindsym $mod+End exec "t s x; t in"
-bindsym $mod+grave exec "t s lunch; t in; t out -a '45 minutes from now'"
+# bindsym $mod+equal exec "t s w; t in"
+# bindsym $mod+Home exec "t out"
+# #bindsym $mod+End exec "t s x; t in"
+# bindsym $mod+grave exec "t s lunch; t in; t out -a '45 minutes from now'"
bindsym $mod+w focus parent
bouncemsg="message in /m/md/bounces/new"
fi
lo -1 bounce $bouncemsg
- glob=(/m/md/alerts/new/*)
+ glob=(/m/md/alerts/{new,cur}/*)
if [[ -e ${glob[0]} ]]; then
chars+=("A")
fi