|
Last change
on this file since 5441 was
5441,
checked in by alec, 18 months ago
|
- Added 'address' and 'envelope' tests support
- Added 'body' extension support (RFC5173)
- Added 'subaddress' extension support (RFC5233)
- Added comparators support
- Changed Sender/Recipient? labels to From/To?
- Fixed importing rule names from Ingo
- Fixed handling of extensions disabled in config
|
|
File size:
680 bytes
|
| Line | |
|---|
| 1 | --TEST-- |
|---|
| 2 | Test of Sieve subaddress extension (RFC5233) |
|---|
| 3 | --SKIPIF-- |
|---|
| 4 | --FILE-- |
|---|
| 5 | <?php |
|---|
| 6 | include '../lib/rcube_sieve_script.php'; |
|---|
| 7 | |
|---|
| 8 | $txt = ' |
|---|
| 9 | require ["envelope","subaddress","fileinto"]; |
|---|
| 10 | if envelope :user "To" "postmaster" |
|---|
| 11 | { |
|---|
| 12 | fileinto "postmaster"; |
|---|
| 13 | stop; |
|---|
| 14 | } |
|---|
| 15 | if envelope :detail :is "To" "mta-filters" |
|---|
| 16 | { |
|---|
| 17 | fileinto "mta-filters"; |
|---|
| 18 | stop; |
|---|
| 19 | } |
|---|
| 20 | '; |
|---|
| 21 | |
|---|
| 22 | $s = new rcube_sieve_script($txt); |
|---|
| 23 | echo $s->as_text(); |
|---|
| 24 | |
|---|
| 25 | // ------------------------------------------------------------------------------- |
|---|
| 26 | ?> |
|---|
| 27 | --EXPECT-- |
|---|
| 28 | require ["envelope","subaddress","fileinto"]; |
|---|
| 29 | if envelope :user "To" "postmaster" |
|---|
| 30 | { |
|---|
| 31 | fileinto "postmaster"; |
|---|
| 32 | stop; |
|---|
| 33 | } |
|---|
| 34 | if envelope :detail :is "To" "mta-filters" |
|---|
| 35 | { |
|---|
| 36 | fileinto "mta-filters"; |
|---|
| 37 | stop; |
|---|
| 38 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.