From 26416700104d10675354782995d5b32bab1b21b5 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Tue, 20 Jan 2009 11:49:03 +0000 Subject: [PATCH] updating tests git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@531 a1433add-5e2c-0410-b055-b7f2511e0802 --- .../tests/teodor-smtp-envelope-headers.txt | 21 ++++++++++++++ VIRTUAL_VACATION/tests/test.sh | 28 ++++++++++++++----- 2 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 VIRTUAL_VACATION/tests/teodor-smtp-envelope-headers.txt diff --git a/VIRTUAL_VACATION/tests/teodor-smtp-envelope-headers.txt b/VIRTUAL_VACATION/tests/teodor-smtp-envelope-headers.txt new file mode 100644 index 00000000..e4633bbf --- /dev/null +++ b/VIRTUAL_VACATION/tests/teodor-smtp-envelope-headers.txt @@ -0,0 +1,21 @@ +X-Original-To: david@example.org +Delivered-To: david@example.org +X-Virus-Scanned: amavisd-new at mx.ro +From: "Teodor Iacob" +To: +Subject: estsgf +Date: Mon, 19 Jan 2009 14:49:17 +0200 +X-Mailer: Microsoft Office Outlook 11 +X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 +Thread-Index: Acl6NFZyC+AImZ1WQSS0cPUO/Y2FqA== +X-BRO-MailScanner-Information: Please contact the ISP for more information +X-BRO-MailScanner-ID: n0JCoUwB014357 +X-BRO-MailScanner: Found to be clean +X-MailScanner-From: david@example.org +X-BRO-MailScanner-Watermark: 1232974231.00027@11VRmWFJ18WRflEdvrILlQ + +dsgsgfsgfg + +-- + +Teodor Iacob diff --git a/VIRTUAL_VACATION/tests/test.sh b/VIRTUAL_VACATION/tests/test.sh index b324c519..ca61d5c8 100644 --- a/VIRTUAL_VACATION/tests/test.sh +++ b/VIRTUAL_VACATION/tests/test.sh @@ -14,6 +14,7 @@ export PGUSER=dg export PGDATABASE=postfix export PGHOST=pgsqlserver + echo "DELETE FROM vacation WHERE email = 'david@example.org'" | psql # First time around, there should be no vacation record for david@example.org, so these should all not cause mail to be sent. @@ -21,15 +22,29 @@ echo "DELETE FROM vacation WHERE email = 'david@example.org'" | psql echo echo "NONE OF THESE SHOULD RESULT IN MAIL BEING SENT" echo -cat mailing-list.txt | perl ../vacation.pl -t yes -f fw-general-return-20540-david=example.org@lists.zend.com -- david\#example.org@autoreply.example.org -cat test-email.txt | perl ../vacation.pl -t yes -f david1@example.org -- david\#example.org@autoreply.example.org -cat spam.txt | perl ../vacation.pl -t yes -f mary@ccr.org -- david\#example.org@autoreply.example.org -cat asterisk-email.txt | perl ../vacation.pl -t yes -f www-data@palepurple.net -- david\#example.org@autoreply.example.org -cat facebook.txt | perl ../vacation.pl -t yes -f notification+meynbxsa@facebookmail.com -- david\#example.org@autoreply.example.org -cat mail-myself.txt | perl ../vacation.pl -t yes -f david@example.org -- david\#example.org@autoreply.example.org + +#echo "On: mailing-list.txt:" +# cat mailing-list.txt | perl ../vacation.pl -t yes -f fw-general-return-20540-david=example.org@lists.zend.com -- david\#example.org@autoreply.example.org +echo "On: test-email.txt:" +cat test-email.txt | perl ../vacation.pl -t yes -f david1@example.org -- david\#example.org@autoreply.example.org +echo "On: spam.txt:" +cat spam.txt | perl ../vacation.pl -t yes -f mary@ccr.org -- david\#example.org@autoreply.example.org +echo "On: asterisk-email.txt:" +cat asterisk-email.txt | perl ../vacation.pl -t yes -f www-data@palepurple.net -- david\#example.org@autoreply.example.org +# do not reply to facebook +echo "On: facebook.txt:" +cat facebook.txt | perl ../vacation.pl -t yes -f notification+meynbxsa@facebookmail.com -- david\#example.org@autoreply.example.org +# do not send yourself a vacation notice. +echo "On: mail-myself.txt:" +cat mail-myself.txt | perl ../vacation.pl -t yes -f david@example.org -- david\#example.org@autoreply.example.org +# do not send yourself a vacation notice. +echo "On: teodor-smtp-envelope-headers.txt:" +cat teodor-smtp-envelope-headers.txt | perl ../vacation.pl -t yes -f david@example.org -- david\#example.org@autoreply.example.org + echo "INSERT INTO vacation (email, subject, body, created, active, domain) VALUES ('david@example.org', 'I am on holiday', 'Yeah, that is right', NOW(), true, 'example.org')" | psql + echo echo "VACATION TURNED ON " echo @@ -46,4 +61,3 @@ cat facebook.txt | perl ../vacation.pl -t yes -f notification+meynbxsa@facebookm echo " * Mailing myself - should not send vacation message" cat mail-myself.txt | perl ../vacation.pl -t yes -f david@example.org -- david\#example.org@autoreply.example.org echo -echo