]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/exim/manifests/vdomain.pp
and take into account shorter path
[dsa-puppet.git] / modules / exim / manifests / vdomain.pp
1 define exim::vdomain (
2         $alias_file,
3         $user,
4         $group,
5         $maildir,
6         $domain=$name,
7 ) {
8         include exim::vdomain::setup
9
10         file { $maildir:
11                 ensure => directory,
12                 mode   => '0755',
13                 owner  => root,
14                 group  => root
15         }
16
17         file { "${maildir}/mail":
18                 ensure => directory,
19                 mode   => '0755',
20                 owner  => root,
21                 group  => root
22         }
23
24         file { "${maildir}/mail/aliases":
25                 source => $alias_file,
26                 mode   => '0644',
27                 owner  => root,
28                 group  => root
29         }
30
31         concat::fragment { "virtualdomain_${domain}":
32                 target  => '/etc/exim4/virtualdomains',
33                 content => "${domain}: user=${user} group=${group} directory=${maildir}/mail\n",
34         }
35 }