blob: 32561f32ac147ae0254b8cca400aee9b542955cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
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 -b 2048 -s mail -d ${name} && chown opendkim.opendkim mail.private",
cwd => "/etc/opendkim/keys/${name}",
user => root,
group => root,
creates => "/etc/opendkim/keys/${name}/mail.private",
require => [ File["/etc/opendkim/keys/${name}"], Package['opendkim-tools'] ],
notify => Service['opendkim'],
}
}
|