puppet-postfix icon indicating copy to clipboard operation
puppet-postfix copied to clipboard

Please fix postfix::relayhost parameter

Open XMol opened this issue 3 years ago • 4 comments

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.

XMol avatar May 28 '21 13:05 XMol

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

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

raphink avatar May 31 '21 09:05 raphink

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?

XMol avatar May 31 '21 09:05 XMol

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.

DLeich avatar Apr 13 '22 16:04 DLeich

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 )
}

sandynomad avatar Jun 01 '22 15:06 sandynomad