smtpd: Allow disabling local delivery to act only as a relay
This commit is contained in:
parent
33bfafbdbe
commit
31f9fc449c
2 changed files with 33 additions and 13 deletions
|
@ -1,26 +1,39 @@
|
|||
listen on egress port smtp tls certificate smtpd
|
||||
listen on egress port submission tls-require certificate smtpd
|
||||
listen on egress port smtp tls certificate server
|
||||
listen on egress port submission tls-require certificate server
|
||||
<% if @domains or @virtual -%>
|
||||
|
||||
# alias and virtual maps
|
||||
<% end -%>
|
||||
<% @domains.each do |domain| -%>
|
||||
table aliases.<%= domain %> db:/etc/mail/aliases.<%= domain %>.db
|
||||
<% end -%>
|
||||
<% end if @domains -%>
|
||||
<% @virtual.each do |domain| -%>
|
||||
table virtual.<%= domain %> db:/etc/mail/virtual.<%= domain %>.db
|
||||
<% end if @virtual -%>
|
||||
<% if @local == true -%>
|
||||
|
||||
# accept for localhost and our fqdn
|
||||
accept from any for local alias <aliases> \
|
||||
deliver to mda "<%= @mda %>"
|
||||
<% end -%>
|
||||
<% if @domains -%>
|
||||
|
||||
<% @domains.each do |domain| -%>
|
||||
# accept for primary domains
|
||||
<% @domains.each do |domain| -%>
|
||||
accept from any for domain { "<%= domain %>", "*.<%= domain %>" } \
|
||||
alias <aliases.<%= domain%>> \
|
||||
deliver to mda "<%= @mda %>"
|
||||
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% if @virtual -%>
|
||||
|
||||
# accept for virtual domains
|
||||
<% @virtual.each do |domain| -%>
|
||||
accept from any for domain { "<%= domain %>", "*.<%= domain %>" } \
|
||||
virtual <virtual.<%= domain%>> \
|
||||
deliver to mda "<%= @mda %>"
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
<% end if @virtual -%>
|
||||
# relay for local and authenticated users
|
||||
accept from local for any relay<% if @mail_domain %> as "@<%= @mail_domain %>"<% end %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue