diff options
| -rw-r--r-- | README | 24 | ||||
| -rw-r--r-- | manifests/config.pp | 2 | ||||
| -rw-r--r-- | manifests/hash.pp | 2 | ||||
| -rw-r--r-- | manifests/header_checks_snippet.pp | 2 | ||||
| -rw-r--r-- | manifests/init.pp | 103 | ||||
| -rw-r--r-- | manifests/mailalias.pp | 2 | ||||
| -rw-r--r-- | manifests/mailman.pp | 10 | ||||
| -rw-r--r-- | manifests/mta.pp | 31 | ||||
| -rw-r--r-- | manifests/satellite.pp | 24 | ||||
| -rw-r--r-- | manifests/tlspolicy.pp | 13 | ||||
| -rw-r--r-- | manifests/tlspolicy_snippet.pp | 5 | ||||
| -rw-r--r-- | manifests/transport.pp | 2 | ||||
| -rw-r--r-- | manifests/transport_regexp.pp | 5 | ||||
| -rw-r--r-- | manifests/transport_regexp_snippet.pp | 2 | ||||
| -rw-r--r-- | manifests/virtual.pp | 2 | ||||
| -rw-r--r-- | manifests/virtual_regexp.pp | 5 | ||||
| -rw-r--r-- | manifests/virtual_regexp_snippet.pp | 2 | ||||
| -rw-r--r-- | templates/master.cf.debian-etch.erb | 22 | ||||
| -rw-r--r-- | templates/master.cf.debian-lenny.erb | 22 | ||||
| -rw-r--r-- | templates/master.cf.debian-sid.erb | 22 | ||||
| -rw-r--r-- | templates/master.cf.debian-squeeze.erb | 24 | ||||
| -rw-r--r-- | templates/master.cf.debian-wheezy.erb | 22 | ||||
| -rw-r--r-- | templates/master.cf.redhat5.erb | 10 | 
23 files changed, 192 insertions, 166 deletions
@@ -8,31 +8,37 @@ This module needs:  - the concat module: git://labs.riseup.net/shared-concat +!! Upgrade Notice (01/2013) !! + +This module now uses parameterized classes, where it used global variables +before. So please whatch out before pulling, you need to change the  +class declarations in your manifest ! +  Config  ------ -- set $postfix_use_amavisd="yes" to include postfix::amavis -- set $postfix_anon_sasl="yes" to hide the originating IP in email +- set $use_amavisd="yes" to include postfix::amavis +- set $anon_sasl="yes" to hide the originating IP in email    relayed for an authenticated SASL client; this needs Postfix    2.3 or later to work; beware! Postfix logs the header replacement    has been done, which means that you are storing this information,    unless you are anonymizing your logs. -- set $postfix_manage_header_checks="yes" to manage header checks (see +- set $manage_header_checks="yes" to manage header checks (see    postfix::header_checks for details) -- set $postfix_manage_transport_regexp="yes" to manage header checks (see +- set $manage_transport_regexp="yes" to manage header checks (see    postfix::transport_regexp for details) -- set $postfix_manage_virtual_regexp="yes" to manage header checks (see +- set $manage_virtual_regexp="yes" to manage header checks (see    postfix::virtual_regexp for details) -- set $postfix_manage_tls_policy="yes" to manage TLS policy (see +- set $manage_tls_policy="yes" to manage TLS policy (see    postfix::tlspolicy for details)  - by default, postfix will bind to all interfaces, but sometimes you don't want -  that. To bind to specific interfaces, use the $postfix_inet_interfaces +  that. To bind to specific interfaces, use the $inet_interfaces    variable and set it to exactly what would be in the main.cf file.  - some hosts have weird-looking host names (dedicated servers and VPSes). To -  set the server's domain of origin, set the $postfix_myorigin value +  set the server's domain of origin, set the $myorigin value  == Example: -  include postfix +  class { 'postfix': }    postfix::config { "relay_domains": value  => "localhost host.foo.com" } diff --git a/manifests/config.pp b/manifests/config.pp index 8e203a6..ce7af9e 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -18,7 +18,7 @@ Example usage:    node "toto.example.com" { -    include postfix +    class { 'postfix': }      postfix::config {        "smtp_use_tls"            => "yes"; diff --git a/manifests/hash.pp b/manifests/hash.pp index 6e2012f..006f881 100644 --- a/manifests/hash.pp +++ b/manifests/hash.pp @@ -17,7 +17,7 @@ Example usage:    node "toto.example.com" { -    include postfix +    class { 'postfix': }      postfix::hash { "/etc/postfix/virtual":        ensure => present, diff --git a/manifests/header_checks_snippet.pp b/manifests/header_checks_snippet.pp index 91d7501..05929a3 100644 --- a/manifests/header_checks_snippet.pp +++ b/manifests/header_checks_snippet.pp @@ -14,7 +14,7 @@ Requires:  Example usage:    node "toto.example.com" { -    include postfix +    class { 'postfix': }      postfix::header_checks_snippet {        'wrong_date': content => 'FIXME';        'bla':        source => 'puppet:///files/etc/postfix/header_checks.d/bla'; diff --git a/manifests/init.pp b/manifests/init.pp index 5b04a0f..20b04f4 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -5,17 +5,55 @@  # 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 +# - *$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" +# - *$anon_sasl*: set $anon_sasl="yes" to hide the originating IP in email +# - *$manage_header_checks*: manage header checks +# - *$manage_tls_policy*: manage tls policy +# - *$manage_transport_regexp*: manage transport regexps +# - *$manage_virtual_regexp*: manage virtual regexps +# - *$tls_fingerprint_digest*: fingerprint digest for tls policy class +# - *$use_amavisd*: set to "yes" to configure amavis +# - *$use_dovecot_lda*: include dovecot declaration at master.cf +# - *$use_schleuder*: whether to include schleuder portion at master.cf +# - *$use_sympa*: whether to include sympa portion at master.cf +# - *$use_firma*: whether to include firma portion at master.cf +# - *$use_mlmmj*: whether to include mlmmj portion at master.cf +# - *$use_submission*: set to "yes" to enable submission section at master.cf +# - *$use_smtps*: set to "yes" to enable smtps section at master.cf +# - *$mastercf_tail*: set this for additional content to be added at the end of master.cf +# - *$inet_interfaces*: which inet interface postfix should listen on +# - *$myorigin*: sets postfix $myorigin configuration  #  # Example usage:  #  #   node "toto.example.com" { -#     $postfix_smtp_listen = "192.168.1.10" -#     include postfix +#     class { 'postfix': +#       smtp_listen => "192.168.1.10" +#     }  #   }  # -class postfix { +class postfix( +  $smtp_listen             = "127.0.0.1", +  $root_mail_recipient     = "nobody", +  $anon_sasl               = "no", +  $manage_header_checks    = "no", +  $manage_tls_policy       = "no", +  $manage_transport_regexp = "no", +  $manage_virtual_regexp   = "no", +  $tls_fingerprint_digest  = 'sha1' +  $use_amavisd             = "no", +  $use_dovecot_lda         = "no", +  $use_schleuder           = "no", +  $use_sympa               = "no", +  $use_firma               = "no", +  $use_mlmmj               = "no", +  $use_submission          = "no", +  $use_smtps               = "no", +  $mastercf_tail           = "", +  $inet_interfaces         = 'all', +  $myorigin                = $::fqdn +) {    # selinux labels differ from one distribution to another    case $::operatingsystem { @@ -33,65 +71,30 @@ class postfix {      }    } -  # Default value for various options -  case $postfix_smtp_listen { -    "": { $postfix_smtp_listen = "127.0.0.1" } -  } -  case $root_mail_recipient { -    "":   { $root_mail_recipient = "nobody" } -  } -  case $postfix_anon_sasl { -    "":    { $postfix_anon_sasl = "no" } -  } -  case $postfix_manage_header_checks { -    "":   { $postfix_manage_header_checks = "no" } -  } -  case $postfix_manage_tls_policy { -    "":   { $postfix_manage_tls_policy = "no" } -  } -  case $postfix_use_amavisd { -    "":   { $postfix_use_amavisd = "no" } -  } -  case $postfix_use_dovecot_lda { -    "":   { $postfix_use_dovecot_lda = "no" } -  } -  case $postfix_use_schleuder { -    "":   { $postfix_use_schleuder = "no" } -  } -  case $postfix_use_sympa { -    "":   { $postfix_use_sympa = "no" } -  } -  case $postfix_mastercf_tail { -    "":   { $postfix_mastercf_tail = "" } -  } -  case $postfix_inet_interfaces { -    "": { $postfix_inet_interfaces = 'all' } -  } -  case $postfix_myorigin { -    "": { $postfix_myorigin = $fqdn } -  }    # Bootstrap moduledir    include common::moduledir    module_dir{'postfix': }    # Include optional classes -  if $postfix_anon_sasl == 'yes' { +  if $anon_sasl == 'yes' {      include postfix::anonsasl    } -  if $postfix_manage_header_checks == 'yes' { +  if $header_checks == 'yes' {      include postfix::header_checks    } -  if $postfix_manage_tls_policy == 'yes' { -    include postfix::tlspolicy +  if $manage_tls_policy == 'yes' { +    class { 'postfix::tlspolicy': +      fingerprint_digest => $tls_fingerprint_digest, +    }    } -  if $postfix_use_amavisd == 'yes' { +  if $use_amavisd == 'yes' {      include postfix::amavis    } -  if $postfix_manage_transport_regexp == 'yes' { +  if $manage_transport_regexp == 'yes' {      include postfix::transport_regexp    } -  if $postfix_manage_virtual_regexp == 'yes' { +  if $manage_virtual_regexp == 'yes' {      include postfix::virtual_regexp    } @@ -163,9 +166,9 @@ class postfix {    # Default configuration parameters    postfix::config { -    "myorigin":   value => "${postfix_myorigin}"; +    "myorigin":   value => "${myorigin}";      "alias_maps": value => "hash:/etc/aliases"; -    "inet_interfaces": value => "${postfix_inet_interfaces}"; +    "inet_interfaces": value => "${inet_interfaces}";    }    case $::operatingsystem { diff --git a/manifests/mailalias.pp b/manifests/mailalias.pp index cd1af50..2f239ac 100644 --- a/manifests/mailalias.pp +++ b/manifests/mailalias.pp @@ -15,7 +15,7 @@ Example usage:    node "toto.example.com" { -    include postfix +    class { 'postfix': }      postfix::mailalias { "postmaster":        ensure => present, diff --git a/manifests/mailman.pp b/manifests/mailman.pp index cba0848..8c6ee32 100644 --- a/manifests/mailman.pp +++ b/manifests/mailman.pp @@ -4,19 +4,17 @@  # Configures a basic smtp server, able to work for the mailman mailing-list  # manager.  # -# Parameters: -# - every global variable which works for class "postfix" will work here. -#  # Example usage:  #  #   node "toto.example.com" {  #     include mailman -#     include postfix::mailman +#     class { 'postfix::mailman': }  #   }  #  class postfix::mailman { -  $postfix_smtp_listen = "0.0.0.0" -  include postfix +  class { 'postfix': +    smtp_listen => "0.0.0.0", +  }    postfix::config {      "mydestination":                        value => ""; diff --git a/manifests/mta.pp b/manifests/mta.pp index c36c0bc..f7a865d 100644 --- a/manifests/mta.pp +++ b/manifests/mta.pp @@ -15,14 +15,21 @@  # - *$postfix_mydestination*  # - every global variable which works for class "postfix" will work here.  # +# Requires: +# - Class["postfix"] +#  # Example usage:  #  #   node "toto.example.com" { -#     $postfix_relayhost = "mail.example.com" -#     $postfix_smtp_listen = "0.0.0.0" -#     $postfix_mydestination = "\$myorigin, myapp.example.com"  # -#     include postfix::mta +#     class { 'postfix': +#       smtp_listen => "0.0.0.0", +#     } +# +#     class { 'postfix::mta': +#       relayhost     => "mail.example.com", +#       mydestination => "\$myorigin, myapp.example.com", +#     }  #  #     postfix::transport { "myapp.example.com":  #       ensure => present, @@ -30,22 +37,24 @@  #     }  #   }  # -class postfix::mta { +class postfix::mta( +  $mydestination = '', +  $relayhost     = '' +) { -  #case $postfix_relayhost { -  #  "":   { fail("Required \$postfix_relayhost variable is not defined.") } +  #case $relayhost { +  #  "":   { fail("Required relayhost parameter is not defined.") }    #} -  case $postfix_mydestination { +  case $mydestination {      "": { $postfix_mydestination = "\$myorigin" } +    default: { $postfix_mydestination = "$mydestination" }    } -  include postfix -    postfix::config {      "mydestination":                        value => $postfix_mydestination;      "mynetworks":                           value => "127.0.0.0/8"; -    "relayhost":                            value => $postfix_relayhost; +    "relayhost":                            value => $relayhost;      "virtual_alias_maps":                   value => "hash:/etc/postfix/virtual";      "transport_maps":                       value => "hash:/etc/postfix/transport";    } diff --git a/manifests/satellite.pp b/manifests/satellite.pp index 99904dd..63fc466 100644 --- a/manifests/satellite.pp +++ b/manifests/satellite.pp @@ -14,14 +14,18 @@  # Example usage:  #  #   node "toto.local.lan" { -#     $postfix_relayhost = "mail.example.com" -#     $valid_fqdn = "toto.example.com" -#     $root_mail_recipient = "the.sysadmin@example.com" -# -#     include postfix::satellite +#     class { 'postfix::satellite': +#       relayhost           => "mail.example.com" +#       valid_fqdn          => "toto.example.com" +#       root_mail_recipient => "the.sysadmin@example.com" +#     }  #   }  # -class postfix::satellite { +class postfix::satellite( +  $relayhost           = '', +  $valid_fqdn          = '', +  $root_mail_recipient = '' +) {    # If $valid_fqdn exists, use it to override $fqdn    case $valid_fqdn { @@ -29,7 +33,13 @@ class postfix::satellite {      default: { $fqdn = "${valid_fqdn}" }    } -  include postfix::mta +  class { 'postfix: +    root_mail_recipient => $root_mail_recipient, +  } + +  class { 'postfix::mta': +    relayhost => $relayhost, +  }    postfix::virtual {"@${valid_fqdn}":      ensure      => present, diff --git a/manifests/tlspolicy.pp b/manifests/tlspolicy.pp index fb7020d..e1272b9 100644 --- a/manifests/tlspolicy.pp +++ b/manifests/tlspolicy.pp @@ -5,18 +5,15 @@  # via postfix::tlspolicy_snippet defines  #  # Parameters: -# - $postfix_tls_fingerprint_digest (defaults to sha1) +# - $fingerprint_digest (defaults to sha1)  #  # Note that this class is useless when used directly.  # The postfix::tlspolicy_snippet defines takes care of importing  # it anyway.  # -class postfix::tlspolicy { - -  # Default value for parameters -  case $postfix_tls_fingerprint_digest { -    "": { $postfix_tls_fingerprint_digest = 'sha1' } -  } +class postfix::tlspolicy( +  $fingerprint_digest = 'sha1' +) {    include common::moduledir    module_dir{'postfix/tls_policy': } @@ -37,7 +34,7 @@ class postfix::tlspolicy {    }    postfix::config { -    'smtp_tls_fingerprint_digest': value => "$postfix_tls_fingerprint_digest"; +    'smtp_tls_fingerprint_digest': value => "$fingerprint_digest";    }    postfix::config { 'smtp_tls_policy_maps': diff --git a/manifests/tlspolicy_snippet.pp b/manifests/tlspolicy_snippet.pp index 701528b..b63f812 100644 --- a/manifests/tlspolicy_snippet.pp +++ b/manifests/tlspolicy_snippet.pp @@ -16,8 +16,9 @@ Requires:  Example usage:    node "toto.example.com" { -    $postfix_manage_tls_policy = yes -    include postfix +    class { 'postfix': +      manage_tls_policy => 'yes', +    }      postfix::tlspolicy_snippet {        'example.com':  value => 'encrypt';        '.example.com': value => 'encrypt'; diff --git a/manifests/transport.pp b/manifests/transport.pp index 5ca5554..90c5468 100644 --- a/manifests/transport.pp +++ b/manifests/transport.pp @@ -18,7 +18,7 @@ Example usage:    node "toto.example.com" { -    include postfix +    class { 'postfix': }      postfix::hash { "/etc/postfix/transport":        ensure => present, diff --git a/manifests/transport_regexp.pp b/manifests/transport_regexp.pp index 924ae8a..7670d7d 100644 --- a/manifests/transport_regexp.pp +++ b/manifests/transport_regexp.pp @@ -11,8 +11,9 @@  # Example usage:  #   #   node "toto.example.com" { -#     $postfix_manage_transport_regexp = yes -#     include postfix +#     class { 'postfix': +#       manage_transport_regexp => 'yes', +#     }  #     postfix::config { "transport_maps":  #       value => "hash:/etc/postfix/transport, regexp:/etc/postfix/transport_regexp",  #     } diff --git a/manifests/transport_regexp_snippet.pp b/manifests/transport_regexp_snippet.pp index eb43c37..2b13ed1 100644 --- a/manifests/transport_regexp_snippet.pp +++ b/manifests/transport_regexp_snippet.pp @@ -14,7 +14,7 @@ Requires:  Example usage:    node "toto.example.com" { -    include postfix +    class { 'postfix': }      postfix::transport_regexp {        'wrong_date': content => 'FIXME';        'bla':        source => 'puppet:///files/etc/postfix/transport_regexp.d/bla'; diff --git a/manifests/virtual.pp b/manifests/virtual.pp index 8fcd53a..d6912a4 100644 --- a/manifests/virtual.pp +++ b/manifests/virtual.pp @@ -18,7 +18,7 @@ Example usage:    node "toto.example.com" { -    include postfix +    class { 'postfix': }      postfix::hash { "/etc/postfix/virtual":        ensure => present, diff --git a/manifests/virtual_regexp.pp b/manifests/virtual_regexp.pp index db41354..ece3117 100644 --- a/manifests/virtual_regexp.pp +++ b/manifests/virtual_regexp.pp @@ -11,8 +11,9 @@  # Example usage:  #   #   node "toto.example.com" { -#     $postfix_manage_virtual_regexp = yes -#     include postfix +#     class { 'postfix': +#       manage_virtual_regexp => 'yes', +#     }  #     postfix::config { "virtual_alias_maps":  #       value => 'hash://postfix/virtual, regexp:/etc/postfix/virtual_regexp',  #     } diff --git a/manifests/virtual_regexp_snippet.pp b/manifests/virtual_regexp_snippet.pp index b4515b4..bd9a982 100644 --- a/manifests/virtual_regexp_snippet.pp +++ b/manifests/virtual_regexp_snippet.pp @@ -14,7 +14,7 @@ Requires:  Example usage:    node "toto.example.com" { -    include postfix +    class { 'postfix': }      postfix::virtual_regexp {        'wrong_date': content => 'FIXME';        'bla':        source => 'puppet:///files/etc/postfix/virtual_regexp.d/bla'; diff --git a/templates/master.cf.debian-etch.erb b/templates/master.cf.debian-etch.erb index aaea777..b49a399 100644 --- a/templates/master.cf.debian-etch.erb +++ b/templates/master.cf.debian-etch.erb @@ -7,14 +7,14 @@  # service type  private unpriv  chroot  wakeup  maxproc command + args  #               (yes)   (yes)   (yes)   (never) (100)  # ========================================================================== -<% if postfix_smtp_listen == 'all' %>smtp      inet  n       -       -       -       -       smtpd -<% else %><%= postfix_smtp_listen %>:smtp      inet  n       -       -       -       -       smtpd<% end %> -<% if postfix_use_submission == 'yes' %>submission inet n       -       -       -       -       smtpd +<% if smtp_listen == 'all' %>smtp      inet  n       -       -       -       -       smtpd +<% else %><%= smtp_listen %>:smtp      inet  n       -       -       -       -       smtpd<% end %> +<% if use_submission == 'yes' %>submission inet n       -       -       -       -       smtpd    -o smtpd_enforce_tls=yes    -o smtpd_sasl_auth_enable=yes    -o smtpd_client_restrictions=permit_sasl_authenticated,reject  <% end %> -<% if postfix_use_smtps == 'yes' %>smtps     inet  n       -       -       -       -       smtpd +<% if use_smtps == 'yes' %>smtps     inet  n       -       -       -       -       smtpd    -o smtpd_tls_wrappermode=yes    -o smtpd_sasl_auth_enable=yes    -o smtpd_client_restrictions=permit_sasl_authenticated,reject @@ -77,7 +77,7 @@ scalemail-backend unix	-	n	n	-	2	pipe  mailman   unix  -       n       n       -       -       pipe    flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py    ${nexthop} ${user} -<% if postfix_use_amavisd == 'yes' %> +<% if use_amavisd == 'yes' %>  amavis unix - - - - 2 smtp          -o smtp_data_done_timeout=1200          -o smtp_send_xforward_command=yes @@ -96,25 +96,25 @@ amavis unix - - - - 2 smtp          -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks          -o smtpd_bind_address=127.0.0.1  <% end %> -<% if postfix_use_dovecot_lda == 'yes' %> +<% if use_dovecot_lda == 'yes' %>  dovecot   unix  -       n       n       -       -       pipe    flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -n -m ${extension}    <% end %> -<% if postfix_use_schleuder == 'yes' %> +<% if use_schleuder == 'yes' %>  schleuder  unix  -       n       n       -       -       pipe    flags=DRhu user=schleuder argv=/usr/bin/schleuder ${user}  <% end %> -<% if postfix_use_sympa == 'yes' %> +<% if use_sympa == 'yes' %>  sympa        unix  -       n       n       -       -       pipe    flags=R user=sympa argv=/usr/lib/sympa/bin/queue ${recipient}  sympabounce  unix  -       n       n       -       -       pipe    flags=R user=sympa argv=/usr/lib/sympa/bin/bouncequeue ${user}  <% end %> -<% if postfix_use_mlmmj == 'yes' %> +<% if use_mlmmj == 'yes' %>  mlmmj   unix  -       n       n       -       -       pipe    flags=DORhu user=mlmmj argv=/usr/bin/mlmmj-recieve -F -L /var/spool/mlmmj/$nexthop/  <%- end -%> -<%- unless postfix_mastercf_tail.to_s.empty? then -%> -<%= postfix_mastercf_tail %> +<%- unless mastercf_tail.to_s.empty? then -%> +<%= mastercf_tail %>  <%- end -%> diff --git a/templates/master.cf.debian-lenny.erb b/templates/master.cf.debian-lenny.erb index ab71f97..50241b8 100644 --- a/templates/master.cf.debian-lenny.erb +++ b/templates/master.cf.debian-lenny.erb @@ -9,15 +9,15 @@  # service type  private unpriv  chroot  wakeup  maxproc command + args  #               (yes)   (yes)   (yes)   (never) (100)  # ========================================================================== -<% if postfix_smtp_listen == 'all' %>smtp      inet  n       -       -       -       -       smtpd -<% else %><%= postfix_smtp_listen %>:smtp      inet  n       -       -       -       -       smtpd<% end %> -<% if postfix_use_submission == 'yes' %>submission inet n       -       -       -       -       smtpd +<% if smtp_listen == 'all' %>smtp      inet  n       -       -       -       -       smtpd +<% else %><%= smtp_listen %>:smtp      inet  n       -       -       -       -       smtpd<% end %> +<% if use_submission == 'yes' %>submission inet n       -       -       -       -       smtpd    -o smtpd_tls_security_level=encrypt    -o smtpd_sasl_auth_enable=yes    -o smtpd_client_restrictions=permit_sasl_authenticated,reject    -o milter_macro_daemon_name=ORIGINATING  <% end %> -<% if postfix_use_smtps == 'yes' %>smtps     inet  n       -       -       -       -       smtpd +<% if use_smtps == 'yes' %>smtps     inet  n       -       -       -       -       smtpd    -o smtpd_tls_wrappermode=yes    -o smtpd_sasl_auth_enable=yes    -o smtpd_client_restrictions=permit_sasl_authenticated,reject @@ -83,7 +83,7 @@ scalemail-backend unix  -       n       n       -       2       pipe  mailman   unix  -       n       n       -       -       pipe    flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py    ${nexthop} ${user} -<% if postfix_use_amavisd == 'yes' %> +<% if use_amavisd == 'yes' %>  amavis unix - - - - 2 smtp          -o smtp_data_done_timeout=1200          -o smtp_send_xforward_command=yes @@ -102,25 +102,25 @@ amavis unix - - - - 2 smtp          -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks          -o smtpd_bind_address=127.0.0.1  <% end %> -<% if postfix_use_dovecot_lda == 'yes' %> +<% if use_dovecot_lda == 'yes' %>  dovecot   unix  -       n       n       -       -       pipe    flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -n -m ${extension}    <% end %> -<% if postfix_use_schleuder == 'yes' %> +<% if use_schleuder == 'yes' %>  schleuder  unix  -       n       n       -       -       pipe    flags=DRhu user=schleuder argv=/usr/bin/schleuder ${user}  <% end %> -<% if postfix_use_sympa == 'yes' %> +<% if use_sympa == 'yes' %>  sympa        unix  -       n       n       -       -       pipe    flags=R user=sympa argv=/usr/lib/sympa/bin/queue ${recipient}  sympabounce  unix  -       n       n       -       -       pipe    flags=R user=sympa argv=/usr/lib/sympa/bin/bouncequeue ${user}  <% end %> -<% if postfix_use_mlmmj == 'yes' %> +<% if use_mlmmj == 'yes' %>  mlmmj   unix  -       n       n       -       -       pipe    flags=DORhu user=mlmmj argv=/usr/bin/mlmmj-recieve -F -L /var/spool/mlmmj/$nexthop/  <%- end -%> -<%- unless postfix_mastercf_tail.to_s.empty? then -%> -<%= postfix_mastercf_tail %> +<%- unless mastercf_tail.to_s.empty? then -%> +<%= mastercf_tail %>  <%- end -%> diff --git a/templates/master.cf.debian-sid.erb b/templates/master.cf.debian-sid.erb index 3450369..d5a5a14 100644 --- a/templates/master.cf.debian-sid.erb +++ b/templates/master.cf.debian-sid.erb @@ -8,19 +8,19 @@  # service type  private unpriv  chroot  wakeup  maxproc command + args  #               (yes)   (yes)   (yes)   (never) (100)  # ========================================================================== -<% if postfix_smtp_listen == 'all' %>smtp      inet  n       -       -       -       -       smtpd -<% else %><%= postfix_smtp_listen %>:smtp      inet  n       -       -       -       -       smtpd<% end %> +<% if smtp_listen == 'all' %>smtp      inet  n       -       -       -       -       smtpd +<% else %><%= smtp_listen %>:smtp      inet  n       -       -       -       -       smtpd<% end %>  #smtp      inet  n       -       -       -       1       postscreen  #smtpd     pass  -       -       -       -       -       smtpd  #dnsblog   unix  -       -       -       -       0       dnsblog  #tlsproxy  unix  -       -       -       -       0       tlsproxy -<% if postfix_use_submission == 'yes' %>submission inet n       -       -       -       -       smtpd +<% if use_submission == 'yes' %>submission inet n       -       -       -       -       smtpd    -o smtpd_tls_security_level=encrypt    -o smtpd_sasl_auth_enable=yes    -o smtpd_client_restrictions=permit_sasl_authenticated,reject    -o milter_macro_daemon_name=ORIGINATING  <% end %> -<% if postfix_use_smtps == 'yes' %>smtps     inet  n       -       -       -       -       smtpd +<% if use_smtps == 'yes' %>smtps     inet  n       -       -       -       -       smtpd    -o smtpd_tls_wrappermode=yes    -o smtpd_sasl_auth_enable=yes    -o smtpd_client_restrictions=permit_sasl_authenticated,reject @@ -114,7 +114,7 @@ mailman   unix  -       n       n       -       -       pipe    flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py    ${nexthop} ${user} -<% if postfix_use_amavisd == 'yes' %> +<% if use_amavisd == 'yes' %>  amavis unix - - - - 2 smtp          -o smtp_data_done_timeout=1200          -o smtp_send_xforward_command=yes @@ -133,25 +133,25 @@ amavis unix - - - - 2 smtp          -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks          -o smtpd_bind_address=127.0.0.1  <% end %> -<% if postfix_use_dovecot_lda == 'yes' %> +<% if use_dovecot_lda == 'yes' %>  dovecot   unix  -       n       n       -       -       pipe    flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}  <% end %> -<% if postfix_use_schleuder == 'yes' %> +<% if use_schleuder == 'yes' %>  schleuder  unix  -       n       n       -       -       pipe    flags=DRhu user=schleuder argv=/usr/bin/schleuder ${user}  <% end %> -<% if postfix_use_sympa == 'yes' %> +<% if use_sympa == 'yes' %>  sympa        unix  -       n       n       -       -       pipe    flags=R user=sympa argv=/usr/lib/sympa/bin/queue ${recipient}  sympabounce  unix  -       n       n       -       -       pipe    flags=R user=sympa argv=/usr/lib/sympa/bin/bouncequeue ${user}  <% end %> -<% if postfix_use_mlmmj == 'yes' %> +<% if use_mlmmj == 'yes' %>  mlmmj   unix  -       n       n       -       -       pipe    flags=DORhu user=mlmmj argv=/usr/bin/mlmmj-recieve -F -L /var/spool/mlmmj/$nexthop/  <%- end -%> -<%- unless postfix_mastercf_tail.to_s.empty? then -%> -<%= postfix_mastercf_tail %> +<%- unless mastercf_tail.to_s.empty? then -%> +<%= mastercf_tail %>  <%- end -%> diff --git a/templates/master.cf.debian-squeeze.erb b/templates/master.cf.debian-squeeze.erb index 50084ef..9ce3264 100644 --- a/templates/master.cf.debian-squeeze.erb +++ b/templates/master.cf.debian-squeeze.erb @@ -8,9 +8,9 @@  # service type  private unpriv  chroot  wakeup  maxproc command + args  #               (yes)   (yes)   (yes)   (never) (100)  # ========================================================================== -<% if postfix_smtp_listen == 'all' %>smtp      inet  n       -       -       -       -       smtpd -<% else %><%= postfix_smtp_listen %>:smtp      inet  n       -       -       -       -       smtpd<% end %> -<% if postfix_use_submission == 'yes' %>submission inet n       -       -       -       -       smtpd +<% if smtp_listen == 'all' %>smtp      inet  n       -       -       -       -       smtpd +<% else %><%= smtp_listen %>:smtp      inet  n       -       -       -       -       smtpd<% end %> +<% if use_submission == 'yes' %>submission inet n       -       -       -       -       smtpd    -o smtpd_enforce_tls=yes    -o smtpd_sasl_auth_enable=yes    -o smtpd_client_restrictions=permit_sasl_authenticated,reject @@ -22,7 +22,7 @@  #  -o smtpd_sasl_auth_enable=yes  #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject  #  -o milter_macro_daemon_name=ORIGINATING -<% if postfix_use_smtps == 'yes' %>smtps     inet  n       -       -       -       -       smtpd +<% if use_smtps == 'yes' %>smtps     inet  n       -       -       -       -       smtpd    -o smtpd_tls_wrappermode=yes    -o smtpd_sasl_auth_enable=yes    -o smtpd_client_restrictions=permit_sasl_authenticated,reject @@ -109,7 +109,7 @@ scalemail-backend unix	-	n	n	-	2	pipe  mailman   unix  -       n       n       -       -       pipe    flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py    ${nexthop} ${user} -<% if postfix_use_amavisd == 'yes' %> +<% if use_amavisd == 'yes' %>  amavis unix - - - - 2 smtp          -o smtp_data_done_timeout=1200          -o smtp_send_xforward_command=yes @@ -128,31 +128,31 @@ amavis unix - - - - 2 smtp          -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks          -o smtpd_bind_address=127.0.0.1  <% end %> -<% if postfix_use_dovecot_lda == 'yes' %> +<% if use_dovecot_lda == 'yes' %>  dovecot   unix  -       n       n       -       -       pipe    flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -n -m ${extension}    <% end %> -<% if postfix_use_schleuder == 'yes' %> +<% if use_schleuder == 'yes' %>  schleuder  unix  -       n       n       -       -       pipe    flags=DRhu user=schleuder argv=/usr/bin/schleuder ${user}  <% end %> -<% if postfix_use_sympa == 'yes' %> +<% if use_sympa == 'yes' %>  sympa        unix  -       n       n       -       -       pipe    flags=R user=sympa argv=/usr/lib/sympa/bin/queue ${recipient}  sympabounce  unix  -       n       n       -       -       pipe    flags=R user=sympa argv=/usr/lib/sympa/bin/bouncequeue ${user}  <% end %> -<% if postfix_use_mlmmj == 'yes' %> +<% if use_mlmmj == 'yes' %>  mlmmj   unix  -       n       n       -       -       pipe    flags=DORhu user=mlmmj argv=/usr/bin/mlmmj-recieve -F -L /var/spool/mlmmj/$nexthop/  <%- end -%> -<% if postfix_use_firma == 'yes' %> +<% if use_firma == 'yes' %>  firma  unix  -       n       n       -       -       pipe    flags=DRhu user=firma argv=/var/lib/firma/firma -p ${user}  firmarequest  unix  -       n       n       -       -       pipe    flags=DRhu user=firma argv=/var/lib/firma/firma -e ${user}  <% end %> -<%- unless postfix_mastercf_tail.to_s.empty? then -%> -<%= postfix_mastercf_tail %> +<%- unless mastercf_tail.to_s.empty? then -%> +<%= mastercf_tail %>  <%- end -%> diff --git a/templates/master.cf.debian-wheezy.erb b/templates/master.cf.debian-wheezy.erb index 14497f2..cc4bbf0 100644 --- a/templates/master.cf.debian-wheezy.erb +++ b/templates/master.cf.debian-wheezy.erb @@ -8,19 +8,19 @@  # service type  private unpriv  chroot  wakeup  maxproc command + args  #               (yes)   (yes)   (yes)   (never) (100)  # ========================================================================== -<% if postfix_smtp_listen == 'all' %>smtp      inet  n       -       -       -       -       smtpd -<% else %><%= postfix_smtp_listen %>:smtp      inet  n       -       -       -       -       smtpd<% end %> +<% if smtp_listen == 'all' %>smtp      inet  n       -       -       -       -       smtpd +<% else %><%= smtp_listen %>:smtp      inet  n       -       -       -       -       smtpd<% end %>  #smtp      inet  n       -       -       -       1       postscreen  #smtpd     pass  -       -       -       -       -       smtpd  #dnsblog   unix  -       -       -       -       0       dnsblog  #tlsproxy  unix  -       -       -       -       0       tlsproxy -<% if postfix_use_submission == 'yes' %>submission inet n       -       -       -       -       smtpd +<% if use_submission == 'yes' %>submission inet n       -       -       -       -       smtpd    -o smtpd_tls_security_level=encrypt    -o smtpd_sasl_auth_enable=yes    -o smtpd_client_restrictions=permit_sasl_authenticated,reject    -o milter_macro_daemon_name=ORIGINATING  <% end %> -<% if postfix_use_smtps == 'yes' %>smtps     inet  n       -       -       -       -       smtpd +<% if use_smtps == 'yes' %>smtps     inet  n       -       -       -       -       smtpd    -o smtpd_tls_wrappermode=yes    -o smtpd_sasl_auth_enable=yes    -o smtpd_client_restrictions=permit_sasl_authenticated,reject @@ -114,7 +114,7 @@ mailman   unix  -       n       n       -       -       pipe    flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py    ${nexthop} ${user} -<% if postfix_use_amavisd == 'yes' %> +<% if use_amavisd == 'yes' %>  amavis unix - - - - 2 smtp          -o smtp_data_done_timeout=1200          -o smtp_send_xforward_command=yes @@ -133,25 +133,25 @@ amavis unix - - - - 2 smtp          -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks          -o smtpd_bind_address=127.0.0.1  <% end %> -<% if postfix_use_dovecot_lda == 'yes' %> +<% if use_dovecot_lda == 'yes' %>  dovecot   unix  -       n       n       -       -       pipe    flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -n -m ${extension}    <% end %> -<% if postfix_use_schleuder == 'yes' %> +<% if use_schleuder == 'yes' %>  schleuder  unix  -       n       n       -       -       pipe    flags=DRhu user=schleuder argv=/usr/bin/schleuder ${user}  <% end %> -<% if postfix_use_sympa == 'yes' %> +<% if use_sympa == 'yes' %>  sympa        unix  -       n       n       -       -       pipe    flags=R user=sympa argv=/usr/lib/sympa/bin/queue ${recipient}  sympabounce  unix  -       n       n       -       -       pipe    flags=R user=sympa argv=/usr/lib/sympa/bin/bouncequeue ${user}  <% end %> -<% if postfix_use_mlmmj == 'yes' %> +<% if use_mlmmj == 'yes' %>  mlmmj   unix  -       n       n       -       -       pipe    flags=DORhu user=mlmmj argv=/usr/bin/mlmmj-recieve -F -L /var/spool/mlmmj/$nexthop/  <%- end -%> -<%- unless postfix_mastercf_tail.to_s.empty? then -%> -<%= postfix_mastercf_tail %> +<%- unless mastercf_tail.to_s.empty? then -%> +<%= mastercf_tail %>  <%- end -%> diff --git a/templates/master.cf.redhat5.erb b/templates/master.cf.redhat5.erb index 1d98d27..01741e4 100644 --- a/templates/master.cf.redhat5.erb +++ b/templates/master.cf.redhat5.erb @@ -7,14 +7,14 @@  # service type  private unpriv  chroot  wakeup  maxproc command + args  #               (yes)   (yes)   (yes)   (never) (100)  # ========================================================================== -<%= postfix_smtp_listen %>:smtp      inet  n       -       n       -       -       smtpd +<%= smtp_listen %>:smtp      inet  n       -       n       -       -       smtpd  #smtp      inet  n       -       n       -       -       smtpd -<% if postfix_use_submission == 'yes' %>submission inet n       -       n       -       -       smtpd +<% if use_submission == 'yes' %>submission inet n       -       n       -       -       smtpd    -o smtpd_enforce_tls=yes    -o smtpd_sasl_auth_enable=yes    -o smtpd_client_restrictions=permit_sasl_authenticated,reject  <% end %> -<% if postfix_use_smtps == 'yes' %>smtps     inet  n       -       n       -       -       smtpd +<% if use_smtps == 'yes' %>smtps     inet  n       -       n       -       -       smtpd    -o smtpd_tls_wrappermode=yes    -o smtpd_sasl_auth_enable=yes    -o smtpd_client_restrictions=permit_sasl_authenticated,reject @@ -82,6 +82,6 @@ ifmail    unix  -       n       n       -       -       pipe  bsmtp     unix  -       n       n       -       -       pipe    flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient -<%- unless postfix_mastercf_tail.to_s.empty? then -%> -<%= postfix_mastercf_tail %> +<%- unless mastercf_tail.to_s.empty? then -%> +<%= mastercf_tail %>  <%- end -%>  | 
