Vacation: improve compatibility with the Sendmail utility.
* libmu_sieve/extensions/vacation.c (match_addresses): Change arguments: take primary email address as well as a list of aliases. (vacation_reply): Reply if the primary email or one of alias emails are listed in recipient list of the original message. New tag "always_reply" reverts to the old behavior: reply regardless of whether the message is destined for us. Use the current user email as the sender address of the vacation message. New tag "return_address" sets the sender address explicitly. * sieve/tests/vacation.at: Add new tests.
Showing
2 changed files
with
127 additions
and
28 deletions
... | @@ -26,6 +26,8 @@ | ... | @@ -26,6 +26,8 @@ |
26 | [:database <path: string>] | 26 | [:database <path: string>] |
27 | [:file] | 27 | [:file] |
28 | [:mime] | 28 | [:mime] |
29 | [:always_reply] | ||
30 | [:return_address <email: string>] | ||
29 | <reply: string> | 31 | <reply: string> |
30 | */ | 32 | */ |
31 | 33 | ||
... | @@ -162,8 +164,8 @@ _compare (void *item, void *data) | ... | @@ -162,8 +164,8 @@ _compare (void *item, void *data) |
162 | of the originating mail. Return non-zero if so and store a pointer | 164 | of the originating mail. Return non-zero if so and store a pointer |
163 | to the matching address in *MY_ADDRESS. */ | 165 | to the matching address in *MY_ADDRESS. */ |
164 | static int | 166 | static int |
165 | match_addresses (mu_header_t hdr, mu_sieve_value_t *addresses, | 167 | match_addresses (mu_header_t hdr, char *email, mu_sieve_value_t *addresses, |
166 | char **my_address) | 168 | char const **my_address) |
167 | { | 169 | { |
168 | int match = 0; | 170 | int match = 0; |
169 | const char *str; | 171 | const char *str; |
... | @@ -174,7 +176,10 @@ match_addresses (mu_header_t hdr, mu_sieve_value_t *addresses, | ... | @@ -174,7 +176,10 @@ match_addresses (mu_header_t hdr, mu_sieve_value_t *addresses, |
174 | { | 176 | { |
175 | if (!mu_address_create (&ad.addr, str)) | 177 | if (!mu_address_create (&ad.addr, str)) |
176 | { | 178 | { |
177 | match += mu_sieve_vlist_do (addresses, _compare, &ad); | 179 | if (_compare (email, &ad)) |
180 | match = 1; | ||
181 | else if (addresses) | ||
182 | match += mu_sieve_vlist_do (addresses, _compare, &ad); | ||
178 | mu_address_destroy (&ad.addr); | 183 | mu_address_destroy (&ad.addr); |
179 | } | 184 | } |
180 | } | 185 | } |
... | @@ -183,7 +188,10 @@ match_addresses (mu_header_t hdr, mu_sieve_value_t *addresses, | ... | @@ -183,7 +188,10 @@ match_addresses (mu_header_t hdr, mu_sieve_value_t *addresses, |
183 | { | 188 | { |
184 | if (!mu_address_create (&ad.addr, str)) | 189 | if (!mu_address_create (&ad.addr, str)) |
185 | { | 190 | { |
186 | match += mu_sieve_vlist_do (addresses, _compare, &ad); | 191 | if (_compare (email, &ad)) |
192 | match = 1; | ||
193 | else if (addresses) | ||
194 | match += mu_sieve_vlist_do (addresses, _compare, &ad); | ||
187 | mu_address_destroy (&ad.addr); | 195 | mu_address_destroy (&ad.addr); |
188 | } | 196 | } |
189 | } | 197 | } |
... | @@ -528,7 +536,7 @@ vacation_subject (mu_sieve_machine_t mach, mu_list_t tags, | ... | @@ -528,7 +536,7 @@ vacation_subject (mu_sieve_machine_t mach, mu_list_t tags, |
528 | /* Generate and send the reply message */ | 536 | /* Generate and send the reply message */ |
529 | static int | 537 | static int |
530 | vacation_reply (mu_sieve_machine_t mach, mu_list_t tags, mu_message_t msg, | 538 | vacation_reply (mu_sieve_machine_t mach, mu_list_t tags, mu_message_t msg, |
531 | char *text, char *to, char *from) | 539 | char const *text, char const *to, char const *from) |
532 | { | 540 | { |
533 | mu_mime_t mime = NULL; | 541 | mu_mime_t mime = NULL; |
534 | mu_message_t newmsg; | 542 | mu_message_t newmsg; |
... | @@ -629,10 +637,11 @@ sieve_action_vacation (mu_sieve_machine_t mach, mu_list_t args, mu_list_t tags) | ... | @@ -629,10 +637,11 @@ sieve_action_vacation (mu_sieve_machine_t mach, mu_list_t args, mu_list_t tags) |
629 | { | 637 | { |
630 | int rc; | 638 | int rc; |
631 | char *text, *from; | 639 | char *text, *from; |
640 | char const *return_address; | ||
632 | mu_sieve_value_t *val; | 641 | mu_sieve_value_t *val; |
633 | mu_message_t msg; | 642 | mu_message_t msg; |
634 | mu_header_t hdr; | 643 | mu_header_t hdr; |
635 | char *my_address = mu_sieve_get_daemon_email (mach); | 644 | char *my_address; |
636 | 645 | ||
637 | if (diag (mach)) | 646 | if (diag (mach)) |
638 | return 0; | 647 | return 0; |
... | @@ -669,20 +678,35 @@ sieve_action_vacation (mu_sieve_machine_t mach, mu_list_t args, mu_list_t tags) | ... | @@ -669,20 +678,35 @@ sieve_action_vacation (mu_sieve_machine_t mach, mu_list_t args, mu_list_t tags) |
669 | mu_sieve_abort (mach); | 678 | mu_sieve_abort (mach); |
670 | } | 679 | } |
671 | 680 | ||
672 | if (mu_sieve_tag_lookup (tags, "aliases", &val) | 681 | my_address = mu_get_user_email (NULL); |
673 | && match_addresses (hdr, val, &my_address) == 0) | 682 | if (mu_sieve_tag_lookup (tags, "always_reply", NULL)) |
674 | return 0; | 683 | return_address = my_address; |
684 | else | ||
685 | { | ||
686 | val = NULL; | ||
687 | mu_sieve_tag_lookup (tags, "aliases", &val); | ||
688 | if (match_addresses (hdr, my_address, val, &return_address) == 0) | ||
689 | { | ||
690 | free (my_address); | ||
691 | return 0; | ||
692 | } | ||
693 | } | ||
675 | 694 | ||
676 | if (noreply_address_p (mach, tags, from) | 695 | if (noreply_address_p (mach, tags, from) |
677 | || bulk_precedence_p (hdr) | 696 | || bulk_precedence_p (hdr) |
678 | || check_db (mach, tags, from)) | 697 | || check_db (mach, tags, from)) |
679 | { | 698 | { |
680 | free (from); | 699 | free (from); |
700 | free (my_address); | ||
681 | return 0; | 701 | return 0; |
682 | } | 702 | } |
683 | 703 | ||
684 | rc = vacation_reply (mach, tags, msg, text, from, my_address); | 704 | if (mu_sieve_tag_lookup (tags, "return_address", &val)) |
705 | return_address = val->v.string; | ||
706 | |||
707 | rc = vacation_reply (mach, tags, msg, text, from, return_address); | ||
685 | free (from); | 708 | free (from); |
709 | free (my_address); | ||
686 | if (rc == -1) | 710 | if (rc == -1) |
687 | mu_sieve_abort (mach); | 711 | mu_sieve_abort (mach); |
688 | return rc; | 712 | return rc; |
... | @@ -700,6 +724,8 @@ static mu_sieve_tag_def_t vacation_tags[] = { | ... | @@ -700,6 +724,8 @@ static mu_sieve_tag_def_t vacation_tags[] = { |
700 | {"database", SVT_STRING}, | 724 | {"database", SVT_STRING}, |
701 | {"mime", SVT_VOID}, | 725 | {"mime", SVT_VOID}, |
702 | {"file", SVT_VOID}, | 726 | {"file", SVT_VOID}, |
727 | {"always_reply", SVT_VOID}, | ||
728 | {"return_address", SVT_STRING}, | ||
703 | {NULL} | 729 | {NULL} |
704 | }; | 730 | }; |
705 | 731 | ... | ... |
... | @@ -29,7 +29,38 @@ export MTA_DIAG MTA_APPEND | ... | @@ -29,7 +29,38 @@ export MTA_DIAG MTA_APPEND |
29 | sieve MUT_SIEVE_CMDLINE MUT_SIEVE_OPTIONS -f ./mailbox prog || exit 1 | 29 | sieve MUT_SIEVE_CMDLINE MUT_SIEVE_OPTIONS -f ./mailbox prog || exit 1 |
30 | cat ./mta.diag | 30 | cat ./mta.diag |
31 | ], | 31 | ], |
32 | [ENVELOPE FROM: MAILER-DAEMON@nonexistent.net | 32 | [ENVELOPE FROM: foobar@nonexistent.net |
33 | ENVELOPE TO: <bar@dontmailme.org> | ||
34 | 0: References: <200112232808.fERKR9N16790@dontmailme.org> | ||
35 | 1: In-Reply-To: Your message of Fri, 28 Dec 2001 23:28:08 +0200 | ||
36 | 2: <200112232808.fERKR9N16790@dontmailme.org> | ||
37 | 3: Subject: =?UTF-8?Q?Re:_Coffee?= | ||
38 | 4: To: bar@dontmailme.org | ||
39 | 5: Content-Transfer-Encoding: 8bit | ||
40 | 6: Content-Type: text/plain;charset=UTF-8 | ||
41 | 7: MIME-Version: 1.0 | ||
42 | 8: | ||
43 | 9: I'm on vacation | ||
44 | END OF MESSAGE | ||
45 | ], | ||
46 | [VACATION on msg uid 1 | ||
47 | VACATION on msg uid 2 | ||
48 | VACATION on msg uid 3 | ||
49 | ]) | ||
50 | |||
51 | MUT_SIEVE_EXT_TEST([aliases],[vac01], | ||
52 | [require "vacation"; | ||
53 | |||
54 | vacation :database "vacation.db" :aliases [[ "roadrunner@acme.example.com" ]] "I'm on vacation"; | ||
55 | ], | ||
56 | [MUT_MBCOPY($abs_top_srcdir/testsuite/spool/sieve.mbox,mailbox) | ||
57 | MTA_DIAG=`pwd`/mta.diag | ||
58 | MTA_APPEND=1 | ||
59 | export MTA_DIAG MTA_APPEND | ||
60 | sieve MUT_SIEVE_CMDLINE MUT_SIEVE_OPTIONS -f ./mailbox prog || exit 1 | ||
61 | cat ./mta.diag | ||
62 | ], | ||
63 | [ENVELOPE FROM: roadrunner@acme.example.com | ||
33 | ENVELOPE TO: <coyote@desert.example.org> | 64 | ENVELOPE TO: <coyote@desert.example.org> |
34 | 0: In-Reply-To: Your message of Sun May 6 22:16:47 2001 | 65 | 0: In-Reply-To: Your message of Sun May 6 22:16:47 2001 |
35 | 1: Subject: =?UTF-8?Q?Re:_I_have_a_present_for_you?= | 66 | 1: Subject: =?UTF-8?Q?Re:_I_have_a_present_for_you?= |
... | @@ -40,7 +71,49 @@ ENVELOPE TO: <coyote@desert.example.org> | ... | @@ -40,7 +71,49 @@ ENVELOPE TO: <coyote@desert.example.org> |
40 | 6: | 71 | 6: |
41 | 7: I'm on vacation | 72 | 7: I'm on vacation |
42 | END OF MESSAGE | 73 | END OF MESSAGE |
43 | ENVELOPE FROM: MAILER-DAEMON@nonexistent.net | 74 | ENVELOPE FROM: foobar@nonexistent.net |
75 | ENVELOPE TO: <bar@dontmailme.org> | ||
76 | 0: References: <200112232808.fERKR9N16790@dontmailme.org> | ||
77 | 1: In-Reply-To: Your message of Fri, 28 Dec 2001 23:28:08 +0200 | ||
78 | 2: <200112232808.fERKR9N16790@dontmailme.org> | ||
79 | 3: Subject: =?UTF-8?Q?Re:_Coffee?= | ||
80 | 4: To: bar@dontmailme.org | ||
81 | 5: Content-Transfer-Encoding: 8bit | ||
82 | 6: Content-Type: text/plain;charset=UTF-8 | ||
83 | 7: MIME-Version: 1.0 | ||
84 | 8: | ||
85 | 9: I'm on vacation | ||
86 | END OF MESSAGE | ||
87 | ], | ||
88 | [VACATION on msg uid 1 | ||
89 | VACATION on msg uid 2 | ||
90 | VACATION on msg uid 3 | ||
91 | ]) | ||
92 | |||
93 | MUT_SIEVE_EXT_TEST([always_reply],[vac02], | ||
94 | [require "vacation"; | ||
95 | |||
96 | vacation :database "vacation.db" :always_reply "I'm on vacation"; | ||
97 | ], | ||
98 | [MUT_MBCOPY($abs_top_srcdir/testsuite/spool/sieve.mbox,mailbox) | ||
99 | MTA_DIAG=`pwd`/mta.diag | ||
100 | MTA_APPEND=1 | ||
101 | export MTA_DIAG MTA_APPEND | ||
102 | sieve MUT_SIEVE_CMDLINE MUT_SIEVE_OPTIONS -f ./mailbox prog || exit 1 | ||
103 | cat ./mta.diag | ||
104 | ], | ||
105 | [ENVELOPE FROM: foobar@nonexistent.net | ||
106 | ENVELOPE TO: <coyote@desert.example.org> | ||
107 | 0: In-Reply-To: Your message of Sun May 6 22:16:47 2001 | ||
108 | 1: Subject: =?UTF-8?Q?Re:_I_have_a_present_for_you?= | ||
109 | 2: To: coyote@desert.example.org | ||
110 | 3: Content-Transfer-Encoding: 8bit | ||
111 | 4: Content-Type: text/plain;charset=UTF-8 | ||
112 | 5: MIME-Version: 1.0 | ||
113 | 6: | ||
114 | 7: I'm on vacation | ||
115 | END OF MESSAGE | ||
116 | ENVELOPE FROM: foobar@nonexistent.net | ||
44 | ENVELOPE TO: <b1ff@de.res.example.com> | 117 | ENVELOPE TO: <b1ff@de.res.example.com> |
45 | 0: In-Reply-To: Your message of TBD | 118 | 0: In-Reply-To: Your message of TBD |
46 | 1: Subject: =?UTF-8?Q?Re:_$$$_YOU,_TOO,_CAN_BE_A_MILLIONAIRE!_$$$?= | 119 | 1: Subject: =?UTF-8?Q?Re:_$$$_YOU,_TOO,_CAN_BE_A_MILLIONAIRE!_$$$?= |
... | @@ -51,7 +124,7 @@ ENVELOPE TO: <b1ff@de.res.example.com> | ... | @@ -51,7 +124,7 @@ ENVELOPE TO: <b1ff@de.res.example.com> |
51 | 6: | 124 | 6: |
52 | 7: I'm on vacation | 125 | 7: I'm on vacation |
53 | END OF MESSAGE | 126 | END OF MESSAGE |
54 | ENVELOPE FROM: MAILER-DAEMON@nonexistent.net | 127 | ENVELOPE FROM: foobar@nonexistent.net |
55 | ENVELOPE TO: <bar@dontmailme.org> | 128 | ENVELOPE TO: <bar@dontmailme.org> |
56 | 0: References: <200112232808.fERKR9N16790@dontmailme.org> | 129 | 0: References: <200112232808.fERKR9N16790@dontmailme.org> |
57 | 1: In-Reply-To: Your message of Fri, 28 Dec 2001 23:28:08 +0200 | 130 | 1: In-Reply-To: Your message of Fri, 28 Dec 2001 23:28:08 +0200 |
... | @@ -70,10 +143,10 @@ VACATION on msg uid 2 | ... | @@ -70,10 +143,10 @@ VACATION on msg uid 2 |
70 | VACATION on msg uid 3 | 143 | VACATION on msg uid 3 |
71 | ]) | 144 | ]) |
72 | 145 | ||
73 | MUT_SIEVE_EXT_TEST([database matching],[vac01], | 146 | MUT_SIEVE_EXT_TEST([database matching],[vac03], |
74 | [require "vacation"; | 147 | [require "vacation"; |
75 | 148 | ||
76 | vacation :database "vacation.db" "I'm on vacation"; | 149 | vacation :database "vacation.db" :always_reply "I'm on vacation"; |
77 | ], | 150 | ], |
78 | [MUT_MBCOPY($abs_top_srcdir/testsuite/spool/sieve.mbox,mailbox) | 151 | [MUT_MBCOPY($abs_top_srcdir/testsuite/spool/sieve.mbox,mailbox) |
79 | MTA_DIAG=`pwd`/mta.diag | 152 | MTA_DIAG=`pwd`/mta.diag |
... | @@ -83,7 +156,7 @@ sieve MUT_SIEVE_CMDLINE MUT_SIEVE_OPTIONS -f ./mailbox prog || exit 1 | ... | @@ -83,7 +156,7 @@ sieve MUT_SIEVE_CMDLINE MUT_SIEVE_OPTIONS -f ./mailbox prog || exit 1 |
83 | sieve MUT_SIEVE_CMDLINE MUT_SIEVE_OPTIONS -f ./mailbox prog || exit 1 | 156 | sieve MUT_SIEVE_CMDLINE MUT_SIEVE_OPTIONS -f ./mailbox prog || exit 1 |
84 | cat ./mta.diag | 157 | cat ./mta.diag |
85 | ], | 158 | ], |
86 | [ENVELOPE FROM: MAILER-DAEMON@nonexistent.net | 159 | [ENVELOPE FROM: foobar@nonexistent.net |
87 | ENVELOPE TO: <coyote@desert.example.org> | 160 | ENVELOPE TO: <coyote@desert.example.org> |
88 | 0: In-Reply-To: Your message of Sun May 6 22:16:47 2001 | 161 | 0: In-Reply-To: Your message of Sun May 6 22:16:47 2001 |
89 | 1: Subject: =?UTF-8?Q?Re:_I_have_a_present_for_you?= | 162 | 1: Subject: =?UTF-8?Q?Re:_I_have_a_present_for_you?= |
... | @@ -94,7 +167,7 @@ ENVELOPE TO: <coyote@desert.example.org> | ... | @@ -94,7 +167,7 @@ ENVELOPE TO: <coyote@desert.example.org> |
94 | 6: | 167 | 6: |
95 | 7: I'm on vacation | 168 | 7: I'm on vacation |
96 | END OF MESSAGE | 169 | END OF MESSAGE |
97 | ENVELOPE FROM: MAILER-DAEMON@nonexistent.net | 170 | ENVELOPE FROM: foobar@nonexistent.net |
98 | ENVELOPE TO: <b1ff@de.res.example.com> | 171 | ENVELOPE TO: <b1ff@de.res.example.com> |
99 | 0: In-Reply-To: Your message of TBD | 172 | 0: In-Reply-To: Your message of TBD |
100 | 1: Subject: =?UTF-8?Q?Re:_$$$_YOU,_TOO,_CAN_BE_A_MILLIONAIRE!_$$$?= | 173 | 1: Subject: =?UTF-8?Q?Re:_$$$_YOU,_TOO,_CAN_BE_A_MILLIONAIRE!_$$$?= |
... | @@ -105,7 +178,7 @@ ENVELOPE TO: <b1ff@de.res.example.com> | ... | @@ -105,7 +178,7 @@ ENVELOPE TO: <b1ff@de.res.example.com> |
105 | 6: | 178 | 6: |
106 | 7: I'm on vacation | 179 | 7: I'm on vacation |
107 | END OF MESSAGE | 180 | END OF MESSAGE |
108 | ENVELOPE FROM: MAILER-DAEMON@nonexistent.net | 181 | ENVELOPE FROM: foobar@nonexistent.net |
109 | ENVELOPE TO: <bar@dontmailme.org> | 182 | ENVELOPE TO: <bar@dontmailme.org> |
110 | 0: References: <200112232808.fERKR9N16790@dontmailme.org> | 183 | 0: References: <200112232808.fERKR9N16790@dontmailme.org> |
111 | 1: In-Reply-To: Your message of Fri, 28 Dec 2001 23:28:08 +0200 | 184 | 1: In-Reply-To: Your message of Fri, 28 Dec 2001 23:28:08 +0200 |
... | @@ -127,10 +200,10 @@ VACATION on msg uid 2 | ... | @@ -127,10 +200,10 @@ VACATION on msg uid 2 |
127 | VACATION on msg uid 3 | 200 | VACATION on msg uid 3 |
128 | ]) | 201 | ]) |
129 | 202 | ||
130 | MUT_SIEVE_EXT_TEST([mime],[vac02], | 203 | MUT_SIEVE_EXT_TEST([mime],[vac04], |
131 | [require "vacation"; | 204 | [require "vacation"; |
132 | 205 | ||
133 | vacation :database "vacation.db" :mime "I'm on vacation."; | 206 | vacation :database "vacation.db" :always_reply :mime "I'm on vacation."; |
134 | ], | 207 | ], |
135 | [MUT_MBCOPY($abs_top_srcdir/testsuite/spool/sieve.mbox,mailbox) | 208 | [MUT_MBCOPY($abs_top_srcdir/testsuite/spool/sieve.mbox,mailbox) |
136 | MTA_DIAG=`pwd`/mta.diag | 209 | MTA_DIAG=`pwd`/mta.diag |
... | @@ -139,7 +212,7 @@ export MTA_DIAG MTA_APPEND | ... | @@ -139,7 +212,7 @@ export MTA_DIAG MTA_APPEND |
139 | sieve MUT_SIEVE_CMDLINE MUT_SIEVE_OPTIONS -f ./mailbox prog || exit 1 | 212 | sieve MUT_SIEVE_CMDLINE MUT_SIEVE_OPTIONS -f ./mailbox prog || exit 1 |
140 | cat ./mta.diag | 213 | cat ./mta.diag |
141 | ], | 214 | ], |
142 | [ENVELOPE FROM: MAILER-DAEMON@nonexistent.net | 215 | [ENVELOPE FROM: foobar@nonexistent.net |
143 | ENVELOPE TO: <coyote@desert.example.org> | 216 | ENVELOPE TO: <coyote@desert.example.org> |
144 | 0: In-Reply-To: Your message of Sun May 6 22:16:47 2001 | 217 | 0: In-Reply-To: Your message of Sun May 6 22:16:47 2001 |
145 | 1: Subject: =?UTF-8?Q?Re:_I_have_a_present_for_you?= | 218 | 1: Subject: =?UTF-8?Q?Re:_I_have_a_present_for_you?= |
... | @@ -150,7 +223,7 @@ ENVELOPE TO: <coyote@desert.example.org> | ... | @@ -150,7 +223,7 @@ ENVELOPE TO: <coyote@desert.example.org> |
150 | 6: | 223 | 6: |
151 | 7: SSdtIG9uIHZhY2F0aW9uLg== | 224 | 7: SSdtIG9uIHZhY2F0aW9uLg== |
152 | END OF MESSAGE | 225 | END OF MESSAGE |
153 | ENVELOPE FROM: MAILER-DAEMON@nonexistent.net | 226 | ENVELOPE FROM: foobar@nonexistent.net |
154 | ENVELOPE TO: <b1ff@de.res.example.com> | 227 | ENVELOPE TO: <b1ff@de.res.example.com> |
155 | 0: In-Reply-To: Your message of TBD | 228 | 0: In-Reply-To: Your message of TBD |
156 | 1: Subject: =?UTF-8?Q?Re:_$$$_YOU,_TOO,_CAN_BE_A_MILLIONAIRE!_$$$?= | 229 | 1: Subject: =?UTF-8?Q?Re:_$$$_YOU,_TOO,_CAN_BE_A_MILLIONAIRE!_$$$?= |
... | @@ -161,7 +234,7 @@ ENVELOPE TO: <b1ff@de.res.example.com> | ... | @@ -161,7 +234,7 @@ ENVELOPE TO: <b1ff@de.res.example.com> |
161 | 6: | 234 | 6: |
162 | 7: SSdtIG9uIHZhY2F0aW9uLg== | 235 | 7: SSdtIG9uIHZhY2F0aW9uLg== |
163 | END OF MESSAGE | 236 | END OF MESSAGE |
164 | ENVELOPE FROM: MAILER-DAEMON@nonexistent.net | 237 | ENVELOPE FROM: foobar@nonexistent.net |
165 | ENVELOPE TO: <bar@dontmailme.org> | 238 | ENVELOPE TO: <bar@dontmailme.org> |
166 | 0: References: <200112232808.fERKR9N16790@dontmailme.org> | 239 | 0: References: <200112232808.fERKR9N16790@dontmailme.org> |
167 | 1: In-Reply-To: Your message of Fri, 28 Dec 2001 23:28:08 +0200 | 240 | 1: In-Reply-To: Your message of Fri, 28 Dec 2001 23:28:08 +0200 |
... | @@ -180,10 +253,10 @@ VACATION on msg uid 2 | ... | @@ -180,10 +253,10 @@ VACATION on msg uid 2 |
180 | VACATION on msg uid 3 | 253 | VACATION on msg uid 3 |
181 | ]) | 254 | ]) |
182 | 255 | ||
183 | MUT_SIEVE_EXT_TEST([reply from file],[vac03], | 256 | MUT_SIEVE_EXT_TEST([reply from file],[vac05], |
184 | [require "vacation"; | 257 | [require "vacation"; |
185 | 258 | ||
186 | vacation :database "vacation.db" :file "reply"; | 259 | vacation :database "vacation.db" :always_reply :file "reply"; |
187 | ], | 260 | ], |
188 | [AT_DATA([reply],[X-Mail-Processor: sieve | 261 | [AT_DATA([reply],[X-Mail-Processor: sieve |
189 | 262 | ||
... | @@ -200,7 +273,7 @@ export MTA_DIAG MTA_APPEND | ... | @@ -200,7 +273,7 @@ export MTA_DIAG MTA_APPEND |
200 | sieve MUT_SIEVE_CMDLINE MUT_SIEVE_OPTIONS -f ./mailbox prog || exit 1 | 273 | sieve MUT_SIEVE_CMDLINE MUT_SIEVE_OPTIONS -f ./mailbox prog || exit 1 |
201 | cat ./mta.diag | 274 | cat ./mta.diag |
202 | ], | 275 | ], |
203 | [ENVELOPE FROM: MAILER-DAEMON@nonexistent.net | 276 | [ENVELOPE FROM: foobar@nonexistent.net |
204 | ENVELOPE TO: <coyote@desert.example.org> | 277 | ENVELOPE TO: <coyote@desert.example.org> |
205 | 0: In-Reply-To: Your message of Sun May 6 22:16:47 2001 | 278 | 0: In-Reply-To: Your message of Sun May 6 22:16:47 2001 |
206 | 1: Subject: =?UTF-8?Q?Re:_I_have_a_present_for_you?= | 279 | 1: Subject: =?UTF-8?Q?Re:_I_have_a_present_for_you?= |
... | @@ -213,7 +286,7 @@ ENVELOPE TO: <coyote@desert.example.org> | ... | @@ -213,7 +286,7 @@ ENVELOPE TO: <coyote@desert.example.org> |
213 | 8: Best regards, | 286 | 8: Best regards, |
214 | 9: Ty Coon | 287 | 9: Ty Coon |
215 | END OF MESSAGE | 288 | END OF MESSAGE |
216 | ENVELOPE FROM: MAILER-DAEMON@nonexistent.net | 289 | ENVELOPE FROM: foobar@nonexistent.net |
217 | ENVELOPE TO: <b1ff@de.res.example.com> | 290 | ENVELOPE TO: <b1ff@de.res.example.com> |
218 | 0: In-Reply-To: Your message of TBD | 291 | 0: In-Reply-To: Your message of TBD |
219 | 1: Subject: =?UTF-8?Q?Re:_$$$_YOU,_TOO,_CAN_BE_A_MILLIONAIRE!_$$$?= | 292 | 1: Subject: =?UTF-8?Q?Re:_$$$_YOU,_TOO,_CAN_BE_A_MILLIONAIRE!_$$$?= |
... | @@ -226,7 +299,7 @@ ENVELOPE TO: <b1ff@de.res.example.com> | ... | @@ -226,7 +299,7 @@ ENVELOPE TO: <b1ff@de.res.example.com> |
226 | 8: Best regards, | 299 | 8: Best regards, |
227 | 9: Ty Coon | 300 | 9: Ty Coon |
228 | END OF MESSAGE | 301 | END OF MESSAGE |
229 | ENVELOPE FROM: MAILER-DAEMON@nonexistent.net | 302 | ENVELOPE FROM: foobar@nonexistent.net |
230 | ENVELOPE TO: <bar@dontmailme.org> | 303 | ENVELOPE TO: <bar@dontmailme.org> |
231 | 0: References: <200112232808.fERKR9N16790@dontmailme.org> | 304 | 0: References: <200112232808.fERKR9N16790@dontmailme.org> |
232 | 1: In-Reply-To: Your message of Fri, 28 Dec 2001 23:28:08 +0200 | 305 | 1: In-Reply-To: Your message of Fri, 28 Dec 2001 23:28:08 +0200 | ... | ... |
-
Please register or sign in to post a comment