mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-12 01:37:07 +00:00
Ensure root user has a mailbox for sendmail -bv delivery report
This commit is contained in:
parent
4113ed8501
commit
6baf4993db
@ -25,11 +25,8 @@ before_install:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
- sudo tests/system-setup/remote-nextcloud-docker.sh
|
- sudo tests/system-setup/remote-nextcloud-docker.sh
|
||||||
- hostname -I || true
|
|
||||||
- hostname -i || true
|
|
||||||
- hostname || true
|
- hostname || true
|
||||||
- hostname --fqdn || true
|
- hostname --fqdn || true
|
||||||
- nslookup box.abc.com || true
|
|
||||||
- getent hosts box.abc.com || true
|
- getent hosts box.abc.com || true
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
@ -10,14 +10,14 @@ ensure_root_user() {
|
|||||||
# ensure there is a local email account for root.
|
# ensure there is a local email account for root.
|
||||||
#
|
#
|
||||||
# on exit, ROOT, ROOT_MAILDROP, and ROOT_DN are set, and if no
|
# on exit, ROOT, ROOT_MAILDROP, and ROOT_DN are set, and if no
|
||||||
# account exists, a new root@$(hostname) is created having a
|
# account exists, a new root@$(hostname --fqdn) is created having a
|
||||||
# random password
|
# random password
|
||||||
#
|
#
|
||||||
if [ ! -z "$ROOT_MAILDROP" ]; then
|
if [ ! -z "$ROOT_MAILDROP" ]; then
|
||||||
# already have it
|
# already have it
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
ROOT="${USER}@$(hostname)"
|
ROOT="${USER}@$(hostname --fqdn || hostname)"
|
||||||
record "[Find user $ROOT]"
|
record "[Find user $ROOT]"
|
||||||
get_attribute "$LDAP_USERS_BASE" "mail=$ROOT" "maildrop"
|
get_attribute "$LDAP_USERS_BASE" "mail=$ROOT" "maildrop"
|
||||||
ROOT_MAILDROP="$ATTR_VALUE"
|
ROOT_MAILDROP="$ATTR_VALUE"
|
||||||
|
@ -189,7 +189,7 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
suite_start "mail-access"
|
suite_start "mail-access" ensure_root_user
|
||||||
|
|
||||||
test_greylisting
|
test_greylisting
|
||||||
test_relay_prohibited
|
test_relay_prohibited
|
||||||
|
@ -67,7 +67,7 @@ test_self_send_receive() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
suite_start "mail-basic"
|
suite_start "mail-basic" ensure_root_user
|
||||||
|
|
||||||
test_trial_send_local
|
test_trial_send_local
|
||||||
test_trial_send_remote
|
test_trial_send_remote
|
||||||
|
@ -79,8 +79,9 @@ before_miab_install() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# install prerequisites
|
# install prerequisites
|
||||||
H2 "QA prerequisites"
|
H2 "QA pre-setup prerequisites"
|
||||||
install_qa_prerequisites || die "Error installing QA prerequisites"
|
install_pre_setup_qa_prerequisites \
|
||||||
|
|| die "Error installing QA prerequisites"
|
||||||
|
|
||||||
# enable the remote Nextcloud setup mod, which tells MiaB-LDAP to use
|
# enable the remote Nextcloud setup mod, which tells MiaB-LDAP to use
|
||||||
# the remote Nextcloud for calendar and contacts instead of the
|
# the remote Nextcloud for calendar and contacts instead of the
|
||||||
@ -197,9 +198,6 @@ after_miab_install() {
|
|||||||
"$PRIMARY_HOSTNAME" \
|
"$PRIMARY_HOSTNAME" \
|
||||||
"$LDAP_NEXTCLOUD_PASSWORD" \
|
"$LDAP_NEXTCLOUD_PASSWORD" \
|
||||||
|| die "docker: error running remote-nextcloud-use-miab.sh"
|
|| die "docker: error running remote-nextcloud-use-miab.sh"
|
||||||
|
|
||||||
# re-add systemd name resolver as a secondary nameserver
|
|
||||||
echo "nameserver 127.0.0.53" >> /etc/resolv.conf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ install_docker() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
install_qa_prerequisites() {
|
install_pre_setup_qa_prerequisites() {
|
||||||
[ -z "$STORAGE_ROOT" ] \
|
[ -z "$STORAGE_ROOT" ] \
|
||||||
&& echo "Error: STORAGE_ROOT not set" 1>&2 \
|
&& echo "Error: STORAGE_ROOT not set" 1>&2 \
|
||||||
&& return 1
|
&& return 1
|
||||||
|
Loading…
Reference in New Issue
Block a user