Skip to content

Commit

Permalink
Merge pull request #1 from thias/master
Browse files Browse the repository at this point in the history
merge upstream
  • Loading branch information
b4ldr committed Apr 29, 2016
2 parents 0488970 + e43d7e7 commit d0b4d42
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#### 2016-02-02 - 0.3.4
* Expanded TLS and client-TLS directives (#28, @adamcstephens).
* Cosmetic cleanups to main.cf templates.
* Fix ordering of postfix::file resources (#18).
Expand All @@ -6,6 +7,8 @@
* Fix spampd options (#46, @chihoko).
* Add mailbox_size_limit.
* Allow mynetworks to also be an array.
* Allow inet_interfaces to also be an array.
* Change from Modulefile to metadata.json.

#### 2014-05-12 - 0.3.3
* Add Debian support for spampd (#26, @timogoebel).
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 2011-2015 Matthias Saou
Copyright (C) 2011-2016 Matthias Saou

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
9 changes: 0 additions & 9 deletions Modulefile

This file was deleted.

2 changes: 2 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Create a fact for postfix_version using postconf -h mail_version.
* Update default for inet_interfaces to loopback-only?
3 changes: 3 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
case $::osfamily {
'RedHat': {
$postfix_version = $::operatingsystemmajrelease ? {
#'7' => '2.10.1',
'6' => '2.6.6',
'5' => '2.3.3',
default => '2.6.6',
Expand Down Expand Up @@ -33,6 +34,7 @@
$postmap = '/usr/sbin/postmap'
}
'Debian': {
$postfix_version = undef
$command_directory = '/usr/sbin'
$config_directory = '/etc/postfix'
$daemon_directory = '/usr/lib/postfix'
Expand All @@ -58,6 +60,7 @@
$postmap = '/usr/sbin/postmap'
}
'FreeBSD': {
$postfix_version = undef
$command_directory = '/usr/local/sbin'
$config_directory = '/usr/local/etc/postfix'
$daemon_directory = '/usr/local/libexec/postfix'
Expand Down
2 changes: 2 additions & 0 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
$clamav = false,
$files = {},
# Parameters
$postfix_version = $::postfix::params::postfix_version,
$command_directory = $::postfix::params::command_directory,
$config_directory = $::postfix::params::config_directory,
$daemon_directory = $::postfix::params::daemon_directory,
Expand All @@ -161,6 +162,7 @@

validate_hash($files)
# Default has el5 files, for el6 a few defaults have changed
# FIXME : el6 template works for el7, but a new one would be prettier
if ( $::operatingsystem =~ /RedHat|CentOS/ and versioncmp($::operatingsystemrelease, '6') < 0 ) {
$filesuffix = '-el5'
} else {
Expand Down
40 changes: 40 additions & 0 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "thias-postfix",
"version": "0.3.4",
"author": "Matthias Saou",
"license": "Apache-2.0",
"summary": "Postfix Mail Transport Agent module",
"source": "git://github.com/thias/puppet-postfix",
"project_page": "https://github.com/thias/puppet-postfix",
"issues_url": "https://github.com/thias/puppet-postfix/issues",
"tags": [ "mta", "smtp", "mail" ],
"operatingsystem_support": [
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [ "5", "6", "7" ]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [ "5", "6", "7" ]
},
{
"operatingsystem": "Debian",
"operatingsystemrelease": [ "6", "7", "8" ]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [ "12", "14" ]
}
],
"requirements": [
{
"name": "pe",
"version_requirement": "3.x"
},
{
"name": "puppet",
"version_requirement": ">=2.7.20 <4.1.0"
}
],
"dependencies": []
}
5 changes: 5 additions & 0 deletions templates/main.cf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,12 @@ myorigin = <%= @myorigin %>
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
<% if @inet_interfaces and @inet_interfaces.is_a?(String) -%>
inet_interfaces = <%= @inet_interfaces %>
<% end -%>
<% if @inet_interfaces and @inet_interfaces.is_a?(Array) -%>
inet_interfaces = <%= @inet_interfaces.join(', ') %>
<% end -%>

# Enable IPv4, and IPv6 if supported
inet_protocols = <%= @inet_protocols %>
Expand Down

0 comments on commit d0b4d42

Please sign in to comment.