Standardise a mailer setup
At least on Debian 10, use msmtp and install a basic configuration. Previously the network was using a mishmash of exim, sendmail or whatever happened to be installed. For the moment, install the config also on debian9, some of which are using ssmtp, which is no longer maintained in debian :(
This commit is contained in:
parent
7943f105dd
commit
10897aa03a
4 changed files with 27 additions and 1 deletions
1
modules/rhizo_base/files/etc/aliases
Normal file
1
modules/rhizo_base/files/etc/aliases
Normal file
|
@ -0,0 +1 @@
|
|||
root: postmaster@rhizomatica.org
|
|
@ -681,4 +681,14 @@ schedule { 'never':
|
|||
ip => '10.23.0.11',
|
||||
}
|
||||
|
||||
file { '/etc/aliases':
|
||||
ensure => 'present',
|
||||
source => 'puppet:///modules/rhizo_base/etc/aliases'
|
||||
}
|
||||
|
||||
file { '/etc/msmtprc':
|
||||
ensure => 'present',
|
||||
content => template('rhizo_base/msmtprc.erb')
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class rhizo_base::packages::common {
|
|||
|
||||
class rhizo_base::packages::buster inherits rhizo_base::packages::common {
|
||||
|
||||
package { ['libcdk5nc6' ]:
|
||||
package { ['libcdk5nc6', 'msmtp-mta' ]:
|
||||
ensure => installed,
|
||||
require => Class['rhizo_base::apt'],
|
||||
}
|
||||
|
|
15
modules/rhizo_base/templates/msmtprc.erb
Normal file
15
modules/rhizo_base/templates/msmtprc.erb
Normal file
|
@ -0,0 +1,15 @@
|
|||
defaults
|
||||
port 25
|
||||
tls off
|
||||
auto_from
|
||||
domain <%= @hostname %>.vm.rhizomatica.org
|
||||
maildomain vm.rhizomatica.org
|
||||
aliases /etc/aliases
|
||||
|
||||
account rhizo
|
||||
host mail
|
||||
from root@<%= @hostname %>.vm.rhizomatica.org
|
||||
auth off
|
||||
user root
|
||||
|
||||
account default: rhizo
|
Loading…
Add table
Add a link
Reference in a new issue