Defined Type: dovecot::sieve

Defined in:
manifests/sieve.pp

Summary

Simple sieve script resource that gets compiled by sievec and

Overview

notifies the dovecot service.

Parameters:

  • content (Optional[String]) (defaults to: undef)

    The desired content of the file, as string. This attribute is mutually exclusive with ‘source`.

  • source (Optional[String]) (defaults to: undef)

    A source file, which will be copied into place on the local system. This attribute is mutually exclusive with ‘content`.

  • group (Variant[Integer, String]) (defaults to: 0)

    The group that should own the file.

  • mode (Variant[Integer, String]) (defaults to: '0644')

    The permissions for the file.

  • owner (Variant[Integer, String]) (defaults to: 'root')

    The user that should own the file.

  • path (Stdlib::Absolutepath) (defaults to: $name)

    The target path for the file.

  • sievec (Stdlib::Absolutepath) (defaults to: $dovecot::sievec)

    The path to the sievec binary.

Author:

  • Bernhard Frauendienst <puppet@nospam.obeliks.de>



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
# File 'manifests/sieve.pp', line 27

define dovecot::sieve (
  Optional[String] $content = undef,
  Optional[String] $source = undef,
  Variant[Integer, String] $group = 0,
  Variant[Integer, String] $mode = '0644',
  Variant[Integer, String] $owner = 'root',
  Stdlib::Absolutepath $path = $name,
  Stdlib::Absolutepath $sievec = $dovecot::sievec,
) {
  file { "dovecot sieve ${title}":
    path    => $path,
    owner   => $owner,
    group   => $group,
    mode    => $mode,
    content => $content,
    source  => $source,
    require => Class['dovecot::install'],
  }
  ~> exec { "compile sieve ${title}":
    command     => "${sievec} ${path}",
    user        => $owner,
    group       => $group,
    refreshonly => true,
    notify      => Class['dovecot::service'],
  }
}