sendmail: Set milter macros for spamass-milter only if it's enabled
This commit is contained in:
parent
2062288684
commit
8227dd7810
1 changed files with 4 additions and 2 deletions
|
@ -58,8 +58,8 @@ FEATURE(`blacklist_recipients')dnl
|
||||||
EXPOSED_USER(`root')dnl
|
EXPOSED_USER(`root')dnl
|
||||||
dnl #
|
dnl #
|
||||||
<% if @sendmail_milter -%>
|
<% if @sendmail_milter -%>
|
||||||
<% milters = @sendmail_milter.collect { |name,opts| name }.join(",") -%>
|
<% milters = @sendmail_milter.collect { |name,opts| name } -%>
|
||||||
DAEMON_OPTIONS(`Port=smtp, Name=MTA, M=A, InputMailFilters=<%= milters %>')dnl
|
DAEMON_OPTIONS(`Port=smtp, Name=MTA, M=A, InputMailFilters=<%= milters.join(",") %>')dnl
|
||||||
<% else -%>
|
<% else -%>
|
||||||
DAEMON_OPTIONS(`Port=smtp, Name=MTA, M=A')dnl
|
DAEMON_OPTIONS(`Port=smtp, Name=MTA, M=A')dnl
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
@ -82,7 +82,9 @@ define(`confDOMAIN_NAME', `<%= @mail_domain %>')dnl
|
||||||
define(`confDONT_BLAME_SENDMAIL', `GroupWritableDirpathSafe,GroupWritableIncludeFileSafe,GroupWritableForwardFile,ForwardFileInGroupWritableDirPath')dnl
|
define(`confDONT_BLAME_SENDMAIL', `GroupWritableDirpathSafe,GroupWritableIncludeFileSafe,GroupWritableForwardFile,ForwardFileInGroupWritableDirPath')dnl
|
||||||
dnl #
|
dnl #
|
||||||
<% if @sendmail_milter -%>
|
<% if @sendmail_milter -%>
|
||||||
|
<% if milters.include?("spamass") -%>
|
||||||
define(`confMILTER_MACROS_ENVRCPT', `b, r, v, Z, 'confMILTER_MACROS_ENVRCPT)dnl
|
define(`confMILTER_MACROS_ENVRCPT', `b, r, v, Z, 'confMILTER_MACROS_ENVRCPT)dnl
|
||||||
|
<% end -%>
|
||||||
<% @sendmail_milter.each do |name,opts| -%>
|
<% @sendmail_milter.each do |name,opts| -%>
|
||||||
MAIL_FILTER<%= "(`%s', `%s')" % [name, opts] %>
|
MAIL_FILTER<%= "(`%s', `%s')" % [name, opts] %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
Loading…
Add table
Reference in a new issue