diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-03-08 10:40:37 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-03-08 10:40:37 -0300 |
commit | 8af0ec91d981014055de4a1b872418ac1bc460f6 (patch) | |
tree | f4fe00836e990761ae53f481ff0c691a0dc67193 /manifests/opendkim | |
parent | 3c207f9a435963a1aa590d219527a62082749b39 (diff) | |
download | puppet-mail-8af0ec91d981014055de4a1b872418ac1bc460f6.tar.gz puppet-mail-8af0ec91d981014055de4a1b872418ac1bc460f6.tar.bz2 |
OpenDKIM support
Diffstat (limited to 'manifests/opendkim')
-rw-r--r-- | manifests/opendkim/key.pp | 18 | ||||
-rw-r--r-- | manifests/opendkim/packages.pp | 5 |
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, + } +} |