lots of updates, things working
[distro-setup] / mail-setup
index 07b87efbfe87584ebe2bfe6e6dbb9c3e2e2b78ed..c0035c6b0d7dad89f08ec1036793616a8951530b 100755 (executable)
@@ -188,6 +188,7 @@ forward=$u@$mxhost
 relayhost="[$mxhost]:$mxport" # postfix
 smarthost="$mxhost::$mxport" # exim
 
+# trisquel 8 = openvpn, debian stretch = openvpn-client
 vpn_ser=openvpn-client
 if [[ ! -e /lib/systemd/system/openvpn-client@.service ]]; then
     vpn_ser=openvpn
@@ -390,7 +391,7 @@ exim4-config exim4/dc_eximconfig_configtype select internet site; mail is sent a
 # This name won\'t appear on From: lines of outgoing messages if rewriting is enabled.
 
 # System mail name:
-exim4-config exim4/mailname string li.iankelling.org
+exim4-config exim4/mailname string mail.iankelling.org
 
 
 
@@ -408,7 +409,7 @@ exim4-config exim4/mailname string li.iankelling.org
 # Other destinations for which mail is accepted:
 # iank.bid is for testing
 # mail.iankelling.org is for machines i own
-exim4-config exim4/dc_other_hostnames string *.iankelling.org;iankelling.org;*iank.bid;iank.bid;*zroe.org;zroe.org
+exim4-config exim4/dc_other_hostnames string *.iankelling.org;iankelling.org;*iank.bid;iank.bid;*zroe.org;zroe.org;*.b8.nz;b8.nz
 
 
 
@@ -484,8 +485,12 @@ DKIM_PRIVATE_KEY= \${if exists{/etc/exim4/\${dkim_domain}-private.pem} {/etc/exi
 # We check if there is a server (A Record) behind your hostname treetowl.
 # You may want to publish a DNS record (A type) for the hostname treetowl or use a different hostname in your mail software
 # https://serverfault.com/questions/46545/how-do-i-change-exim4s-primary-hostname-on-a-debian-box
-# and this one seemed appropriate from grepping config
-MAIN_HARDCODE_PRIMARY_HOSTNAME = li.iankelling.org
+# and this one seemed appropriate from grepping config.
+# I originally set this to li.iankelling.org, but then ended up with errors when li tried to send
+# mail to treetowl, 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
 
 # normally empty, I set this so I can set the envelope address
 # when doing mail redelivery to invoke filters
@@ -506,6 +511,14 @@ CHECK_DATA_LOCAL_ACL_FILE = /etc/exim4/data_local_acl
 # the fix maybe is for all lines? one says gmail rejects, the
 # other says gmail does not reject. figure out and open a new bug.
 IGNORE_SMTP_LINE_LENGTH_LIMIT = true
+
+# most of the ones that gmail seems to use.
+# Exim has horrible default of signing unincluded
+# list- headers since they got mentioned in an
+# rfc, but this messes up mailing lists, like gnu/debian which want to
+# keep your dkim signature intact but add list- headers.
+DKIM_SIGN_HEADERS = mime-version:in-reply-to:references:from:date:subject:to
+
 EOF
 
 
@@ -619,6 +632,9 @@ EOF
         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
+# the default, i think is from /etc/mailname. better to set it to
+# whatever the current fqdn is.
+exim4-config exim4/mailname string $(hostname -f)
 EOF
 
     fi # end $HOSTNAME != $MAIL_HOST