aboutsummaryrefslogtreecommitdiffstats
path: root/modules/postfix/manifests/init.pp
blob: b3c4fc8b3cba23d33e924c80a4c5cc700824e265 (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
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
54
class postfix {

    class base {
        package { postfix:
            ensure => installed
        }
    	package { 'nail':
                ensure => installed
        }
        service { postfix:
            ensure => running,
            subscribe => [ Package['postfix']],
            path => "/etc/init.d/postfix"
        }
    }    

    file { '/etc/postfix/main.cf': 
        ensure => present, 
        owner => root, 
        group => root, 
        mode => 644, 
        require => Package["postfix"], 
        content => "", 
        notify => [Service['postfix']] 
    } 


    class simple_relay inherits base {
        file { '/etc/postfix/main.cf':
            content => template("postfix/simple_relay_main.cf"),
        }
    }

    class primary_smtp inherits base {
        file { '/etc/postfix/main.cf':
            content => template("postfix/primary_main.cf"),
        }

        file { '/etc/postfix/master.cf':
            content => template("postfix/primary_master.cf"),
        }

        file { '/etc/postfix/transport_regexp':
            content => template("postfix/primary_transport_regexp"),
        }
    }

    class secondary_smtp inherits base {
        file { '/etc/postfix/main.cf':
            content => template("postfix/secondary_main.cf"),
        }
    }

}