From 3c10b09ada97eee8d509880e044c59084d11e631 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Thu, 25 Jul 2024 10:07:59 +0100 Subject: [PATCH] Set /etc/mailname on all systems. --- states/email-satellite/exim4/update-exim4.conf.conf | 6 +++--- states/email-satellite/init.sls | 6 ++++++ states/email-satellite/mailname | 1 + states/email/exim4.sls | 12 ++++++++++++ states/email/mailboxes.sls | 7 ------- states/email/mailname | 1 + 6 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 states/email-satellite/mailname create mode 100644 states/email/mailname diff --git a/states/email-satellite/exim4/update-exim4.conf.conf b/states/email-satellite/exim4/update-exim4.conf.conf index 09de706..e4961cb 100644 --- a/states/email-satellite/exim4/update-exim4.conf.conf +++ b/states/email-satellite/exim4/update-exim4.conf.conf @@ -17,7 +17,7 @@ # This is a Debian specific file dc_eximconfig_configtype='satellite' -dc_other_hostnames='' +dc_other_hostnames='hedwig.lunch.org.uk' dc_local_interfaces='127.0.0.1 ; ::1' dc_readhost='' dc_relay_domains='' @@ -25,7 +25,7 @@ dc_minimaldns='false' dc_relay_nets='' dc_smarthost='scabbers.lunch.org.uk' CFILEMODE='644' -dc_use_split_config='false' -dc_hide_mailname='' +dc_use_split_config='true' +dc_hide_mailname='false' dc_mailname_in_oh='true' dc_localdelivery='mail_spool' diff --git a/states/email-satellite/init.sls b/states/email-satellite/init.sls index 5b28cb7..2313c6a 100644 --- a/states/email-satellite/init.sls +++ b/states/email-satellite/init.sls @@ -31,3 +31,9 @@ email_aliases: - name: /etc - file_mode: '0644' - source: salt://email/aliases + +email_mailname: + file.managed: + - names: + - /etc/mailname: + - source: salt://email-satellite/mailname diff --git a/states/email-satellite/mailname b/states/email-satellite/mailname new file mode 100644 index 0000000..88e3eae --- /dev/null +++ b/states/email-satellite/mailname @@ -0,0 +1 @@ +hedwig.lunch.org.uk diff --git a/states/email/exim4.sls b/states/email/exim4.sls index 62fbc6e..dcdd912 100644 --- a/states/email/exim4.sls +++ b/states/email/exim4.sls @@ -53,3 +53,15 @@ exim4_service: - reload: true - watch: - cmd: exim4_update_conf + +email_aliases: + file.recurse: + - name: /etc + - file_mode: '0644' + - source: salt://email/aliases + +email_mailname: + file.managed: + - names: + - /etc/mailname: + - source: salt://email/mailname diff --git a/states/email/mailboxes.sls b/states/email/mailboxes.sls index b3502ec..75b8f58 100644 --- a/states/email/mailboxes.sls +++ b/states/email/mailboxes.sls @@ -49,10 +49,3 @@ cryhavocbag: - shell: /usr/sbin/nologin - uid: 1008 - gid: 1008 - -email_aliases: - file.recurse: - - name: /etc - - file_mode: '0644' - - source: salt://email/aliases - diff --git a/states/email/mailname b/states/email/mailname new file mode 100644 index 0000000..8c8562c --- /dev/null +++ b/states/email/mailname @@ -0,0 +1 @@ +lunch.org.uk