smtpd: Initial server support
Still missing are TLS and authentication support.
This commit is contained in:
parent
0b7dca59d3
commit
ce5dd6a96d
4 changed files with 142 additions and 8 deletions
|
@ -1,10 +1,6 @@
|
|||
listen on lo0
|
||||
|
||||
<% if @smtpd_relay -%>
|
||||
accept from local for any relay via <%= @smtpd_relay %><% if @mail_domain %> as "@<%= @mail_domain %>"<% end %>
|
||||
<% if @relay -%>
|
||||
accept from local for any relay via <%= @relay %><% if @mail_domain %> as "@<%= @mail_domain %>"<% end %>
|
||||
<% else -%>
|
||||
table aliases db:/etc/mail/aliases.db
|
||||
|
||||
accept from local for local alias <aliases> deliver to mbox
|
||||
accept from local for any relay<% if @mail_domain %> as "@<%= @mail_domain %>"<% end %>
|
||||
<% end -%>
|
||||
|
|
21
smtpd/templates/server.conf.erb
Normal file
21
smtpd/templates/server.conf.erb
Normal file
|
@ -0,0 +1,21 @@
|
|||
listen on egress
|
||||
|
||||
<% @domains.each do |domain| -%>
|
||||
table aliases.<%= domain %> db:/etc/mail/aliases.<%= domain %>.db
|
||||
<% end -%>
|
||||
<% @virtual.each do |domain| -%>
|
||||
table virtual.<%= domain %> db:/etc/mail/virtual.<%= domain %>.db
|
||||
<% end if @virtual -%>
|
||||
|
||||
<% @domains.each do |domain| -%>
|
||||
accept from any for domain <%= domain %> alias <aliases.<%= domain%>> \
|
||||
deliver to mda "<%= @mda %>"
|
||||
<% end -%>
|
||||
<% @virtual.each do |domain| -%>
|
||||
accept from any for domain <%= domain %> virtual <virtual.<%= domain%>> \
|
||||
deliver to mda "<%= @mda %>"
|
||||
<% end if @virtual -%>
|
||||
|
||||
accept from local for local alias <aliases> \
|
||||
deliver to mda "<%= @mda %>"
|
||||
accept from local for any relay<% if @mail_domain %> as "@<%= @mail_domain %>"<% end %>
|
Loading…
Add table
Add a link
Reference in a new issue