Looking to Learn - mjhas::postfix

26 views
Skip to first unread message

Eric Hart

unread,
Oct 10, 2014, 3:21:37 PM10/10/14
to puppet...@googlegroups.com
Hey, how's it goin Puppet Masters?  I'm Puppet Novice over here.  I'm looking to up my game and so I'm working on setting up SMTP relay config for my hosts to fire off their local SMTP traffic to my one designated SMTP Relay host.  

I'm hoping to find someone who's familiar with the mjhas::postfix, as I've been digging into this module for a few hours now just gaining some understanding.  

Some basic questions to start.

class postfix::relay (
  $relayhost = 'myrelayserver.example.com',
  $masquerade_domains = $::hostname,
  $sender_hostname = $::fqdn,
) {
  include postfix

  postfix::config::maincfhelper { 'append_dot_mydomain': value => 'yes', }

  postfix::config::maincfhelper { 'myhostname': value => $sender_hostname, }

  postfix::config::maincfhelper { 'myorigin': value => $sender_hostname, }

  postfix::config::maincfhelper { 'mydestination': value => "${sender_hostname}, ${::hostname}", }

  postfix::config::maincfhelper { 'relayhost': value => $relayhost, }

  postfix::config::maincfhelper { 'mynetworks': value => '192.168.1.0/24', }

  postfix::config::maincfhelper { 'mailbox_size_limit': value => '0', }

  postfix::config::maincfhelper { 'masquerade_domains': value => $masquerade_domains, }

  postfix::config::maincfhelper { 'inet_interfaces': value => 'localhost', }
}


Taking a look at that code.  At the declaration of postfix::relay, when defining what I'd consider variables:
$masquerade_domains = $::hostname,

What's happening at the $::hostname?  Is that referencing a previous decleration within postfix or some other module?  Or is that a sort of universal reference?  

Thanks for your time.

Eric

Denmat

unread,
Oct 11, 2014, 5:47:36 PM10/11/14
to puppet...@googlegroups.com
Hi,

That $::hostname is a fact.

The $:: represents something in the top scope.

It will resolve to the hostname of the node running to the postfix agent.

Den
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/246c3931-7181-4bc6-b4e6-ba7d66e6d4a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tony Thayer

unread,
Oct 12, 2014, 5:36:56 PM10/12/14
to puppet...@googlegroups.com
It will actually only return the part of the host name before the first period. $::fqdn will return the full host name.
Reply all
Reply to author
Forward
0 new messages