summaryrefslogtreecommitdiff
path: root/manifests/dovecot.pp
blob: c0546787e241c910285ca7da1c34bc5164335850 (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   => vmail,
    mode    => 0644,
    content => template("mail/dovecot/dovecot.conf.${lsbdistcodename}.erb"),
    notify  => Service['dovecot'],
  }

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