From 3ebbfe0ebb43187c47fe6ea8130269e3f31d8c90 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 6 Apr 2018 15:05:18 +0100 Subject: [PATCH] Don't automatically pgp encrypt email on onion only systems --- src/freedombone-base-email | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/freedombone-base-email b/src/freedombone-base-email index e26243df..af06e062 100755 --- a/src/freedombone-base-email +++ b/src/freedombone-base-email @@ -299,6 +299,10 @@ function configure_email_onion { echo " route_data = \${perl{onionLookup}{$RISEUP_EMAIL_ONION}}" echo " no_more"; } > /etc/exim4/conf.d/router/905_exim4-config-riseup + if ! grep -q "*.onion" /etc/exim4/conf.d/router/200_exim4-config_primary + sed -i 's|domains = ! +local_domains|domains = ! +local_domains : ! *.onion : ! riseup.net|g' /etc/exim4/conf.d/router/200_exim4-config_primary + fi + { echo "onionrelays:"; echo " driver = manualroute"; echo " domains = *.onion"; @@ -652,6 +656,14 @@ function email_client { echo '# Optional relay of SMTP via ISP'; echo '#set smtp_url="smtps://username:password@isp_mail_domain:465/"'; } > /etc/Muttrc + if [[ "$ONION_ONLY" != 'no' ]]; then + # On onion only systems email is onion router anyway, with its + # own encryption system, so we don't need the additional pgp layer + # except perhaps for some additional confidence + sed -i 's|set pgp_autoencrypt|unset pgp_autoencrypt|g' /etc/Muttrc + sed -i 's|set pgp_autosign|unset pgp_autosign|g' /etc/Muttrc + fi + # For viewing long URLs echo 'REGEXP (((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]' > "/home/$MY_USERNAME/.urlview" echo 'COMMAND lynx -dump -width=78 -nolist %s' >> "/home/$MY_USERNAME/.urlview"