Skip to content

postfix::transport ignores destination if nexthop includes []Β #384

@auebergang

Description

@auebergang

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 7.15 (puppetserver)
  • Ruby: 2.7
  • Distribution: Centos 7
  • Module version: 4.4.0

How to reproduce (e.g Puppet code you use)

Using the example

postfix::transport { 'gmail.com'
  destination => smtp,
  nexthop     => '[smtp.google.com]:25'
}

What are you seeing

produces an invalid transport map config in /etc/postfix/transport

gmail.com [smtp.google.com]:25

with postfix logging error messages like,

postfix/qmgr[1847]: warning: connect to transport private/[smtp.google.com]: No such file or directory

What behaviour did you expect instead

This should be (in /etc/postfix/transport)

gmail.com smtp:[smtp.google.com]:25

Output log

Any additional information you'd like to impart

Being able to set any destination would be great. It's currently ignored here if nexthop includes [] but I don't think [] is exclusive to smtp, it just disables MX DNS lookups

See the examples for RESULT FORMAT at transport(5)

e.g.

postfix::transport {
  'a.com':
    destination => relay,
    nexthop     => '[smarthost.a.com]:25';
  'b.com':
    destination => smtp,
    nexthop     => '[10.0.0.1]:25';
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions