Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
- name: Prepare environment
run: grep -v '^#' .github/linters/super-linter.env >> "$GITHUB_ENV"
- name: Super-Linter
uses: super-linter/super-linter/slim@d5b0a2ab116623730dd094f15ddc1b6b25bf7b99 # v8.3.2
uses: super-linter/super-linter/slim@61abc07d755095a68f4987d1c2c3d1d64408f1f9 # v8.5.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion target/web/rootfs/usr/local/lib/init_database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ roundcube_init() {
cd /opt/roundcube
PWD=$(pwd)

bin/initdb.sh --dir="$PWD/SQL" || bin/updatedb.sh --dir="$PWD/SQL" --package=roundcube || echo "Failed to initialize databse. Please run $PWD/bin/initdb.sh manually."
bin/initdb.sh --dir="$PWD/SQL" || bin/updatedb.sh --dir="$PWD/SQL" --package=roundcube || echo "Failed to initialize database. Please run $PWD/bin/initdb.sh manually."
rm -f /opt/roundcube/logs/errors.log
}

Expand Down
30 changes: 15 additions & 15 deletions test/bats/integration/040_mta.bats
Original file line number Diff line number Diff line change
Expand Up @@ -59,42 +59,42 @@ setup() {
[ "$status" -eq 0 ]
}

@test "authentification on smtp with disabled account should fail (submission service)" {
@test "authentication on smtp with disabled account should fail (submission service)" {
run swaks -s "${SMTP_SUBMISSION_HOST}" --port "${SMTP_SUBMISSION_PORT}" --to admin@example.com --from disabled@example.com -a -au disabled@example.com -ap test1234 -tls --body "$BATS_TEST_DESCRIPTION"
[ "$status" -eq 28 ]
}

@test "authentification on smtp with disabled and send only account should fail (submission service)" {
@test "authentication on smtp with disabled and send only account should fail (submission service)" {
run swaks -s "${SMTP_SUBMISSION_HOST}" --port "${SMTP_SUBMISSION_PORT}" --to admin@example.com --from disabledsendonly@example.com -a -au disabled@example.com -ap test1234 -tls --body "$BATS_TEST_DESCRIPTION"
[ "$status" -eq 28 ]
}

@test "send mail to mta with smtp authentification (submission service)" {
@test "send mail to mta with smtp authentication (submission service)" {
run swaks -s "${SMTP_SUBMISSION_HOST}" --port "${SMTP_SUBMISSION_PORT}" --to admin@example.com --from admin@example.com -a -au admin@example.com -ap changeme -tls --body "$BATS_TEST_DESCRIPTION"
[ "$status" -eq 0 ]
}

@test "send mail to mta with smtp authentification, with address extension (submission service)" {
@test "send mail to mta with smtp authentication, with address extension (submission service)" {
run swaks -s "${SMTP_SUBMISSION_HOST}" --port "${SMTP_SUBMISSION_PORT}" --to admin@example.com --from admin-extension@example.com -a -au admin@example.com -ap changeme -tls --body "$BATS_TEST_DESCRIPTION"
[ "$status" -eq 0 ]
}

@test "send mail to mta from sendonly account with smtp authentification (submission service)" {
@test "send mail to mta from sendonly account with smtp authentication (submission service)" {
run swaks -s "${SMTP_SUBMISSION_HOST}" --port "${SMTP_SUBMISSION_PORT}" --to admin@example.com --from sendonly@example.com -a -au sendonly@example.com -ap test1234 -tls --body "$BATS_TEST_DESCRIPTION"
[ "$status" -eq 0 ]
}

@test "send mail to mta with smtp authentification, with unknown sender address should fail (submission service)" {
@test "send mail to mta with smtp authentication, with unknown sender address should fail (submission service)" {
run swaks -s "${SMTP_SUBMISSION_HOST}" --port "${SMTP_SUBMISSION_PORT}" --to admin@example.com --from unknown@example.org -a -au admin@example.com -ap changeme -tls --body "$BATS_TEST_DESCRIPTION"
[ "$status" -eq 24 ]
}

@test "send mail to mta with smtp authentification, with alias sender address (submission service)" {
@test "send mail to mta with smtp authentication, with alias sender address (submission service)" {
run swaks -s "${SMTP_SUBMISSION_HOST}" --port "${SMTP_SUBMISSION_PORT}" --to admin@example.com --from foo@example.org -a -au admin@example.com -ap changeme -tls --body "$BATS_TEST_DESCRIPTION"
[ "$status" -eq 0 ]
}

@test "send mail to mta without authentification (submission service)" {
@test "send mail to mta without authentication (submission service)" {
run swaks -s "${SMTP_SUBMISSION_HOST}" --port "${SMTP_SUBMISSION_PORT}" --to admin@example.com --from disabled@example.com -tls --body "$BATS_TEST_DESCRIPTION"
[ "$status" -eq 24 ]
}
Expand All @@ -104,7 +104,7 @@ setup() {
[ "$status" -eq 28 ]
}

@test "sending mail to mta with smtp authentification on port 25 should fail" {
@test "sending mail to mta with smtp authentication on port 25 should fail" {
run swaks -s "${SMTP_HOST}" --port "${SMTP_PORT}" --to admin@example.com --from admin@example.com -a -au admin@example.com -ap changeme -tls --body "$BATS_TEST_DESCRIPTION"
[ "$status" != 0 ]
}
Expand Down Expand Up @@ -134,18 +134,18 @@ setup() {
[ "$status" -eq 0 ]
}

@test "mail to mta with smtp authentification (submission service) is stored" {
run grep -r "send mail to mta with smtp authentification (submission service)" /srv/vmail/example.com/admin/Maildir/
@test "mail to mta with smtp authentication (submission service) is stored" {
run grep -r "send mail to mta with smtp authentication (submission service)" /srv/vmail/example.com/admin/Maildir/
[ "$status" -eq 0 ]
}

@test "mail to mta with smtp authentification, with address extension (submission service) is stored" {
run grep -r "send mail to mta with smtp authentification, with address extension (submission service)" /srv/vmail/example.com/admin/Maildir/
@test "mail to mta with smtp authentication, with address extension (submission service) is stored" {
run grep -r "send mail to mta with smtp authentication, with address extension (submission service)" /srv/vmail/example.com/admin/Maildir/
[ "$status" -eq 0 ]
}

@test "mail to mta from sendonly account with smtp authentification (submission service) is stored" {
run grep -r "send mail to mta from sendonly account with smtp authentification (submission service)" /srv/vmail/example.com/admin/Maildir/
@test "mail to mta from sendonly account with smtp authentication (submission service) is stored" {
run grep -r "send mail to mta from sendonly account with smtp authentication (submission service)" /srv/vmail/example.com/admin/Maildir/
[ "$status" -eq 0 ]
}

Expand Down
6 changes: 3 additions & 3 deletions test/bats/integration/080_relayhost.bats
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ setup() {
[ "$status" -eq 0 ]
}

@test "send mail to mta with smtp authentification, external recipient" {
@test "send mail to mta with smtp authentication, external recipient" {
if [ "${RELAYHOST}" = "false" ]; then
echo '# Relayhost is disabled, skipping test' >&3
skip
Expand All @@ -38,6 +38,6 @@ setup() {

RESULT=$(curl -s "http://mailpit:8025/api/v1/messages" | jq -cr ".messages[0].Snippet" | tr -d '[:space:]')

# send mail to mta with smtp authentification, external recipient
[ "$RESULT" = "sendmailtomtawithsmtpauthentification,externalrecipient" ]
# send mail to mta with smtp authentication, external recipient
[ "$RESULT" = "sendmailtomtawithsmtpauthentication,externalrecipient" ]
}