-f) force=true; shift ;;
-s)
sources="$2"
+ if [[ ! -s $sources ]]; then
+ echo mkschroot: error: sources file $sources does not exist or is empty
+ return 1
+ fi
shift 2
;;
esac
a="-ahviSAXPH --specials --devices --delete --relative --exclude-from=/p/c/li-rsync-excludes"
ret=0
for h in li je bk; do
- m rsync "$@" $a ${p[@]} /p/c/machine_specific/$h root@$h.b8.nz:/ || ret=$?
+ m s rsync "$@" $a ${p[@]} /p/c/machine_specific/$h root@$h.b8.nz:/ || ret=$?
# only li is debian10
p[0]=/a/opt/emacs-ubuntu20.04
p[1]=/a/opt/emacs-ubuntu20.04-nox
done
- m rsync "$@" -ahviSAXPH root@li.b8.nz:/a/h/proposed-comments/ /a/h/proposed-comments || ret=$?
+ m s rsync "$@" -ahviSAXPH root@li.b8.nz:/a/h/proposed-comments/ /a/h/proposed-comments || ret=$?
return $ret
}
bkpush() { # no emacs. for running faster.
cmd=chromium
else
cd /
- cmd="schroot -c buster chromium"
+ cmd="schroot -c bullseye chromium"
CHROMIUM_FLAGS='--enable-remote-extensions' $cmd &r
fi
}
--suppress-cc=self "$@"
}
+gup() { /a/f/gnulib/build-aux/gnupload "$@"; }
+
+dejagnu() { /a/opt/dejagnu/dejagnu "$@"; }
+
hstatus() {
# do git status on published repos.
c /a/bin/githtml
if type -P rg &>/dev/null; then
# --no-messages because of annoying errors on broken symlinks
rg() { command rg --no-messages -L -i -M 300 --no-ignore "$@" || return $?; }
-#fails if not exist. ignore
+ #fails if not exist. ignore
complete -r rg 2>/dev/null ||:
else
alias rg=grr
envelope_to_add
EOF
+i /etc/exim4/conf.d/transport/30_smarthost_dkim <<'EOF'
+# ian: this is remote_smtp_smarthost plus the dkim parts from remote_smtp
+
+smarthost_dkim:
+ debug_print = "T: remote_smtp_smarthost for $local_part@$domain"
+ driver = smtp
+ multi_domain
+.ifndef IGNORE_SMTP_LINE_LENGTH_LIMIT
+ message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}}
+.endif
+ hosts_try_auth = <; ${if exists{CONFDIR/passwd.client} \
+ {\
+ ${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$host_address}}\
+ }\
+ {} \
+ }
+.ifdef REMOTE_SMTP_SMARTHOST_HOSTS_AVOID_TLS
+ hosts_avoid_tls = REMOTE_SMTP_SMARTHOST_HOSTS_AVOID_TLS
+.endif
+.ifdef REMOTE_SMTP_SMARTHOST_HOSTS_REQUIRE_TLS
+ hosts_require_tls = REMOTE_SMTP_SMARTHOST_HOSTS_REQUIRE_TLS
+.endif
+.ifdef REMOTE_SMTP_SMARTHOST_TLS_VERIFY_CERTIFICATES
+ tls_verify_certificates = REMOTE_SMTP_SMARTHOST_TLS_VERIFY_CERTIFICATES
+.endif
+.ifdef REMOTE_SMTP_SMARTHOST_TLS_VERIFY_HOSTS
+ tls_verify_hosts = REMOTE_SMTP_SMARTHOST_TLS_VERIFY_HOST
+.endif
+.ifdef REMOTE_SMTP_HEADERS_REWRITE
+ headers_rewrite = REMOTE_SMTP_HEADERS_REWRITE
+.endif
+.ifdef REMOTE_SMTP_RETURN_PATH
+ return_path = REMOTE_SMTP_RETURN_PATH
+.endif
+.ifdef REMOTE_SMTP_HELO_DATA
+ helo_data=REMOTE_SMTP_HELO_DATA
+.endif
+.ifdef TLS_DH_MIN_BITS
+tls_dh_min_bits = TLS_DH_MIN_BITS
+.endif
+.ifdef REMOTE_SMTP_SMARTHOST_TLS_CERTIFICATE
+tls_certificate = REMOTE_SMTP_SMARTHOST_TLS_CERTIFICATE
+.endif
+.ifdef REMOTE_SMTP_SMARTHOST_PRIVATEKEY
+tls_privatekey = REMOTE_SMTP_SMARTHOST_PRIVATEKEY
+.endif
+.ifdef REMOTE_SMTP_TRANSPORTS_HEADERS_REMOVE
+ headers_remove = REMOTE_SMTP_TRANSPORTS_HEADERS_REMOVE
+.endif
+.ifdef DKIM_DOMAIN
+dkim_domain = DKIM_DOMAIN
+.endif
+.ifdef DKIM_SELECTOR
+dkim_selector = DKIM_SELECTOR
+.endif
+.ifdef DKIM_PRIVATE_KEY
+dkim_private_key = DKIM_PRIVATE_KEY
+.endif
+.ifdef DKIM_CANON
+dkim_canon = DKIM_CANON
+.endif
+.ifdef DKIM_STRICT
+dkim_strict = DKIM_STRICT
+.endif
+.ifdef DKIM_SIGN_HEADERS
+dkim_sign_headers = DKIM_SIGN_HEADERS
+.endif
+EOF
+
+
cat >/etc/exim4/update-exim4.conf.conf <<'EOF'
# default stuff, i havent checked if its needed
dc_minimaldns='false'
ncbase=${ncdir##*/}
m cd /var/www
if [[ ! -e $ncdir/index.php ]]; then
- # as of march 14 2021, user_external is broken for nextcloud 21
- # https://github.com/nextcloud/user_external/issues/165
- #file=latest.zip
- file=latest-20.zip
+ # if we wanted to only install a specific version, use something like
+ # file=latest-22.zip
+ file=latest.zip
m wget -nv -N https://download.nextcloud.com/server/releases/$file
+ m rm -rf nextcloud
m unzip -q $file
m rm -f $file
m chown -R www-data.www-data nextcloud
m cd $ncdir
m sudo -u www-data php occ maintenance:install --database sqlite --admin-user iank --admin-pass $nextcloud_admin_pass
fi
+ # note, strange this happend where updater did not increment the version var,
+ # mine was stuck on 20. I manually updated it.
m cd $ncdir/config
if [[ ! -e config.php-orig ]]; then
m cp -a config.php config.php-orig
# ** $MAIL_HOST|bk)
$MAIL_HOST|bk)
+ cat >>/etc/exim4/conf.d/main/000_local <<EOF
+# je.b8.nz will run out of memory with freshclam
+av_scanner = clamd:/var/run/clamav/clamd.ctl
+EOF
+
cat >> /etc/exim4/conf.d/data_local_acl <<'EOF'
deny
malware = */defer_ok
EOF
cat >/etc/exim4/conf.d/main/000_local-nn <<EOF
-# je.b8.nz will run out of memory with freshclam
-av_scanner = clamd:/var/run/clamav/clamd.ctl
-
# MAIN_HARDCODE_PRIMARY_HOSTNAME might mess up the
# smarthost config type, not sure.
# failing message on mail-tester.com:
MAIN_TLS_PRIVATEKEY = /etc/exim4/privkey.pem
EOF
+ i /etc/exim4/conf.d/router/190_exim4-config_fsfsmarthost <<'EOF'
+gnusmarthost:
+ debug_print = "R: smarthost for $local_part@$domain"
+ driver = manualroute
+ domains = ! +local_domains
+# send most mail through eggs, helps fsfs sender reputation.
+# uncomment and optionally move to 188 file to send through my own servers again
+# senders = *@gnu.org
+ transport = smarthost_dkim
+ route_list = * fencepost.gnu.org::587 byname
+ host_find_failed = ignore
+ same_domain_copy_routing = yes
+ no_more
+EOF
+
/a/exe/cedit defaultnn /etc/hosts <<'EOF' || [[ $? == 1 ]]
10.173.8.1 defaultnn.b8.nz
EOF
# and also have mail.iankelling.org whitelisted as a relay domain.
# I could avoid that if I changed this to submit to 587 with a
# password like a standard mua.
- i /etc/exim4/conf.d/router/190_exim4-config_fsfsmarthost <<'EOF'
-# smarthost for fsf mail
+ i /etc/exim4/conf.d/router/188_exim4-config_smarthost <<'EOF'
# ian: copied from /etc/exim4/conf.d/router/200_exim4-config_primary, and added senders = and
-# replaced DCsmarthost with mail.fsf.org
+# replaced DCsmarthost with hostname
fsfsmarthost:
debug_print = "R: smarthost for $local_part@$domain"
driver = manualroute
same_domain_copy_routing = yes
no_more
-gnusmarthost:
- debug_print = "R: smarthost for $local_part@$domain"
- driver = manualroute
- domains = ! +local_domains
- senders = *@gnu.org
- transport = remote_smtp_smarthost
- route_list = * fencepost.gnu.org::587 byname
- host_find_failed = ignore
- same_domain_copy_routing = yes
- no_more
EOF
# Greping /etc/exim4, unqualified mails this would end up as
cat >>/etc/exim4/update-exim4.conf.conf <<EOF
dc_other_hostnames='je.b8.nz'
EOF
+ echo|i /etc/exim4/conf.d/router/188_exim4-config_smarthost
+ echo|i /etc/exim4/conf.d/router/190_exim4-config_fsfsmarthost
echo|i /etc/exim4/conf.d/rcpt_local_acl
echo|i /etc/exim4/conf.d/router/880_universal_forward
;;
# ** not MAIL_HOST|bk|je
*)
+
+ echo|i /etc/exim4/conf.d/router/188_exim4-config_smarthost
+ echo|i /etc/exim4/conf.d/router/190_exim4-config_fsfsmarthost
echo|i /etc/exim4/conf.d/rcpt_local_acl
# catches things like cronjob email