diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-11-18 17:10:25 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-11-18 17:10:25 +0000 |
commit | 6e4589c1391149a1c8ac588352b61307c3ac06a5 (patch) | |
tree | 07fe07b7c13f859d6d333616b060d2210c5463d9 /sieve/testsuite | |
parent | 38c6e389a97d49f9abd06649f1136b4406b20fe4 (diff) | |
download | mailutils-6e4589c1391149a1c8ac588352b61307c3ac06a5.tar.gz mailutils-6e4589c1391149a1c8ac588352b61307c3ac06a5.tar.bz2 |
added Reject and Redirect
Diffstat (limited to 'sieve/testsuite')
-rw-r--r-- | sieve/testsuite/Makefile.am | 2 | ||||
-rw-r--r-- | sieve/testsuite/Redirect | 88 | ||||
-rw-r--r-- | sieve/testsuite/Reject | 199 |
3 files changed, 289 insertions, 0 deletions
diff --git a/sieve/testsuite/Makefile.am b/sieve/testsuite/Makefile.am index 001107db4..71f4436b9 100644 --- a/sieve/testsuite/Makefile.am +++ b/sieve/testsuite/Makefile.am @@ -7,6 +7,7 @@ DEJATOOL = sieve RUNTESTFLAGS = CLEANFILES = *.log test_dirs = lib sieve scripts +EXTRA_DIST = Reject Redirect dist-hook: here=`cd $(top_builddir)/$(subdir) && pwd`; \ @@ -37,6 +38,7 @@ site.exp: Makefile remote.exp @echo '# edit the last section' >> $@-t @echo 'set tool $(DEJATOOL)' >> $@-t @echo "set top_srcdir `cd $(top_srcdir); pwd`" >> $@-t + @echo "set top_builddir `cd $(top_builddir); pwd`" >> $@-t @echo "set srcdir `cd $(srcdir); pwd`" >> $@-t @echo 'set objdir' `pwd` >> $@-t @echo 'set host_alias "$(host_alias)"' >> $@-t diff --git a/sieve/testsuite/Redirect b/sieve/testsuite/Redirect new file mode 100644 index 000000000..a0973b3fa --- /dev/null +++ b/sieve/testsuite/Redirect @@ -0,0 +1,88 @@ +# This file is part of Mailutils testsuite. +# Copyright (C) 2002, Free Software Foundation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +TEST redirect.sv +PATTERN BEGIN +REDIRECT on msg uid 1: to gray@gnu.org +REDIRECT on msg uid 2: to gray@gnu.org +REDIRECT on msg uid 3: to gray@gnu.org +PATTERN END + +FILE BEGIN +ENVELOPE FROM: coyote@desert.example.org +ENVELOPE TO: <gray@gnu.org> +-re + 0: X-Authentication-Warning: [^ \t]+ set sender using -f flag + 1: X-Sender: foobar@nonexistent.net + 2: From: coyote@desert.example.org + 3: To: roadrunner@acme.example.com + 4: Subject: I have a present for you + 5: X-Caffeine: C8H10N4O2 + 6: + 7: Look, I'm sorry about the whole anvil thing, and I really + 8: didn't mean to try and drop it on you from the top of the + 9: cliff. I want to try to make it up to you. I've got some + 10: great birdseed over here at my place--top of the line + 11: stuff--and if you come by, I'll have it all wrapped up + 12: for you. I'm really sorry for all the problems I've caused + 13: for you over the years, but I know we can work this out. + 14: + 15: -- + 16: Wile E. Coyote "Super Genius" coyote@desert.example.org + 17: +END OF MESSAGE +ENVELOPE FROM: b1ff@de.res.example.com +ENVELOPE TO: <gray@gnu.org> +-re + 0: X-Authentication-Warning: [^ \t]+ set sender using -f flag + 1: X-Sender: foobar@nonexistent.net + 2: From: youcouldberich!@reply-by-postal-mail.invalid + 3: To: rube@landru.example.edu + 4: Subject: $$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$ + 5: Date: TBD + 6: + 7: YOU MAY HAVE ALREADY WON TEN MILLION DOLLARS, BUT I DOUBT + 8: IT! SO JUST POST THIS TO SIX HUNDRED NEWSGROUPS! IT WILL + 9: GUARANTEE THAT YOU GET AT LEAST FIVE RESPONSES WITH MONEY! + 10: MONEY! MONEY! COLD HARD CASH! YOU WILL RECEIVE OVER + 11: $20,000 IN LESS THAN TWO MONTHS! AND IT'S LEGAL!!!!!!!!! + 12: !!!!!!!!!!!!!!!!!!111111111!!!!!!!11111111111!!1 JUST + 13: SEND $5 IN SMALL, UNMARKED BILLS TO THE ADDRESSES BELOW! + 14: +END OF MESSAGE +ENVELOPE FROM: bar@dontmailme.org +ENVELOPE TO: <gray@gnu.org> +-re + 0: X-Authentication-Warning: [^ \t]+ set sender using -f flag + 1: X-Sender: foobar@nonexistent.net + 2: Received: (from bar@dontmailme.org) + 3: by dontmailme.org id fERKR9N16790 + 4: for foobar@nonexistent.net; Fri, 28 Dec 2001 22:18:08 +0200 + 5: Date: Fri, 28 Dec 2001 23:28:08 +0200 + 6: From: Bar <bar@dontmailme.org> + 7: To: Foo Bar <foobar@nonexistent.net> + 8: Message-Id: <200112232808.fERKR9N16790@dontmailme.org> + 9: Subject: Coffee + 10: + 11: How about some coffee? + 12: +END OF MESSAGE +FILE END +TEST END + +# End of Redirect
\ No newline at end of file diff --git a/sieve/testsuite/Reject b/sieve/testsuite/Reject new file mode 100644 index 000000000..8a13c207b --- /dev/null +++ b/sieve/testsuite/Reject @@ -0,0 +1,199 @@ +# This file is part of Mailutils testsuite. +# Copyright (C) 2002, Free Software Foundation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +TEST reject.sv +PATTERN BEGIN +REJECT on msg uid 1 +REJECT on msg uid 2 +REJECT on msg uid 3 +PATTERN END + +FILE BEGIN +ENVELOPE FROM: MAILER-DAEMON@Mirddin.farlep.net +ENVELOPE TO: <coyote@desert.example.org> + 0: To: <coyote@desert.example.org> +-re + 1: X-Authentication-Warning: [^ \t]+ set sender using -f flag +-re + 2: Content-Type: multipart/mixed; boundary="[0-9:=-]+" + 3: MIME-Version: 1.0 + 4: +-re + 5: [0-9:=-]+ + 6: +-re + 7: The original message was received at [A-Z][a-z][a-z], [A-Z][a-z][a-z] [ 0-3][0-9] [ 0-2][0-9]:[0-6][0-9]:[0-6][0-9] [0-9][0-9][0-9][0-9] [a-zA-Z0-9]* from coyote@desert.example.org. + 8: Message was refused by recipient's mail filtering program. + 9: Reason given was as follows: + 10: + 11: I don't want to read these messages. + 12: + 13: Regards. + 14: . + 15: +-re + 16: [0-9:=-]+ + 17: Content-Type: message/delivery-status + 18: + 19: Reporting-UA: sieve; GNU Mailutils 0.1.2 +-re + 20: Arrival-Date: [A-Z][a-z][a-z], [A-Z][a-z][a-z] [ 0-3][0-9] [ 0-2][0-9]:[0-6][0-9]:[0-6][0-9] [0-9][0-9][0-9][0-9] [a-zA-Z0-9]* + 21: Final-Recipient: RFC822; foobar@nonexistent.net + 22: Action: deleted + 23: Disposition: automatic-action/MDN-sent-automatically;deleted +-re + 24: Last-Attempt-Date: [A-Z][a-z][a-z], [A-Z][a-z][a-z] [ 0-3][0-9] [ 0-2][0-9]:[0-6][0-9]:[0-6][0-9] [0-9][0-9][0-9][0-9] [a-zA-Z0-9]* + 25: +-re + 26: [0-9:=-]+ + 27: Content-Type: message/rfc822 + 28: + 29: From: coyote@desert.example.org + 30: To: roadrunner@acme.example.com + 31: Subject: I have a present for you + 32: X-Caffeine: C8H10N4O2 + 33: + 34: Look, I'm sorry about the whole anvil thing, and I really + 35: didn't mean to try and drop it on you from the top of the + 36: cliff. I want to try to make it up to you. I've got some + 37: great birdseed over here at my place--top of the line + 38: stuff--and if you come by, I'll have it all wrapped up + 39: for you. I'm really sorry for all the problems I've caused + 40: for you over the years, but I know we can work this out. + 41: + 42: -- + 43: Wile E. Coyote "Super Genius" coyote@desert.example.org + 44: +-re + 45: [0-9:=-]+ + 46: +END OF MESSAGE +ENVELOPE FROM: MAILER-DAEMON@Mirddin.farlep.net +ENVELOPE TO: <b1ff@de.res.example.com> + 0: To: <b1ff@de.res.example.com> +-re + 1: X-Authentication-Warning: [^ \t]+ set sender using -f flag +-re + 2: Content-Type: multipart/mixed; boundary="[0-9:=-]+" + 3: MIME-Version: 1.0 + 4: +-re + 5: [0-9:=-]+ + 6: +-re + 7: The original message was received at [A-Z][a-z][a-z], [A-Z][a-z][a-z] [ 0-3][0-9] [ 0-2][0-9]:[0-6][0-9]:[0-6][0-9] [0-9][0-9][0-9][0-9] [a-zA-Z0-9]* from b1ff@de.res.example.com. + 8: Message was refused by recipient's mail filtering program. + 9: Reason given was as follows: + 10: + 11: I don't want to read these messages. + 12: + 13: Regards. + 14: . + 15: +-re + 16: [0-9:=-]+ + 17: Content-Type: message/delivery-status + 18: + 19: Reporting-UA: sieve; GNU Mailutils 0.1.2 +-re + 20: Arrival-Date: [A-Z][a-z][a-z], [A-Z][a-z][a-z] [ 0-3][0-9] [ 0-2][0-9]:[0-6][0-9]:[0-6][0-9] [0-9][0-9][0-9][0-9] [a-zA-Z0-9]* + 21: Final-Recipient: RFC822; foobar@nonexistent.net + 22: Action: deleted + 23: Disposition: automatic-action/MDN-sent-automatically;deleted +-re + 24: Last-Attempt-Date: [A-Z][a-z][a-z], [A-Z][a-z][a-z] [ 0-3][0-9] [ 0-2][0-9]:[0-6][0-9]:[0-6][0-9] [0-9][0-9][0-9][0-9] [a-zA-Z0-9]* + 25: +-re + 26: [0-9:=-]+ + 27: Content-Type: message/rfc822 + 28: + 29: From: youcouldberich!@reply-by-postal-mail.invalid + 30: To: rube@landru.example.edu + 31: Subject: $$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$ + 32: Date: TBD + 33: + 34: YOU MAY HAVE ALREADY WON TEN MILLION DOLLARS, BUT I DOUBT + 35: IT! SO JUST POST THIS TO SIX HUNDRED NEWSGROUPS! IT WILL + 36: GUARANTEE THAT YOU GET AT LEAST FIVE RESPONSES WITH MONEY! + 37: MONEY! MONEY! COLD HARD CASH! YOU WILL RECEIVE OVER + 38: $20,000 IN LESS THAN TWO MONTHS! AND IT'S LEGAL!!!!!!!!! + 39: !!!!!!!!!!!!!!!!!!111111111!!!!!!!11111111111!!1 JUST + 40: SEND $5 IN SMALL, UNMARKED BILLS TO THE ADDRESSES BELOW! + 41: +-re + 42: [0-9:=-]+ + 43: +END OF MESSAGE +ENVELOPE FROM: MAILER-DAEMON@Mirddin.farlep.net +ENVELOPE TO: <bar@dontmailme.org> + 0: To: <bar@dontmailme.org> +-re + 1: X-Authentication-Warning: [^ \t]+ set sender using -f flag +-re + 2: Content-Type: multipart/mixed; boundary="[0-9:=-]+" + 3: MIME-Version: 1.0 + 4: +-re + 5: [0-9:=-]+ + 6: +-re + 7: The original message was received at [A-Z][a-z][a-z], [A-Z][a-z][a-z] [ 0-3][0-9] [ 0-2][0-9]:[0-6][0-9]:[0-6][0-9] [0-9][0-9][0-9][0-9] [a-zA-Z0-9]* from bar@dontmailme.org. + 8: Message was refused by recipient's mail filtering program. + 9: Reason given was as follows: + 10: + 11: I don't want to read these messages. + 12: + 13: Regards. + 14: . + 15: +-re + 16: [0-9:=-]+ + 17: Content-Type: message/delivery-status + 18: + 19: Reporting-UA: sieve; GNU Mailutils 0.1.2 +-re + 20: Arrival-Date: [A-Z][a-z][a-z], [A-Z][a-z][a-z] [ 0-3][0-9] [ 0-2][0-9]:[0-6][0-9]:[0-6][0-9] [0-9][0-9][0-9][0-9] [a-zA-Z0-9]* + 21: Final-Recipient: RFC822; foobar@nonexistent.net + 22: Action: deleted + 23: Disposition: automatic-action/MDN-sent-automatically;deleted +-re + 24: Last-Attempt-Date: [A-Z][a-z][a-z], [A-Z][a-z][a-z] [ 0-3][0-9] [ 0-2][0-9]:[0-6][0-9]:[0-6][0-9] [0-9][0-9][0-9][0-9] [a-zA-Z0-9]* + 25: +-re + 26: [0-9:=-]+ + 27: Content-Type: message/rfc822 + 28: + 29: Received: (from bar@dontmailme.org) + 30: by dontmailme.org id fERKR9N16790 + 31: for foobar@nonexistent.net; Fri, 28 Dec 2001 22:18:08 +0200 + 32: Date: Fri, 28 Dec 2001 23:28:08 +0200 + 33: From: Bar <bar@dontmailme.org> + 34: To: Foo Bar <foobar@nonexistent.net> + 35: Message-Id: <200112232808.fERKR9N16790@dontmailme.org> + 36: Subject: Coffee + 37: + 38: How about some coffee? + 39: +-re + 40: [0-9:=-]+ + 41: +END OF MESSAGE +FILE END +TEST END + +# End of Reject
\ No newline at end of file |