thias / puppet-postfix

Puppet Postfix module
Other
17 stars 117 forks source link

Issue with smtp_content_filter parameter #32

Closed kg4zow closed 9 years ago

kg4zow commented 10 years ago

Trying to use the module as part of a larger class which configures postfix to send outbound email. My wrapper class looks like this:

class client_postfix {
  class { '::postfix::server' :
    myorigin => 'client.net' ,
  }
}

When I try to use this module, the agent reports the following error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Undefined variable "smtp_content_filter" at /etc/puppet/modules/postfix/manifests/server.pp:79 on node sandbox.client.net

Looking at the module itself...

     77   # master.cf
     78   $smtp_content_filter = [],
     79   $smtps_content_filter = $smtp_content_filter,
     80   $submission = false,

I've never seen a puppet module use one parameter as the default value for another parameter like this. Is this something which Puppet previously supported, but was removed? (I'm using Puppet 3.6.2 from the Puppetlabs RPMs, on CentOS 6.)

gweimer commented 10 years ago

Any update on this? I changed server.pp to use "$smtps_content_filter = []," & it seems to work now.

Here is error I was getting: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template postfix/master.cf.erb: Filepath: /etc/puppet/environments/production/forge-modules/postfix/templates/master.cf.erb Line: 35 Detail: undefined method `each' for nil:NilClass at /etc/puppet/environments/production/forge-modules/postfix/manifests/server.pp:174 on node clt-pd-svcmgw01.hosting-us.local

line 35 of master.cf.erb is: <% @smtps_content_filter.each do |content_filter| -%>

ghost commented 9 years ago

I'm hitting this issue too, please merge.

thias commented 9 years ago

Thanks! And sorry for the delay. I think this was incorrect from the start, but in my testing environments I have the $smtps_content_filter parameter set explicitly, so I didn't catch the error.

kaihowl commented 9 years ago

Is there any date for the next release on forge that will include this fix?