From: Silvio Rhatto Date: Wed, 16 Feb 2011 18:54:09 +0000 (-0200) Subject: Managing 05-node_id needed by squeeze X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=eb728701336fc123810fe999c3d8f57dd7d3fffd;p=puppet-mail.git Managing 05-node_id needed by squeeze --- diff --git a/manifests/amavisd.pp b/manifests/amavisd.pp index 720c15c..0935c8b 100644 --- a/manifests/amavisd.pp +++ b/manifests/amavisd.pp @@ -41,6 +41,20 @@ class mail::amavisd { notify => Service['amavis'], } + case $lsbdistcodename { + 'lenny': { } + default: { + file { "/etc/amavis/conf.d/05-node_id": + ensure => present, + owner => root, + group => root, + mode => 0644, + content => template('mail/amavisd/05-node_id.erb'), + notify => Service['amavis'], + } + } + } + group { 'amavis': ensure => present, } diff --git a/templates/amavisd/05-node_id.erb b/templates/amavisd/05-node_id.erb new file mode 100644 index 0000000..6a09896 --- /dev/null +++ b/templates/amavisd/05-node_id.erb @@ -0,0 +1,14 @@ +use strict; + +# $myhostname is used by amavisd-new for node identification, and it is +# important to get it right (e.g. for ESMTP EHLO, loop detection, and so on). + +chomp($myhostname = `hostname --fqdn`); + +# To manually set $myhostname, edit the following line with the correct Fully +# Qualified Domain Name (FQDN) and remove the # at the beginning of the line. +# +#$myhostname = "mail.example.com"; +$myhostname = "<%= fqdn %>"; + +1; # ensure a defined return