]> gitweb.fluxo.info Git - puppet-mail.git/commitdiff
Managing 05-node_id needed by squeeze
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 16 Feb 2011 18:54:09 +0000 (16:54 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 16 Feb 2011 18:54:09 +0000 (16:54 -0200)
manifests/amavisd.pp
templates/amavisd/05-node_id.erb [new file with mode: 0644]

index 720c15c07ed73d362ec6c3ec5b4b3457d59f3fec..0935c8b3daca8c8abafdc511c589d325f35bab83 100644 (file)
@@ -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 (file)
index 0000000..6a09896
--- /dev/null
@@ -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