diff options
-rw-r--r-- | files/postfix/header_checks | 2 | ||||
-rw-r--r-- | manifests/header_checks.pp | 10 | ||||
-rw-r--r-- | templates/postfix/header_checks.erb | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/files/postfix/header_checks b/files/postfix/header_checks deleted file mode 100644 index d666512..0000000 --- a/files/postfix/header_checks +++ /dev/null @@ -1,2 +0,0 @@ -/^Received: from (.* \([-._[:alnum:]]+ \[[.[:digit:]]{7,15}\]\)).*?([[:space:]]+).*\(Authenticated sender: ([^)]+)\).*by ([^)]) \(([^)]+)\) with (E?SMTPS?A?) id ([A-F[:digit:]]+).*/ - REPLACE Received: from [127.0.0.1] (localhost [127.0.0.1])$2(Authenticated sender: $3)${2}with $6 id $7 diff --git a/manifests/header_checks.pp b/manifests/header_checks.pp index 4dd0e7f..8b74a5e 100644 --- a/manifests/header_checks.pp +++ b/manifests/header_checks.pp @@ -6,10 +6,10 @@ class mail::header_checks { } file { "/etc/postfix/header_checks": - ensure => present, - owner => root, - group => root, - mode => 0644, - source => "puppet://$server/modules/mail/postfix/header_checks", + ensure => present, + owner => root, + group => root, + mode => 0644, + content => template('mail/postfix/header_checks.erb'), } } diff --git a/templates/postfix/header_checks.erb b/templates/postfix/header_checks.erb new file mode 100644 index 0000000..bca5914 --- /dev/null +++ b/templates/postfix/header_checks.erb @@ -0,0 +1,2 @@ +/^Received: from (.* \([-._[:alnum:]]+ \[[.[:digit:]]{7,15}\]\)).*?([[:space:]]+).*\(Authenticated sender: ([^)]+)\).*by (<%= fqdn.gsub(/\./, '\.') %>) \(([^)]+)\) with (E?SMTPS?A?) id ([A-F[:digit:]]+).*/ + REPLACE Received: from [127.0.0.1] (localhost [127.0.0.1])$2(Authenticated sender: $3)${2}with $6 id $7 |