Skip to content

Commit

Permalink
OpenDKIM support
Browse files Browse the repository at this point in the history
  • Loading branch information
jared-gs committed Sep 23, 2020
1 parent 5da3b6f commit 9a040a4
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
15 changes: 15 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
$newaliases_path = '/usr/bin/newaliases.postfix'
$sendmail_path = '/usr/sbin/sendmail.postfix'
$postmap = '/usr/sbin/postmap'
$opendkim = false
$opendkim_milter_default_action = 'accept'
$opendkim_milter_protocol = '6'
$opendkim_smtpd_milters = 'local:opendkim/opendkim.sock'
$opendkim_non_smtpd_milters = 'local:opendkim/opendkim.sock'
}
'Debian': {
$postfix_version = undef
Expand Down Expand Up @@ -65,6 +70,11 @@
$newaliases_path = '/usr/bin/newaliases.postfix'
$sendmail_path = '/usr/sbin/sendmail.postfix'
$postmap = '/usr/sbin/postmap'
$opendkim = false
$opendkim_milter_default_action = 'accept'
$opendkim_milter_protocol = '6'
$opendkim_smtpd_milters = 'local:opendkim/opendkim.sock'
$opendkim_non_smtpd_milters = 'local:opendkim/opendkim.sock'
}
'FreeBSD': {
$postfix_version = undef
Expand Down Expand Up @@ -92,6 +102,11 @@
$newaliases_path = '/usr/local/bin/newaliases'
$sendmail_path = '/usr/local/sbin/sendmail'
$postmap = '/usr/local/sbin/postmap'
$opendkim = false
$opendkim_milter_default_action = 'accept'
$opendkim_milter_protocol = '6'
$opendkim_smtpd_milters = 'local:opendkim/opendkim.sock'
$opendkim_non_smtpd_milters = 'local:opendkim/opendkim.sock'
}
default: {
fail("Unsupported OS family ${::osfamily}")
Expand Down
6 changes: 6 additions & 0 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@
$postgrey = false,
$postgrey_policy_service = undef,
$clamav = false,
# OpenDKIM
$opendkim = $::postfix::params::opendkim,
$opendkim_milter_default_action = $::postfix::params::opendkim_milter_default_action
$opendkim_milter_protocol = $::postfix::params::opendkim_milter_protocol
$opendkim_smtpd_milters = $::postfix::params::opendkim_smtpd_milters
$opendkim_non_smtpd_milters = $::postfix::params::opendkim_non_smtpd_milters
# Parameters
$postfix_version = $::postfix::params::postfix_version,
$command_directory = $::postfix::params::command_directory,
Expand Down
9 changes: 9 additions & 0 deletions templates/main.cf-el8.erb
Original file line number Diff line number Diff line change
Expand Up @@ -1022,3 +1022,12 @@ postscreen_dnsbl_action = <%= @postscreen_dnsbl_action %>
<% end -%>

<% end -%>

<%- if @opendkim -%>
# Milter configuration
# OpenDKIM
milter_default_action = accept <%= @opendkim_milter_default_action %>
milter_protocol = 6 <%= @opendkim_milter_protocol %>
smtpd_milters = local:opendkim/opendkim.sock <%= @opendkim_smtpd_milters %>
non_smtpd_milters = local:opendkim/opendkim.sock <%= @opendkim_non_smtpd_milters %>
<%- end -%>
9 changes: 9 additions & 0 deletions templates/main.cf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -970,3 +970,12 @@ postscreen_dnsbl_action = <%= @postscreen_dnsbl_action %>
<% end -%>

<% end -%>

<%- if @opendkim -%>
# Milter configuration
# OpenDKIM
milter_default_action = accept <%= @opendkim_milter_default_action %>
milter_protocol = 6 <%= @opendkim_milter_protocol %>
smtpd_milters = local:opendkim/opendkim.sock <%= @opendkim_smtpd_milters %>
non_smtpd_milters = local:opendkim/opendkim.sock <%= @opendkim_non_smtpd_milters %>
<%- end -%>

0 comments on commit 9a040a4

Please sign in to comment.