summaryrefslogtreecommitdiff
path: root/manifests/dovecot.pp
blob: 2fda2fcee55f8a3f76c72898b4dfbd6b54483c6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class mail::dovecot {
  # Dovecot
  service { "dovecot":
    ensure  => running,
    require => [ Package['dovecot-imapd'], File['/etc/dovecot/dovecot.conf', '/etc/dovecot/dovecot-sql.conf'] ],
  }

  file { "/etc/dovecot/dovecot.conf":
    ensure => present,
    owner  => root,
    group  => root,
    mode   => 0644,
    source => "puppet://$server/modules/mail/dovecot/dovecot.conf",
    notify => Service['dovecot'],
  }

  file { "/etc/dovecot/dovecot-sql.conf":
    ensure  => present,
    owner   => root,
    group   => root,
    mode    => 0600,
    content => template('dovecot/dovecot-sql.conf.erb'),
    notify  => Service['dovecot'],
  }
}