Giter VIP home page Giter VIP logo

puppet-postfix's People

Contributors

fraenki avatar jiuka avatar nward avatar oxc avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

puppet-postfix's Issues

Prefetching multi instance values does not work

Example code:

  postmulti { 'postfix-foo':
    group => 'bar'
  } ->
  postconf { 'foo::myhostname':
    value => 'foo.bar',
  }

Output:

Notice: Compiled catalog for example in environment production in 0.03 seconds
Info: Using environment 'production'
Info: Applying configuration version '1691590533'
Notice: /Stage[main]/Main/Postconf[foo::myhostname]/ensure: created
Notice: Applied catalog in 0.10 seconds

The postconf resource will always be "created", because prefetching values of multi instances does not seem to work.

Make resources managable via hiera

The postconf and postconf_master resources are currently not very usable from hiera. This should be made easier for common use cases.

error on RHEL6 only

When running on RHEL6.

Error: /Stage[main]/Postfix::Config/Resources[postconf_master]: Failed to generate additional resources using 'generate': undefined method `scan' for nil:NilClass

Failed to generate additional resources using 'generate': undefined method `scan' for nil:NilClass

Source: /Stage[main]/Postfix::Config/Resources[postconf_master]File: /etc/puppetlabs/xx/xx/modules/postfix/manifests/config.ppLine: 10

postfix::main_config:
mydomain: 'xxx
myorigin: '$mydomain'
mydestination: ''
smtp_connect_timeout: '120s'
inet_protocols: 'ipv4'
relayhost: xxx
inet_interfaces: 'loopback-only'
local_transport: 'error:local delivery is disabled'
smtp_generic_maps: 'hash:/etc/postfix/generic'

Unable to remove unsupported parameters

Using this module it is possible to configure parameters that are unsupported by the installed postfix. However, it seems to be impossible to remove these parameters:

Error: /Stage[main]/Resources[postconf]: Failed to generate additional resources using 'generate':
  Parameter parameter failed on Postconf[/usr/sbin/postconf:
    warning: /etc/postfix/main.cf: unused parameter: smtputf8_enable]:
    Invalid value "/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtputf8_enable".
  Valid values match /^([^\/]+::)?[a-zA-Z0-9]+(?:_[a-zA-Z0-9]+)*$/.

In this example I've tried to configure a parameter on postfix 2.x which was only introduced in postfix 3.x.
Any idea how to properly remove these parameters with your module? :)

Postfix doesn't reload when settings change

First of all, thanks for this useful module!

I noticed postfix isn't reloaded or restarted after some settings have changed.

This is on Ubuntu 14.04 with Puppet 4.10 and Hiera 5.
Version 1.0.1 of the oxc-postfix module, configure via Hiera.

At first I though that perhaps service_manage was disabled, but according to Hiera lookup it definitely is 'true' and the restart_cmd is set correctly for Ubuntu.

$ sudo /opt/puppetlabs/bin/puppet lookup 'postfix::service_manage' --environment=production --node=i-046a905500cd5973f.www15.eu-west-1
--- true
$ sudo /opt/puppetlabs/bin/puppet lookup 'postfix::restart_cmd' --environment=production --node=i-046a905500cd5973f.www15.eu-west-1
--- "/etc/init.d/postfix reload"

The agent's debug logs shows there's a refresh event propagated but appears it's never acted upon.

Notice: /Stage[main]/Postfix::Config/Postconf[compatibility_level]/ensure: created
Debug: Executing: '/usr/sbin/postconf compatibility_level=2'
Debug: /Stage[main]/Postfix::Config/Postconf[compatibility_level]: The container Class[Postfix::Config] will propagate my refresh event
Debug: Class[Postfix::Config]: The container Stage[main] will propagate my refresh event
Debug: Service[postfix](provider=upstart): Could not find postfix.conf in /etc/init
Debug: Service[postfix](provider=upstart): Could not find postfix.conf in /etc/init.d
Debug: Service[postfix](provider=upstart): Could not find postfix in /etc/init
Debug: Executing: '/usr/sbin/service postfix status'

Here's another example from puppet agent -t. Some obvious changes, but no reload.

Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for i-046a905500cd5973f.www15.eu-west-1
Info: Applying configuration version 'puppet-production-054ed3c5531'
Notice: /Stage[main]/Postfix::Config/Postconf[config_directory]/ensure: removed
Notice: /Stage[main]/Postfix::Config/Postconf[compatibility_level]/ensure: created
Notice: Applied catalog in 21.48 seconds

I haven't looked into this in detail yet, shouldn't the relationship between the postfix::config and postfix::service classes have a notify "~>" instead of a require "->"?

So in init.pp:

Class { '::postfix::package':  }
-> Class { '::postfix::config': }
-> Class { '::postfix::service': }

should become:

Class { '::postfix::package':  }
-> Class { '::postfix::config': }
~> Class { '::postfix::service': }

Let me know what you think please?

Release on forge

Please let me know when this module is released on the puppet forge under the new namespace, so I can deprecate the old module.

smtp banner gives ' corrective change ' in Puppet UI

When given a long string, the SMTP banner hiera value gives a corrective change every time puppet is run.

Works:
smtpd_banner: '$myhostname ESMTP $mail_name'

Not working:

value changed $myhostname ESMTP $mail_name - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. to $myhostname ESMTP $mail_name - xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.

Have tried:
single quotes
double quotes
no quotes
using | for yaml wouldnt work in this case.
Its just one long string not multiline.

postconf_master is only parsed on a Puppet run *following* Postfix install

On an initial Puppet run (i.e. from a vanilla OS) using puppet apply locally (masterless):

Error: Could not find a suitable provider for postconf_master

On the following Puppet run:

Notice: /Stage[main]/Custom::Profile::Clamav/Postconf_master[amavis/unix]/ensure: created
Notice: /Stage[main]/Custom::Profile::Clamav/Postconf_master[127.0.0.1:10025/inet]/ensure: created

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.