Merge pull request #1223 from erik-wramner/no_smtputf8

Disable SMTPUTF8 as Dovecot can't handle it
This commit is contained in:
Erik Wramner 2019-08-11 21:36:31 +02:00 committed by GitHub
commit b867532bf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 0 deletions

View file

@ -122,6 +122,7 @@ function register_functions() {
_register_setup_function "_setup_postfix_hostname"
_register_setup_function "_setup_dovecot_hostname"
_register_setup_function "_setup_postfix_smtputf8"
_register_setup_function "_setup_postfix_sasl"
_register_setup_function "_setup_postfix_override_configuration"
_register_setup_function "_setup_postfix_sasl_password"
@ -706,6 +707,11 @@ function _setup_postfix_sizelimits() {
postconf -e "mailbox_size_limit = ${DEFAULT_VARS["POSTFIX_MAILBOX_SIZE_LIMIT"]}"
}
function _setup_postfix_smtputf8() {
notify 'inf' "Configuring postfix smtputf8 support (disable)"
postconf -e "smtputf8_enable = no"
}
function _setup_spoof_protection () {
notify 'inf' "Configuring Spoof Protection"
sed -i 's|smtpd_sender_restrictions =|smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch,|' /etc/postfix/main.cf

View file

@ -0,0 +1,2 @@
EHLO mail.localhost
QUIT

View file

@ -405,6 +405,14 @@ function count_processed_changes() {
[ "$status" -ge 0 ]
}
@test "checking smtp: not advertising smtputf8" {
# Dovecot does not support SMTPUTF8, so while we can send we cannot receive
# Better disable SMTPUTF8 support entirely if we can't handle it correctly
run docker exec mail /bin/sh -c "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/smtp-ehlo.txt | grep SMTPUTF8 | wc -l"
assert_success
assert_output 0
}
#
# accounts
#