diff --git a/INSTALL.md b/INSTALL.md index 3e62e87..3d1fafb 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -8,6 +8,7 @@ Please read through our [Contributing Guidelines](CONTRIBUTING.md). - Run `sudo sh install.sh` to install initial environment. - Put user password's hash in `/srv/users-passwords.txt`. - Run `sudo salt '*' state.apply --state-verbose=false`. +- Replace `` to your own [SendGrid API key](https://app.sendgrid.com/settings/api_keys) in `/etc/exim4/passwd.client` and run `systemctl restart exim4` - Check email sending, run `bash mail-testert.sh user@domain.tld`. ### Add/Remove admin users diff --git a/salt/exim/init.sls b/salt/exim/init.sls index f44d50a..20d6503 100644 --- a/salt/exim/init.sls +++ b/salt/exim/init.sls @@ -83,3 +83,36 @@ exim4_config_localmail: - mode: replace - content: 'domainlist local_domains = localhost : localhost.localdomain' - match: 'domainlist local_domains = MAIN_LOCAL_DOMAINS' + +exim4_config_localmacros: + file.managed: + - name: /etc/exim4/exim4.conf.localmacros + - contents: 'MAIN_TLS_ENABLE = 1' + +exim4_conf: + file.managed: + - name: /etc/exim4/update-exim4.conf.conf + - contents: | + dc_eximconfig_configtype='smarthost' + dc_other_hostnames='' + dc_local_interfaces='127.0.0.1' + dc_readhost='opensourcewebsite.org' + dc_relay_domains='' + dc_minimaldns='false' + dc_relay_nets='' + dc_smarthost='smtp.sendgrid.net::587' + CFILEMODE='644' + dc_use_split_config='false' + dc_hide_mailname='true' + dc_mailname_in_oh='true' + dc_localdelivery='mail_spool' + +exim4_passwd_client: + file.managed: + - name: /etc/exim4/passwd.client + - user: root + - group: Debian-exim + - mode: 640 + - create: True + - replace: False + - contents: '*:apikey:'