Don't automatically pgp encrypt email on onion only systems

This commit is contained in:
Bob Mottram 2018-04-06 15:05:18 +01:00
parent dbbe101584
commit 3ebbfe0ebb
1 changed files with 12 additions and 0 deletions

View File

@ -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"