summaryrefslogtreecommitdiff
path: root/manifests/opendkim
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-03-08 10:40:37 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-03-08 10:40:37 -0300
commit8af0ec91d981014055de4a1b872418ac1bc460f6 (patch)
treef4fe00836e990761ae53f481ff0c691a0dc67193 /manifests/opendkim
parent3c207f9a435963a1aa590d219527a62082749b39 (diff)
downloadpuppet-mail-8af0ec91d981014055de4a1b872418ac1bc460f6.tar.gz
puppet-mail-8af0ec91d981014055de4a1b872418ac1bc460f6.tar.bz2
OpenDKIM support
Diffstat (limited to 'manifests/opendkim')
-rw-r--r--manifests/opendkim/key.pp18
-rw-r--r--manifests/opendkim/packages.pp5
2 files changed, 23 insertions, 0 deletions
diff --git a/manifests/opendkim/key.pp b/manifests/opendkim/key.pp
new file mode 100644
index 0000000..bd9dadb
--- /dev/null
+++ b/manifests/opendkim/key.pp
@@ -0,0 +1,18 @@
+define mail::opendkim::key() {
+ file { "/etc/opendkim/keys/${name}" :
+ ensure => directory,
+ owner => 'opendkim',
+ group => 'opendkim',
+ mode => '0750',
+ require => File['/etc/opendkim/keys'],
+ }
+
+ exec { "opendkim-genkey-${name}"
+ command => "opendkim-genkey -s mail -d ${name}",
+ cwd => "/etc/opendkim/keys/${name}",
+ user => root,
+ group => root,
+ creates => File["/etc/opendkim/keys/${name}/mail.private", "/etc/opendkim/keys/${name}/mail.txt" ],
+ require => [ File["/etc/opendkim/keys/${name}"], Package['opendkim-tools'] ],
+ }
+}
diff --git a/manifests/opendkim/packages.pp b/manifests/opendkim/packages.pp
new file mode 100644
index 0000000..bcb577a
--- /dev/null
+++ b/manifests/opendkim/packages.pp
@@ -0,0 +1,5 @@
+class mail::opendkim::packages {
+ package { [ 'opendkim', 'opendkim-tools' ]:
+ ensure => installed,
+ }
+}