Skip to content

Modification Request #88

@sellerthorpe

Description

@sellerthorpe

Good morning!

I love the module, and it has worked very well for me with a couple slight modification for my environment. I wanted to contribute to the project by letting you know what I tweaked, and seeing if this falls in line with what you've done. Hopefully you would like to add these changes to a future release, as it could help others who have a similar need.

  1. I had to add data content support for both a canonical database and generic database in the server.pp file. While you do have support for the main.cf parameters, there is currently no way to populate the files themselves through an automated fashion, which is what I was after.
    -->
    $canonical_data = [],
    $generic_data = [],
    .....
    And hashed the default files at the end of server.pp.
    -->
    postfix::dbfile { 'canonical':
    content => template('postfix/canonical.erb'),
    }
    postfix::dbfile { 'generic':
    content => template('postfix/generic.erb'),
    }
  2. These templates are very simple. They started with the default "help text" version that comes with postfix. At the bottom, I simple set them up to append anything in hash form from the data variable.
    -->
    <% @generic_data.each do |line| -%>
    <%= line %>
    <% end -%>

-->
<% @canonical_data.sort.each do |line| -%>
<%= line %>
<% end -%>

So as you can see, it should fall in line with what is already created. This just allows central configuration of the map data, as opposed to manually creating them on each server. In my environment this is required as none of my servers are routeable through to our corporate mail, and DNS is not resolvable. We use maps to mask our sender to a proper address before it hits a relay.

I hope this helps others out!
Thank you for creating this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions