Skip to content

Commit eb2a4a4

Browse files
Merge pull request #46 from A1EF/bugfixes
Add exim4 SendGrid smarthost config
2 parents f368d57 + a6c39ba commit eb2a4a4

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

INSTALL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Please read through our [Contributing Guidelines](CONTRIBUTING.md).
88
- Run `sudo sh install.sh` to install initial environment.
99
- Put user password's hash in `/srv/users-passwords.txt`.
1010
- Run `sudo salt '*' state.apply --state-verbose=false`.
11+
- Replace `<SetYourAPIKey>` to your own [SendGrid API key](https://app.sendgrid.com/settings/api_keys) in `/etc/exim4/passwd.client` and run `systemctl restart exim4`
1112
- Check email sending, run `bash mail-testert.sh user@domain.tld`.
1213

1314
### Add/Remove admin users

salt/exim/init.sls

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,36 @@ exim4_config_localmail:
8383
- mode: replace
8484
- content: 'domainlist local_domains = localhost : localhost.localdomain'
8585
- match: 'domainlist local_domains = MAIN_LOCAL_DOMAINS'
86+
87+
exim4_config_localmacros:
88+
file.managed:
89+
- name: /etc/exim4/exim4.conf.localmacros
90+
- contents: 'MAIN_TLS_ENABLE = 1'
91+
92+
exim4_conf:
93+
file.managed:
94+
- name: /etc/exim4/update-exim4.conf.conf
95+
- contents: |
96+
dc_eximconfig_configtype='smarthost'
97+
dc_other_hostnames=''
98+
dc_local_interfaces='127.0.0.1'
99+
dc_readhost='opensourcewebsite.org'
100+
dc_relay_domains=''
101+
dc_minimaldns='false'
102+
dc_relay_nets=''
103+
dc_smarthost='smtp.sendgrid.net::587'
104+
CFILEMODE='644'
105+
dc_use_split_config='false'
106+
dc_hide_mailname='true'
107+
dc_mailname_in_oh='true'
108+
dc_localdelivery='mail_spool'
109+
110+
exim4_passwd_client:
111+
file.managed:
112+
- name: /etc/exim4/passwd.client
113+
- user: root
114+
- group: Debian-exim
115+
- mode: 640
116+
- create: True
117+
- replace: False
118+
- contents: '*:apikey:<SetYourAPIKey>'

0 commit comments

Comments
 (0)