class mail::firma { # Firma subsystems include mail::packages::firma postfix::config { "firma_destination_recipient_limit": value => '1', nonstandard => true } postfix::transport_regexp_snippet { 'firma_transport_regexp': content => template('mail/postfix/firma/transport_regexp.erb'), } postfix::virtual_regexp_snippet { 'firma_virtual_regexp': content => template('mail/postfix/firma/virtual_regexp.erb'), } postfix::transport { "${firma_subdomain}.$domain": ensure => absent, destination => "firma", } group { "firma": ensure => present, allowdupe => false, } user { "firma": ensure => present, allowdupe => false, gid => 'firma', require => Group['firma'], home => '/var/lib/firma', } vcsrepo { "/var/lib/firma": ensure => present, provider => git, source => 'git://git.sarava.org/firma.git', revision => 'e279e7e4951087c3e5d29d19602057000f455a41', owner => 'firma', group => 'firma', require => [ User['firma'], Group['firma'] ], } file { '/usr/local/bin/firma': ensure => '/var/lib/firma/firma', owner => root, group => root, require => Vcsrepo['/var/lib/firma'], } exec { 'cp /var/lib/firma/firma.conf.dist /var/lib/firma/firma.conf && chmod 600 /var/lib/firma/firma.conf': creates => '/var/lib/firma/firma.conf', user => 'firma', group => 'firma', require => Vcsrepo['/var/lib/firma'], } }