Remove references to hash: databases

With upgrade to Alpine 3.13, support for `hash:` and `btree:` has
beenremoved from Alpine.

As such `hash:<file>` references do not work any more.

[Alpine](https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.13.0)
explains it like this:

> Oracle has changed the license of BDB to AGPL-3.0, making it unsuitable
> to link to packages with GPL-incompatible licenses. Since the old version
> is no longer maintained, the db package is now deprecated. Alpine Linux
> packages are being transitioned to alternatives or, where no alternatives
> exist, removed entirely.

This, unfortunately, will mean that the new version of `docker-postfix`
might not be backwards-compatible, if you're using your own postfix
configuration. Sorry. :-(
This commit is contained in:
Bojan Čekrlić 2021-02-07 23:07:39 +01:00
parent 54578c8e58
commit cf2b2be0d3
3 changed files with 7 additions and 7 deletions

View file

@ -116,9 +116,9 @@ postfix_setup_relayhost() {
else
echo "$RELAYHOST $RELAYHOST_USERNAME:$RELAYHOST_PASSWORD" >> /etc/postfix/sasl_passwd
fi
postmap hash:/etc/postfix/sasl_passwd
postmap lmdb:/etc/postfix/sasl_passwd
do_postconf -e "smtp_sasl_auth_enable=yes"
do_postconf -e "smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd"
do_postconf -e "smtp_sasl_password_maps=lmdb:/etc/postfix/sasl_passwd"
do_postconf -e "smtp_sasl_security_options=noanonymous"
do_postconf -e "smtp_sasl_tls_security_options=noanonymous"
else
@ -222,9 +222,9 @@ postfix_setup_sender_domains() {
echo -e "$i\tOK" >> $allowed_senders
done
echo
postmap $allowed_senders
postmap lmdb:$allowed_senders
do_postconf -e "smtpd_recipient_restrictions=reject_non_fqdn_recipient, reject_unknown_recipient_domain, check_sender_access hash:$allowed_senders, reject"
do_postconf -e "smtpd_recipient_restrictions=reject_non_fqdn_recipient, reject_unknown_recipient_domain, check_sender_access lmdb:$allowed_senders, reject"
# Since we are behind closed doors, let's just permit all relays.
do_postconf -e "smtpd_relay_restrictions=permit"

View file

@ -5,9 +5,9 @@ load /code/scripts/common-run.sh
@test "Make sure that postfix_custom_commands adds lines" {
local POSTFIX_alias_database=hash:/etc/mail/aliases
local POSTFIX_alias_database=lmdb:/etc/mail/aliases
postfix_custom_commands
cat /etc/postfix/main.cf | fgrep -qx "alias_database = hash:/etc/mail/aliases"
cat /etc/postfix/main.cf | fgrep -qx "alias_database = lmdb:/etc/mail/aliases"
postfix check
}

View file

@ -51,7 +51,7 @@ fi
}
@test "spaces in parameters" {
do_postconf -e "smtpd_recipient_restrictions=reject_non_fqdn_recipient, reject_unknown_recipient_domain, check_sender_access hash:example.org, reject"
do_postconf -e "smtpd_recipient_restrictions=reject_non_fqdn_recipient, reject_unknown_recipient_domain, check_sender_access lmdb:example.org, reject"
postfix check
}