Browse Source

Modified config to conform to alemor policy

feature/startup-from-labels
Fernando Alegre 5 years ago
parent
commit
1765d304eb
  1. 14
      src/mailsrv/assets/bin/mkvirt
  2. 6
      src/mailsrv/assets/postfix/main.cf
  3. 2
      src/mailsrv/assets/postfix/master.cf

14
src/mailsrv/assets/bin/mkvirt

@ -15,17 +15,7 @@ postmap /etc/postfix/users
### Aliases ###
# make self-referential users list
# this is needed for the reject_sender_login_mismatch restriction to work,
# otherwise users cannot send emails as their own address
mkdir -p /vol/db/aliases_out.d
cd /vol/db/aliases_out.d
echo "# This file is autogenerated by mkvirt. Don't edit it manually." > self.list
cat /vol/db/users | cut -d':' -f1 | perl -pe 's/(.*)/\1\@brbytes.org \1\n\1\@mail.brbytes.org \1/' >> self.list
# copy aliases to postifx config
cd /etc/postfix
cat /vol/db/aliases_out.d/*.list > aliases_out
postmap aliases_out
cat /vol/db/aliases_in.d/*.list > aliases_in
postmap aliases_in
cat /vol/db/aliases.d/*.list > aliases
postmap aliases

6
src/mailsrv/assets/postfix/main.cf

@ -17,18 +17,18 @@ compatibility_level = 2
### Domains ###
# primary name of server
myhostname = mail.brbytes.org
myhostname = mail.alemor.org
myorigin = $mydomain
# domains to consider primary (local) endpoints
mydestination = $myhostname, $mydomain, localhost.localdomain, localhost
# domains to consider secondary (virtual) endpoints
#virtual_alias_domains = info.brbytes.org
virtual_alias_domains = epic.alemor.org, mail.alemor.org, home.alemor.org, alegre.alemor.org, daniel.alemor.org, fernando.alemor.org, juana.alemor.org, mario.alemor.org, moreno.alemor.org, mbox.alemor.org, pirealps.org
### Users ###
# get list of valid users from here instead of /etc/passwd
local_recipient_maps = hash:/etc/postfix/users
# get list of user aliases from this file
virtual_alias_maps = hash:/etc/postfix/aliases_in
virtual_alias_maps = hash:/etc/postfix/aliases
# Address tag delimiter. If an email is sent to ${user}${delimiter}*,
# the email is sent to ${user} if that address is not already explicitly defined.
recipient_delimiter = -

2
src/mailsrv/assets/postfix/master.cf

@ -16,8 +16,6 @@ submission inet n - y - - smtpd
-o smtpd_sasl_security_options=noanonymous
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o smtpd_recipient_restrictions=reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject
-o smtpd_sender_login_maps=hash:/etc/postfix/aliases_out
-o smtpd_sender_restrictions=reject_sender_login_mismatch
# Local services
# ==========================================================================

Loading…
Cancel
Save