Skip to content
Snippets Groups Projects
Select Git revision
  • 837c93b37236ad67efb10f0ef59b682069fbbbfb
  • master default protected
  • subtemplate
  • release_7.0.6
  • php84
  • 6.x
  • v5.x-test
  • 5x
  • 7.1.0
  • 7.0.6
  • 7.0.5
  • 7.0.4
  • 7.0.3
  • 7.0.2
  • 7.0.1
  • 7.0.0
  • 6.1.7
  • 6.1.6
  • 6.1.5
  • 6.1.4
  • 6.1.3
  • 6.1.2
  • 6.1.1
  • 6.1.0
  • 6.0.3
  • 6.0.2
  • 5.0.6
  • 6.0.1
28 results

001_tables.sql

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    init.pp 2.06 KiB
    #
    # == Class: postfix
    #
    # This class provides a basic setup of postfix with local and remote
    # delivery and an SMTP server listening on the loopback interface.
    #
    # Parameters:
    # - *$postfix_smtp_listen*: address on which the smtp service will listen to.
    #      defaults to 127.0.0.1
    # - *$root_mail_recipient*: who will recieve root's emails. defaults to 'nobody'
    #
    # Example usage:
    #
    #   node 'toto.example.com' {
    #     $postfix_smtp_listen = '192.168.1.10'
    #     include postfix
    #   }
    #
    class postfix (
      $smtp_listen = '127.0.0.1',         # postfix_smtp_listen
      $root_mail_recipient = 'nobody',    # root_mail_recipient
      $use_amavisd = false,               # postfix_use_amavisd
      $use_dovecot_lda = false,           # postfix_use_dovecot_lda
      $use_schleuder = false,             # postfix_use_schleuder
      $use_sympa = false,                 # postfix_use_sympa
      $mail_user = 'vmail',               # postfix_mail_user
      $myorigin = $::fqdn,
      $inet_interfaces = 'localhost',
      $master_smtp = undef,               # postfix_master_smtp
      $master_smtps = undef,              # postfix_master_smtps
      $master_submission = undef,         # postfix_master_submission
    ) inherits postfix::params {
    
      validate_string($smtp_listen)
      validate_string($root_mail_recipient)
      validate_bool($use_amavisd)
      validate_bool($use_dovecot_lda)
      validate_bool($use_schleuder)
      validate_bool($use_sympa)
      validate_string($mail_user)
      validate_string($myorigin)
      validate_string($inet_interfaces)
      validate_string($master_smtp)
      validate_string($master_smtps)
    
      class { 'postfix::packages': } ->
      class { 'postfix::files':
        smtp_listen         => $smtp_listen,
        root_mail_recipient => $root_mail_recipient,
        use_amavisd         => $use_amavisd,
        use_dovecot_lda     => $use_dovecot_lda,
        use_schleuder       => $use_schleuder,
        use_sympa           => $use_sympa,
        mail_user           => $mail_user,
        master_smtp         => $master_smtp,
        master_smtps        => $master_smtps,
        master_submission   => $master_submission,
        } ~>
      class { 'postfix::service': } ->
      Class['postfix']
    }