Skip to content

Commit

Permalink
/etc/mailname must be set for nullmailer to work properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
akumria committed May 10, 2012
1 parent 42f914e commit 39c33e1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ [email protected] via SMTP to smtp.example.com
This may require you to configure your SMTP server to accept
incoming email from various machines.

NOTE: /etc/mailname must be set to a reasonable value. This
module will, by default, set it to $::fqdn

Basic usage
-----------

Expand Down
11 changes: 11 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
class nullmailer::config {

if $nullmailer::manage_etc_mailname == true {

file {'nullmailer /etc/mailname for $fqdn':
name => '/etc/mailname',
content => "$::fqdn\n",
ensure => present,
}

}

file { '/etc/nullmailer/remotes':
content => "$nullmailer::remoterelay smtp\n",
require => Class['nullmailer::package'],
Expand Down
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
$package = $nullmailer::params::package,
$absentpackages = $nullmailer::params::absentpackages,
$service = $nullmailer::params::service,
$manage_etc_mailname = $nullmailer::params::manage_etc_mailname,
$adminaddr = "root@$::domain",
$remoterelay = "smtp.$::domain",

Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
'courier-mta', 'lsb-invalid-mta',
'exim4-base', 'exim4-config', 'exim4']
$service = 'nullmailer'
$manage_etc_mailname = true
}
default: {
fail("Unsupported platform: ${::operatingsystem}")
Expand Down

0 comments on commit 39c33e1

Please sign in to comment.