Defined Type: exim4::dkim

Defined in:
modules/exim4/manifests/dkim.pp

Overview

Parameters:

  • domain (Any)
  • selector (Any)
  • source (Any) (defaults to: undef)
  • content (Any) (defaults to: undef)


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'modules/exim4/manifests/dkim.pp', line 20

define exim4::dkim(
  $domain,
  $selector,
  $source=undef,
  $content=undef,
) {
    if $source != undef and $content != undef {
        fail('Both source and content attribute have been defined')
    }

    $keyfile = "/etc/exim4/dkim/${domain}-${selector}.key"

    file { $keyfile:
        ensure    => present,
        owner     => 'root',
        group     => 'Debian-exim',
        mode      => '0440',
        require   => File['/etc/exim4/dkim'],
        notify    => Service['exim4'],
        show_diff => false,
    }

    if $source != undef {
        File[$keyfile] {
            source => $source,
        }
    } elsif $content != undef {
        File[$keyfile] {
            content => $content,
        }
    } else {
        fail('Either source or content attribute needs to be given')
    }
}