Add satellite email setup for Hedwig.

This commit is contained in:
Jim Hague 2024-07-24 21:59:45 +01:00
parent 96e556e10b
commit 20e4355aed
5 changed files with 81 additions and 1 deletions

View File

@ -0,0 +1,15 @@
# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: jim@lunch.org.uk

View File

@ -0,0 +1,31 @@
# /etc/exim4/update-exim4.conf.conf
#
# Edit this file and /etc/mailname by hand and execute update-exim4.conf
# yourself or use 'dpkg-reconfigure exim4-config'
#
# Please note that this is _not_ a dpkg-conffile and that automatic changes
# to this file might happen. The code handling this will honor your local
# changes, so this is usually fine, but will break local schemes that mess
# around with multiple versions of the file.
#
# update-exim4.conf uses this file to determine variable values to replace
# the DEBCONFsomethingDEBCONF strings in the configuration template files.
#
# Most settings found in here do have corresponding questions in the
# Debconf configuration, but not all of them.
#
# This is a Debian specific file
dc_eximconfig_configtype='satellite'
dc_other_hostnames=''
dc_local_interfaces='127.0.0.1 ; ::1'
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost='scabbers.lunch.org.uk'
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname=''
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'

View File

@ -0,0 +1,33 @@
exim4:
pkg.installed:
- name: exim4-daemon-light
exim4_conf:
file.recurse:
- name: /etc/exim4
- dir_mode: '0755'
- file_mode: '0644'
- source: salt://email-satellite/exim4
exim4_update_conf:
cmd.run:
- name: update-exim4.conf
- onchanges:
- file: exim4_conf
enable_exim4_service:
service.enabled:
- name: exim4
exim4_service:
service.running:
- name: exim4
- reload: true
- watch:
- cmd: exim4_update_conf
email_aliases:
file.recurse:
- name: /etc
- file_mode: '0644'
- source: salt://email/aliases

View File

@ -22,7 +22,7 @@ dc_local_interfaces=''
dc_readhost='' dc_readhost=''
dc_relay_domains='' dc_relay_domains=''
dc_minimaldns='false' dc_minimaldns='false'
dc_relay_nets='' dc_relay_nets='hedwig.lunch.org.uk'
dc_smarthost='"${if match{${lc:$header_from:}}{.*acm.org}{smtpauth.mailroute.net::587}{smtpout.mythic-beasts.com}}"' dc_smarthost='"${if match{${lc:$header_from:}}{.*acm.org}{smtpauth.mailroute.net::587}{smtpout.mythic-beasts.com}}"'
CFILEMODE='644' CFILEMODE='644'
dc_use_split_config='true' dc_use_split_config='true'

View File

@ -10,6 +10,7 @@ base:
- backup - backup
- backup/hedwig - backup/hedwig
- certificates/client - certificates/client
- email-satellite
- fail2ban - fail2ban
- firewalls/hedwig - firewalls/hedwig
- lunch_website - lunch_website