aboutsummaryrefslogtreecommitdiffstats
path: root/modules/postfix/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/postfix/manifests/init.pp')
-rw-r--r--modules/postfix/manifests/init.pp67
1 files changed, 14 insertions, 53 deletions
diff --git a/modules/postfix/manifests/init.pp b/modules/postfix/manifests/init.pp
index 855778da..8a4394df 100644
--- a/modules/postfix/manifests/init.pp
+++ b/modules/postfix/manifests/init.pp
@@ -1,63 +1,24 @@
class postfix {
+ package { 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"),
- }
+ service { 'postfix':
+ subscribe => Package['postfix'],
}
- class smtp_server inherits base {
- include postgrey
- file { '/etc/postfix/main.cf':
- content => template("postfix/main.cf"),
- }
-
- file { '/etc/postfix/transport_regexp':
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- content => template("postfix/transport_regexp"),
- }
-
+ file { '/etc/postfix/main.cf':
+ require => Package['postfix'],
+ content => '',
+ notify => Service['postfix'],
}
- class primary_smtp inherits smtp_server {
- file { '/etc/postfix/master.cf':
- ensure => present,
- owner => root,
- group => root,
- mode => 644,
- content => template("postfix/primary_master.cf"),
- }
+ file { '/etc/ssl/postfix/':
+ ensure => directory,
}
- class secondary_smtp inherits smtp_server {
+ openssl::self_signed_splitted_cert { "${::hostname}.${::domain}":
+ filename => 'postfix',
+ directory => '/etc/ssl/postfix/',
+ owner => 'postfix',
+ group => 'postfix'
}
-
}