mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-05 15:57:23 +01:00
Ensure root user has a mailbox for sendmail -bv delivery report
This commit is contained in:
@@ -10,14 +10,14 @@ ensure_root_user() {
|
||||
# ensure there is a local email account for root.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
if [ ! -z "$ROOT_MAILDROP" ]; then
|
||||
# already have it
|
||||
return
|
||||
fi
|
||||
ROOT="${USER}@$(hostname)"
|
||||
ROOT="${USER}@$(hostname --fqdn || hostname)"
|
||||
record "[Find user $ROOT]"
|
||||
get_attribute "$LDAP_USERS_BASE" "mail=$ROOT" "maildrop"
|
||||
ROOT_MAILDROP="$ATTR_VALUE"
|
||||
|
||||
@@ -189,7 +189,7 @@ EOF
|
||||
}
|
||||
|
||||
|
||||
suite_start "mail-access"
|
||||
suite_start "mail-access" ensure_root_user
|
||||
|
||||
test_greylisting
|
||||
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_remote
|
||||
|
||||
Reference in New Issue
Block a user