class nodo::subsystem::mail { # Email delivery configuration $mail_delivery = lookup('nodo::subsystem::mail::delivery', undef, undef, 'exim') # A handy SMTP wrapper include nodo::subsystem::mail::msmtp if $mail_delivery != 'postfix' { #if !defined(Package['mailx']) { package { 'mailx': name => 'bsd-mailx', ensure => present, } } case $mail_delivery { 'tunnel': { $mail_hostname = lookup('nodo::subsystem::mail::hostname') tunnel::autossh::mail { "$mail_hostname": sshport => lookup('nodo::subsystem::mail::ssh_port'), } } 'postfix', 'disabled': { } '','exim',default: { include exim::tls } } }