diff --git a/test/config/user1@localhost.localdomain.dovecot.sieve b/test/config/user1@localhost.localdomain.dovecot.sieve deleted file mode 100644 index e024def2..00000000 --- a/test/config/user1@localhost.localdomain.dovecot.sieve +++ /dev/null @@ -1,4 +0,0 @@ -require ["copy", "envelope", "vnd.dovecot.pipe"]; -if envelope :is "from" "sieve.pipe@test.localdomain" { - pipe :copy "pipe_to_tmp"; -} diff --git a/test/config/user2@otherdomain.tld.dovecot.sieve b/test/config/user2@otherdomain.tld.dovecot.sieve new file mode 100644 index 00000000..ba048df9 --- /dev/null +++ b/test/config/user2@otherdomain.tld.dovecot.sieve @@ -0,0 +1,4 @@ +require ["copy", "vnd.dovecot.pipe"]; +if header :contains "subject" "Sieve pipe test message" { + pipe :copy "pipe_to_tmp"; +} diff --git a/test/email-templates/sieve-pipe.txt b/test/email-templates/sieve-pipe.txt index 6a329416..15e56e96 100644 --- a/test/email-templates/sieve-pipe.txt +++ b/test/email-templates/sieve-pipe.txt @@ -1,12 +1,12 @@ HELO mail.external.tld MAIL FROM: user@external.tld -RCPT TO: user1@localhost.localdomain +RCPT TO: user2@otherdomain.tld DATA -From: Sieve-pipe-test -To: Existing Local User +From: Sieve-pipe-test +To: Existing Local User Date: Sat, 22 May 2010 07:43:25 -0400 Subject: Sieve pipe test message This is a test mail to sieve pipe. . -QUIT +QUIT \ No newline at end of file diff --git a/test/tests.bats b/test/tests.bats index 61bd0c33..dfa730c6 100644 --- a/test/tests.bats +++ b/test/tests.bats @@ -271,7 +271,7 @@ load 'test_helper/bats-assert/load' @test "checking smtp: delivers mail to existing account" { run docker exec mail /bin/sh -c "grep 'postfix/lmtp' /var/log/mail/mail.log | grep 'status=sent' | grep ' Saved)' | wc -l" assert_success - assert_output 7 + assert_output 8 } @test "checking smtp: delivers mail to existing alias" { @@ -771,7 +771,7 @@ load 'test_helper/bats-assert/load' assert_failure } -@test "checking sieve: user1 should have pipe 1 email to /tmp/" { +@test "checking sieve: user2 should have piped 1 email to /tmp/" { run docker exec mail /bin/sh -c "ls -A /tmp/pipe-test.out | wc -l" assert_success assert_output 1