voxpupuli / puppet-postfix

Puppet postfix module
Apache License 2.0
70 stars 172 forks source link

Please fix postfix::relayhost parameter #295

Open XMol opened 3 years ago

XMol commented 3 years ago

Hi,

as was already reported several years ago (#187), the postfix::relayhost parameter is meaningless. Unlike many other parameters, it is not looked up by postfix::files and therefor has no effect, which we discovered today.

I'd suggest to either remove the parameter and force people to include it in postfix::configs or to define Postfix::Config['relayhost'] themselves, or handle it in postfix::files, same as with four more parameters.

Thank you,
Xavier.

raphink commented 3 years ago

It seems that postfix::relayhost is used in postfix::mta:

https://github.com/camptocamp/puppet-postfix/blob/master/manifests/mta.pp#L40-L45

XMol commented 3 years ago

True, but we don't have postfix::mta in our catalog, which seemingly isn't mandatory. Including that - or postfix::satellite, which does the same - just to have relayhost included in main.cf cannot be the advised solution, right?

DLeich commented 2 years ago

I just got bit by this too. Was scratching my head trying to figure out why relayhost wasn't getting defined in main.cf. This appears to be why.

sandynomad commented 2 years ago

Bump for this issue. It's defined in the documentation yet the implementation doesn't match the documentation.

For those who trip across this issue, to use a value from heira:

class { 'postfix':
}

postfix::config {
    'relayhost': value => lookup('postfix::relayhost', undef, undef, undef )
}