diff --git a/e2e-tests/common.sh b/e2e-tests/common.sh index 2ec7c30..113b0aa 100644 --- a/e2e-tests/common.sh +++ b/e2e-tests/common.sh @@ -12,8 +12,14 @@ delete_unix_user() { # name # send a mail and wait for delivery send_test_mail() { # email_address + USER=$(echo $1 | cut -f 1 -d '@') + # create an empty mailbox file + touch /var/mail/$USER + chown $USER:mail /var/mail/$USER + chmod 600 /var/mail/$USER + echo "test mail" | sendmail $1 - inotifywait -qq -t 3 -e close_write /var/mail + inotifywait -qq -t 3 -e close_write /var/mail/$USER } # test header