diff options
author | Michael Scherer <misc@mageia.org> | 2010-10-27 10:36:01 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2010-10-27 10:36:01 +0000 |
commit | e2e6aafa49ee93783a115874b76189ecc6867b58 (patch) | |
tree | f5fcc45ac049cdeaa7628465951bc536ab8a66f4 | |
parent | 26c4a4bc4547ef5436d04397553b5dbf23a815cc (diff) | |
download | puppet-e2e6aafa49ee93783a115874b76189ecc6867b58.tar puppet-e2e6aafa49ee93783a115874b76189ecc6867b58.tar.gz puppet-e2e6aafa49ee93783a115874b76189ecc6867b58.tar.bz2 puppet-e2e6aafa49ee93783a115874b76189ecc6867b58.tar.xz puppet-e2e6aafa49ee93783a115874b76189ecc6867b58.zip |
- add a postfix module
-rw-r--r-- | modules/postfix/manifests/init.pp | 39 | ||||
-rw-r--r-- | modules/postfix/templates/main.cf | 33 | ||||
-rw-r--r-- | modules/postfix/templates/simple_relay_main.cf | 33 |
3 files changed, 105 insertions, 0 deletions
diff --git a/modules/postfix/manifests/init.pp b/modules/postfix/manifests/init.pp new file mode 100644 index 00000000..7a1df0a0 --- /dev/null +++ b/modules/postfix/manifests/init.pp @@ -0,0 +1,39 @@ +class postfix { + # some trick to manage daemon directory, who is arch dependent on mdv + $usr_lib = $architecture ? { + x86_64 => "lib64", + default => "lib" + } + + $path_daemon_directory = "/usr/$usr_lib/postfix/" + + + class postfix_base { + package { postfix: + 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 postfix_simple_relay inherits postfix_base { + file { '/etc/postfix/main.cf': + content => template("postfix/simple_relay_main.conf"), + } + } +} diff --git a/modules/postfix/templates/main.cf b/modules/postfix/templates/main.cf new file mode 100644 index 00000000..ece80332 --- /dev/null +++ b/modules/postfix/templates/main.cf @@ -0,0 +1,33 @@ +# Please be sure to read the /usr/share/doc/postfix/README.MDK file +# to learn about differences from stock postfix to Mandriva package. +# This file contains only the parameters changed from a default install +# see /etc/postfix/main.cf.dist for a commented, fuller version of this file. + +# These are changed by postfix install script +readme_directory = /usr/share/doc/postfix/README_FILES +html_directory = /usr/share/doc/postfix/html +sendmail_path = /usr/sbin/sendmail.postfix +setgid_group = postdrop +command_directory = /usr/sbin +manpage_directory = /usr/share/man +daemon_directory = /usr/lib64/postfix +data_directory = /var/lib/postfix +newaliases_path = /usr/bin/newaliases +mailq_path = /usr/bin/mailq +queue_directory = /var/spool/postfix +mail_owner = postfix + +# User configurable parameters + +inet_interfaces = localhost +inet_protocols = all +mynetworks_style = host +#delay_warning_time = 4h +smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandriva Linux) +unknown_local_recipient_reject_code = 450 +smtp-filter_destination_concurrency_limit = 2 +lmtp-filter_destination_concurrency_limit = 2 +smtpd_use_tls = yes +smtpd_tls_cert_file = /etc/pki/tls/certs/postfix.pem +smtpd_tls_key_file = /etc/pki/tls/private/postfix.pem +smtpd_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt diff --git a/modules/postfix/templates/simple_relay_main.cf b/modules/postfix/templates/simple_relay_main.cf new file mode 100644 index 00000000..44523eec --- /dev/null +++ b/modules/postfix/templates/simple_relay_main.cf @@ -0,0 +1,33 @@ +# Please be sure to read the /usr/share/doc/postfix/README.MDK file +# to learn about differences from stock postfix to Mandriva package. +# This file contains only the parameters changed from a default install +# see /etc/postfix/main.cf.dist for a commented, fuller version of this file. + +# These are changed by postfix install script +readme_directory = /usr/share/doc/postfix/README_FILES +html_directory = /usr/share/doc/postfix/html +sendmail_path = /usr/sbin/sendmail.postfix +setgid_group = postdrop +command_directory = /usr/sbin +manpage_directory = /usr/share/man +daemon_directory = <%= path_daemon_directory %> +data_directory = /var/lib/postfix +newaliases_path = /usr/bin/newaliases +mailq_path = /usr/bin/mailq +queue_directory = /var/spool/postfix +mail_owner = postfix + +# User configurable parameters + +inet_interfaces = localhost +inet_protocols = all +mynetworks_style = host +#delay_warning_time = 4h +smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandriva Linux) +unknown_local_recipient_reject_code = 450 +smtp-filter_destination_concurrency_limit = 2 +lmtp-filter_destination_concurrency_limit = 2 +smtpd_use_tls = yes +smtpd_tls_cert_file = /etc/pki/tls/certs/postfix.pem +smtpd_tls_key_file = /etc/pki/tls/private/postfix.pem +smtpd_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt |