smtpd: Added relaying for clients
This commit is contained in:
parent
4f22f69766
commit
20423bd1db
3 changed files with 22 additions and 4 deletions
0
smtpd/files/empty
Normal file
0
smtpd/files/empty
Normal file
|
@ -173,6 +173,25 @@ class smtpd::server(
|
||||||
before => Service["smtpd"],
|
before => Service["smtpd"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file { "/etc/mail/clients":
|
||||||
|
ensure => present,
|
||||||
|
mode => "0644",
|
||||||
|
owner => "root",
|
||||||
|
group => "wheel",
|
||||||
|
source => [
|
||||||
|
"puppet:///files/mail/clients.${::homename}",
|
||||||
|
"puppet:///files/mail/clients",
|
||||||
|
"puppet:///modules/smtpd/empty",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
exec { "makemap -t set clients":
|
||||||
|
refreshonly => true,
|
||||||
|
cwd => "/etc/mail",
|
||||||
|
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||||
|
subscribe => File["/etc/mail/clients"],
|
||||||
|
before => Service["smtpd"],
|
||||||
|
}
|
||||||
|
|
||||||
if $domains {
|
if $domains {
|
||||||
smtpd::aliases { $domains:
|
smtpd::aliases { $domains:
|
||||||
gecos => $gecos,
|
gecos => $gecos,
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
listen on egress port smtp tls certificate server
|
listen on egress port smtp tls certificate server
|
||||||
listen on egress port submission tls-require certificate server auth
|
listen on egress port submission tls-require certificate server auth
|
||||||
<% if @domains or @virtual -%>
|
|
||||||
|
|
||||||
# alias and virtual maps
|
table clients db:/etc/mail/clients.db
|
||||||
<% end -%>
|
|
||||||
<% @domains.each do |domain| -%>
|
<% @domains.each do |domain| -%>
|
||||||
table aliases.<%= domain %> db:/etc/mail/aliases.<%= domain %>.db
|
table aliases.<%= domain %> db:/etc/mail/aliases.<%= domain %>.db
|
||||||
<% end if @domains -%>
|
<% end if @domains -%>
|
||||||
|
@ -35,5 +33,6 @@ accept from any for domain { "<%= domain %>", "*.<%= domain %>" } \
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
# relay for local and authenticated users
|
# relay for remote clients and local users
|
||||||
|
accept from <clients> for any relay<% if @mail_domain %> as "@<%= @mail_domain %>"<% end %>
|
||||||
accept from local for any relay<% if @mail_domain %> as "@<%= @mail_domain %>"<% end %>
|
accept from local for any relay<% if @mail_domain %> as "@<%= @mail_domain %>"<% end %>
|
||||||
|
|
Loading…
Add table
Reference in a new issue