Fix semantics of mu_header_set_value and creation of multipart/alternative MIME
Until now, mu_header_set_value called with replace=0 prepended the header to the header list, if a header with such name was already present. This has been changed. Now, if the header with the requested name is already present, its action is as follows: 1. If repl is 0, return MU_ERR_EXISTS 2. Otherwise, replace the header with the new value. If the header is not present, it is appended to the end of the header list, instead of putting it at the beginning. This change is incompatible and breaks the tests, that relied on a particular field ordering. These are fixed as well. The use of mu_header_set_value throughout the sources has been revised to ensure that single-instance headers are never added twice. This change also facilitates the second part of this commit, which fixes creation of the multipart/alternative message by the mail utility. * libmailutils/mailbox/header.c (mu_header_set_value): Fix semantics. If the replace parameter is not set and the header field with the given name already exists, return MU_ERR_EXISTS without changing anything. If adding new header, append it to the end of the header list, instead of pushing it to the top. * configure.ac: Raise shared library revision number. * libmu_scm/mu_message.c (mu-message-set-header) (mu-message-set-header-fields): call mu_header_set_value explicitly if repl is not set. * libmu_sieve/extensions/moderator.c: Force replace header mode when needed. * libmu_sieve/extensions/vacation.c: Likewise. * mh/mh_init.c (mh_annotate): Prepend the annotation header. * mh/mhn.c: Force replace header mode when needed. * mh/repl.c: Likewise. * mh/send.c: Likewise. * libmailutils/tests/modmesg01.at: Change expected header order. * libmailutils/tests/modmesg03.at: Likewise. * mh/tests/mhn.at: Likewise. * mh/tests/send.at: Likewise. * sieve/tests/moderator.at: Likewise. * sieve/tests/redirect.at: Likewise. * sieve/tests/reject.at: Likewise. * sieve/tests/vacation.at: Likewise. * examples/mta.c (message_finalize): Append X-Authentication-Warning, instead of setting it. Make sure Content-Disposition is not set for parts of a multipart/ alternative MIME message. Some mail readers (notably, yahoo), misinterpret it. * libmailutils/mime/attachment.c (at_hdr): Use mu_header_set_value to set Content-Type and Content-Disposition. * libmailutils/mime/mime.c (_mime_set_content_type): If the content type is set to multipart/alternative, remove the Content-Disposition headers from the message parts. * mail/send.c (saveatt): Don't set content-disposition for multipart/alternative, it is now done by the library. (add_attachments): Warn about ignored headers. Append only Received and X-* headers, replace others. (parse_headers): Append headers. (compose_header_set): Use mu_header_append if COMPOSE_APPEND is requested. * mail/util.c (util_header_expand): Use mu_header_append.
Showing
22 changed files
with
174 additions
and
130 deletions
... | @@ -32,7 +32,7 @@ AB_INIT | ... | @@ -32,7 +32,7 @@ AB_INIT |
32 | 32 | ||
33 | dnl Library versioning | 33 | dnl Library versioning |
34 | AC_SUBST(VI_CURRENT, 5) | 34 | AC_SUBST(VI_CURRENT, 5) |
35 | AC_SUBST(VI_REVISION, 2) | 35 | AC_SUBST(VI_REVISION, 3) |
36 | AC_SUBST(VI_AGE, 0) | 36 | AC_SUBST(VI_AGE, 0) |
37 | 37 | ||
38 | dnl Library paths | 38 | dnl Library paths | ... | ... |
... | @@ -406,7 +406,7 @@ message_finalize (mu_message_t msg, int warn) | ... | @@ -406,7 +406,7 @@ message_finalize (mu_message_t msg, int warn) |
406 | return 1; | 406 | return 1; |
407 | } | 407 | } |
408 | sprintf (warn, "%s %s", pwd->pw_name, SENDER_WARNING); | 408 | sprintf (warn, "%s %s", pwd->pw_name, SENDER_WARNING); |
409 | mu_header_set_value (header, "X-Authentication-Warning", warn, 0); | 409 | mu_header_append (header, "X-Authentication-Warning", warn); |
410 | free (warn); | 410 | free (warn); |
411 | } | 411 | } |
412 | 412 | ... | ... |
... | @@ -491,7 +491,6 @@ mu_header_destroy (mu_header_t *ph) | ... | @@ -491,7 +491,6 @@ mu_header_destroy (mu_header_t *ph) |
491 | } | 491 | } |
492 | } | 492 | } |
493 | 493 | ||
494 | |||
495 | int | 494 | int |
496 | mu_header_set_value (mu_header_t header, const char *fn, const char *fv, | 495 | mu_header_set_value (mu_header_t header, const char *fn, const char *fv, |
497 | int replace) | 496 | int replace) |
... | @@ -511,9 +510,10 @@ mu_header_set_value (mu_header_t header, const char *fn, const char *fv, | ... | @@ -511,9 +510,10 @@ mu_header_set_value (mu_header_t header, const char *fn, const char *fv, |
511 | if (fv == NULL && !replace) | 510 | if (fv == NULL && !replace) |
512 | return EINVAL; | 511 | return EINVAL; |
513 | 512 | ||
513 | ent = mu_hdrent_find (header, fn, 1); | ||
514 | |||
514 | if (replace) | 515 | if (replace) |
515 | { | 516 | { |
516 | ent = mu_hdrent_find (header, fn, 1); | ||
517 | if (ent) | 517 | if (ent) |
518 | { | 518 | { |
519 | if (fv == NULL) | 519 | if (fv == NULL) |
... | @@ -530,12 +530,16 @@ mu_header_set_value (mu_header_t header, const char *fn, const char *fv, | ... | @@ -530,12 +530,16 @@ mu_header_set_value (mu_header_t header, const char *fn, const char *fv, |
530 | else if (fv == NULL) | 530 | else if (fv == NULL) |
531 | return 0; | 531 | return 0; |
532 | } | 532 | } |
533 | else if (ent) | ||
534 | { | ||
535 | return MU_ERR_EXISTS; | ||
536 | } | ||
533 | 537 | ||
534 | ent = mu_hdrent_create (header, NULL, | 538 | ent = mu_hdrent_create (header, NULL, |
535 | fn, strlen (fn), fv, strlen (fv)); | 539 | fn, strlen (fn), fv, strlen (fv)); |
536 | if (!ent) | 540 | if (!ent) |
537 | return ENOMEM; | 541 | return ENOMEM; |
538 | mu_hdrent_prepend (header, ent); | 542 | mu_hdrent_append (header, ent); |
539 | HEADER_SET_MODIFIED (header); | 543 | HEADER_SET_MODIFIED (header); |
540 | return 0; | 544 | return 0; |
541 | } | 545 | } | ... | ... |
... | @@ -83,11 +83,11 @@ at_hdr (mu_header_t hdr, const char *content_type, const char *encoding, | ... | @@ -83,11 +83,11 @@ at_hdr (mu_header_t hdr, const char *content_type, const char *encoding, |
83 | free (str); | 83 | free (str); |
84 | if (rc) | 84 | if (rc) |
85 | return rc; | 85 | return rc; |
86 | rc = mu_header_append (hdr, MU_HEADER_CONTENT_TYPE, val); | 86 | rc = mu_header_set_value (hdr, MU_HEADER_CONTENT_TYPE, val, 1); |
87 | free (val); | 87 | free (val); |
88 | } | 88 | } |
89 | else | 89 | else |
90 | rc = mu_header_append (hdr, MU_HEADER_CONTENT_TYPE, content_type); | 90 | rc = mu_header_set_value (hdr, MU_HEADER_CONTENT_TYPE, content_type, 1); |
91 | 91 | ||
92 | if (rc) | 92 | if (rc) |
93 | return rc; | 93 | return rc; |
... | @@ -101,15 +101,16 @@ at_hdr (mu_header_t hdr, const char *content_type, const char *encoding, | ... | @@ -101,15 +101,16 @@ at_hdr (mu_header_t hdr, const char *content_type, const char *encoding, |
101 | free (str); | 101 | free (str); |
102 | if (rc) | 102 | if (rc) |
103 | return rc; | 103 | return rc; |
104 | rc = mu_header_append (hdr, MU_HEADER_CONTENT_DISPOSITION, val); | 104 | rc = mu_header_set_value (hdr, MU_HEADER_CONTENT_DISPOSITION, val, 1); |
105 | free (val); | 105 | free (val); |
106 | } | 106 | } |
107 | else | 107 | else |
108 | rc = mu_header_append (hdr, MU_HEADER_CONTENT_DISPOSITION, "attachment"); | 108 | rc = mu_header_set_value (hdr, MU_HEADER_CONTENT_DISPOSITION, "attachment", |
109 | 1); | ||
109 | if (rc) | 110 | if (rc) |
110 | return rc; | 111 | return rc; |
111 | return mu_header_append (hdr, MU_HEADER_CONTENT_TRANSFER_ENCODING, | 112 | return mu_header_set_value (hdr, MU_HEADER_CONTENT_TRANSFER_ENCODING, |
112 | encoding ? encoding : "8bit"); | 113 | encoding ? encoding : "8bit", 1); |
113 | } | 114 | } |
114 | 115 | ||
115 | /* Create in *NEWMSG an empty attachment of given CONTENT_TYPE and ENCODING. | 116 | /* Create in *NEWMSG an empty attachment of given CONTENT_TYPE and ENCODING. | ... | ... |
... | @@ -465,7 +465,21 @@ _mime_set_content_type (mu_mime_t mime) | ... | @@ -465,7 +465,21 @@ _mime_set_content_type (mu_mime_t mime) |
465 | if (mime->flags & MU_MIME_MULTIPART_MIXED) | 465 | if (mime->flags & MU_MIME_MULTIPART_MIXED) |
466 | content_type = "multipart/mixed; boundary="; | 466 | content_type = "multipart/mixed; boundary="; |
467 | else | 467 | else |
468 | { | ||
469 | size_t i; | ||
470 | |||
471 | /* Make sure content disposition is not set for alternative | ||
472 | parts */ | ||
473 | for (i = 0; i < mime->nmtp_parts; i++) | ||
474 | { | ||
475 | mu_header_t hdr; | ||
476 | |||
477 | mu_message_get_header (mime->mtp_parts[i]->msg, &hdr); | ||
478 | mu_header_remove (hdr, MU_HEADER_CONTENT_DISPOSITION, 1); | ||
479 | } | ||
480 | |||
468 | content_type = "multipart/alternative; boundary="; | 481 | content_type = "multipart/alternative; boundary="; |
482 | } | ||
469 | if (mime->boundary == NULL) | 483 | if (mime->boundary == NULL) |
470 | { | 484 | { |
471 | char boundary[128]; | 485 | char boundary[128]; |
... | @@ -1118,7 +1132,7 @@ mu_mime_get_message (mu_mime_t mime, mu_message_t *msg) | ... | @@ -1118,7 +1132,7 @@ mu_mime_get_message (mu_mime_t mime, mu_message_t *msg) |
1118 | { | 1132 | { |
1119 | mu_message_set_header (mime->msg, mime->hdrs, mime); | 1133 | mu_message_set_header (mime->msg, mime->hdrs, mime); |
1120 | mu_header_set_value (mime->hdrs, MU_HEADER_MIME_VERSION, "1.0", | 1134 | mu_header_set_value (mime->hdrs, MU_HEADER_MIME_VERSION, "1.0", |
1121 | 0); | 1135 | 1); |
1122 | if ((ret = _mime_set_content_type (mime)) == 0) | 1136 | if ((ret = _mime_set_content_type (mime)) == 0) |
1123 | { | 1137 | { |
1124 | if ((ret = mu_body_create (&body, mime->msg)) == 0) | 1138 | if ((ret = mu_body_create (&body, mime->msg)) == 0) | ... | ... |
... | @@ -19,9 +19,9 @@ AT_KEYWORDS([modmesg01]) | ... | @@ -19,9 +19,9 @@ AT_KEYWORDS([modmesg01]) |
19 | 19 | ||
20 | AT_CHECK([modmesg -a To:gray@localhost -a Subject:test], | 20 | AT_CHECK([modmesg -a To:gray@localhost -a Subject:test], |
21 | [0], | 21 | [0], |
22 | [Subject: test | 22 | [From: root |
23 | To: gray@localhost | 23 | To: gray@localhost |
24 | From: root | 24 | Subject: test |
25 | 25 | ||
26 | This is a test message. | 26 | This is a test message. |
27 | oo | 27 | oo | ... | ... |
... | @@ -19,9 +19,9 @@ AT_KEYWORDS([modmesg02]) | ... | @@ -19,9 +19,9 @@ AT_KEYWORDS([modmesg02]) |
19 | 19 | ||
20 | AT_CHECK([modmesg -a To:gray@localhost -a Subject:test -l 0 -t "That"], | 20 | AT_CHECK([modmesg -a To:gray@localhost -a Subject:test -l 0 -t "That"], |
21 | [0], | 21 | [0], |
22 | [Subject: test | 22 | [From: root |
23 | To: gray@localhost | 23 | To: gray@localhost |
24 | From: root | 24 | Subject: test |
25 | 25 | ||
26 | That is a test message. | 26 | That is a test message. |
27 | oo | 27 | oo | ... | ... |
... | @@ -289,7 +289,10 @@ SCM_DEFINE_PUBLIC (scm_mu_message_set_header, "mu-message-set-header", 3, 1, 0, | ... | @@ -289,7 +289,10 @@ SCM_DEFINE_PUBLIC (scm_mu_message_set_header, "mu-message-set-header", 3, 1, 0, |
289 | 289 | ||
290 | hdr_c = scm_to_locale_string (header); | 290 | hdr_c = scm_to_locale_string (header); |
291 | val_c = scm_to_locale_string (value); | 291 | val_c = scm_to_locale_string (value); |
292 | if (repl) | ||
292 | status = mu_header_set_value (hdr, hdr_c, val_c, repl); | 293 | status = mu_header_set_value (hdr, hdr_c, val_c, repl); |
294 | else | ||
295 | status = mu_header_append (hdr, hdr_c, val_c); | ||
293 | free (hdr_c); | 296 | free (hdr_c); |
294 | free (val_c); | 297 | free (val_c); |
295 | 298 | ||
... | @@ -602,7 +605,10 @@ SCM_DEFINE_PUBLIC (scm_mu_message_set_header_fields, "mu-message-set-header-fiel | ... | @@ -602,7 +605,10 @@ SCM_DEFINE_PUBLIC (scm_mu_message_set_header_fields, "mu-message-set-header-fiel |
602 | SCM_ASSERT (scm_is_string (cdr), cdr, SCM_ARGn, FUNC_NAME); | 605 | SCM_ASSERT (scm_is_string (cdr), cdr, SCM_ARGn, FUNC_NAME); |
603 | hdr_c = scm_to_locale_string (car); | 606 | hdr_c = scm_to_locale_string (car); |
604 | val_c = scm_to_locale_string (cdr); | 607 | val_c = scm_to_locale_string (cdr); |
608 | if (repl) | ||
605 | status = mu_header_set_value (hdr, hdr_c, val_c, repl); | 609 | status = mu_header_set_value (hdr, hdr_c, val_c, repl); |
610 | else | ||
611 | status = mu_header_append (hdr, hdr_c, val_c); | ||
606 | free (hdr_c); | 612 | free (hdr_c); |
607 | free (val_c); | 613 | free (val_c); |
608 | if (status) | 614 | if (status) | ... | ... |
... | @@ -140,6 +140,9 @@ moderator_filter_message (mu_sieve_machine_t mach, | ... | @@ -140,6 +140,9 @@ moderator_filter_message (mu_sieve_machine_t mach, |
140 | return rc; | 140 | return rc; |
141 | } | 141 | } |
142 | 142 | ||
143 | /* Copy the value of the header field FROM from the email header FROM_HDR to | ||
144 | the header field TO in the header TO_HDR, replacing the field, if it | ||
145 | exists. */ | ||
143 | static int | 146 | static int |
144 | copy_header (mu_sieve_machine_t mach, | 147 | copy_header (mu_sieve_machine_t mach, |
145 | mu_header_t to_hdr, char *to, mu_header_t from_hdr, char *from) | 148 | mu_header_t to_hdr, char *to, mu_header_t from_hdr, char *from) |
... | @@ -153,7 +156,7 @@ copy_header (mu_sieve_machine_t mach, | ... | @@ -153,7 +156,7 @@ copy_header (mu_sieve_machine_t mach, |
153 | from, mu_strerror (rc)); | 156 | from, mu_strerror (rc)); |
154 | return rc; | 157 | return rc; |
155 | } | 158 | } |
156 | rc = mu_header_set_value (to_hdr, to, value, 0); | 159 | rc = mu_header_set_value (to_hdr, to, value, 1); |
157 | return rc; | 160 | return rc; |
158 | } | 161 | } |
159 | 162 | ||
... | @@ -193,7 +196,7 @@ moderator_discard_message (mu_sieve_machine_t mach, mu_message_t request, | ... | @@ -193,7 +196,7 @@ moderator_discard_message (mu_sieve_machine_t mach, mu_message_t request, |
193 | } | 196 | } |
194 | 197 | ||
195 | if (from) | 198 | if (from) |
196 | mu_header_set_value (repl_hdr, MU_HEADER_FROM, from, 0); | 199 | mu_header_set_value (repl_hdr, MU_HEADER_FROM, from, 1); |
197 | 200 | ||
198 | mailer = mu_sieve_get_mailer (mach); | 201 | mailer = mu_sieve_get_mailer (mach); |
199 | rc = mu_mailer_open (mailer, 0); | 202 | rc = mu_mailer_open (mailer, 0); | ... | ... |
... | @@ -513,10 +513,10 @@ vacation_subject (mu_sieve_machine_t mach, | ... | @@ -513,10 +513,10 @@ vacation_subject (mu_sieve_machine_t mach, |
513 | 513 | ||
514 | if (mu_rfc2047_encode (MU_SIEVE_CHARSET, "quoted-printable", | 514 | if (mu_rfc2047_encode (MU_SIEVE_CHARSET, "quoted-printable", |
515 | subject, &value)) | 515 | subject, &value)) |
516 | mu_header_set_value (newhdr, MU_HEADER_SUBJECT, subject, 0); | 516 | mu_header_set_value (newhdr, MU_HEADER_SUBJECT, subject, 1); |
517 | else | 517 | else |
518 | { | 518 | { |
519 | mu_header_set_value (newhdr, MU_HEADER_SUBJECT, value, 0); | 519 | mu_header_set_value (newhdr, MU_HEADER_SUBJECT, value, 1); |
520 | free (value); | 520 | free (value); |
521 | } | 521 | } |
522 | 522 | ||
... | @@ -714,7 +714,7 @@ vacation_reply (mu_sieve_machine_t mach, mu_message_t msg, | ... | @@ -714,7 +714,7 @@ vacation_reply (mu_sieve_machine_t mach, mu_message_t msg, |
714 | } | 714 | } |
715 | else | 715 | else |
716 | { | 716 | { |
717 | mu_header_set_value (newhdr, MU_HEADER_TO, to, 0); | 717 | mu_header_set_value (newhdr, MU_HEADER_TO, to, 1); |
718 | 718 | ||
719 | val = mu_sieve_get_tag_untyped (mach, "header"); | 719 | val = mu_sieve_get_tag_untyped (mach, "header"); |
720 | if (val) | 720 | if (val) | ... | ... |
... | @@ -444,7 +444,8 @@ saveatt (void *item, void *data) | ... | @@ -444,7 +444,8 @@ saveatt (void *item, void *data) |
444 | char *p; | 444 | char *p; |
445 | 445 | ||
446 | rc = mu_attachment_create (&part, aptr->content_type, aptr->encoding, | 446 | rc = mu_attachment_create (&part, aptr->content_type, aptr->encoding, |
447 | aptr->name, aptr->filename); | 447 | env->alt ? NULL : aptr->name, |
448 | env->alt ? NULL : aptr->filename); | ||
448 | if (rc) | 449 | if (rc) |
449 | { | 450 | { |
450 | mu_error (_("can't create attachment %s: %s"), | 451 | mu_error (_("can't create attachment %s: %s"), |
... | @@ -482,8 +483,6 @@ saveatt (void *item, void *data) | ... | @@ -482,8 +483,6 @@ saveatt (void *item, void *data) |
482 | 483 | ||
483 | mu_mime_get_num_parts (env->mime, &nparts); | 484 | mu_mime_get_num_parts (env->mime, &nparts); |
484 | mu_message_get_header (part, &hdr); | 485 | mu_message_get_header (part, &hdr); |
485 | if (env->alt) | ||
486 | mu_header_set_value (hdr, MU_HEADER_CONTENT_DISPOSITION, "inline", 1); | ||
487 | mu_rfc2822_msg_id (nparts, &p); | 486 | mu_rfc2822_msg_id (nparts, &p); |
488 | mu_header_set_value (hdr, MU_HEADER_CONTENT_ID, p, 1); | 487 | mu_header_set_value (hdr, MU_HEADER_CONTENT_ID, p, 1); |
489 | free (p); | 488 | free (p); |
... | @@ -640,10 +639,17 @@ add_attachments (compose_env_t *env, mu_message_t *pmsg) | ... | @@ -640,10 +639,17 @@ add_attachments (compose_env_t *env, mu_message_t *pmsg) |
640 | if (mu_iterator_current_kv (itr, (const void **)&name, | 639 | if (mu_iterator_current_kv (itr, (const void **)&name, |
641 | (void**)&value) == 0) | 640 | (void**)&value) == 0) |
642 | { | 641 | { |
643 | if (mu_c_strcasecmp (name, MU_HEADER_MIME_VERSION) == 0 || | 642 | if (mu_c_strcasecmp (name, MU_HEADER_RECEIVED) == 0 |
643 | || mu_c_strncasecmp (name, "X-", 2) == 0) | ||
644 | mu_header_append (outhdr, name, value); | ||
645 | else if (mu_c_strcasecmp (name, MU_HEADER_MIME_VERSION) == 0 || | ||
644 | mu_c_strncasecmp (name, "Content-", 8) == 0) | 646 | mu_c_strncasecmp (name, "Content-", 8) == 0) |
647 | { | ||
648 | mu_error (_("%s: not setting header"), name); | ||
645 | continue; | 649 | continue; |
646 | mu_header_append (outhdr, name, value); | 650 | } |
651 | else | ||
652 | mu_header_set_value (outhdr, name, value, 1); | ||
647 | } | 653 | } |
648 | } | 654 | } |
649 | mu_iterator_destroy (&itr); | 655 | mu_iterator_destroy (&itr); |
... | @@ -826,7 +832,7 @@ parse_headers (mu_stream_t input, compose_env_t *env) | ... | @@ -826,7 +832,7 @@ parse_headers (mu_stream_t input, compose_env_t *env) |
826 | 832 | ||
827 | if (name) | 833 | if (name) |
828 | { | 834 | { |
829 | mu_header_set_value (header, name, value[0] ? value : NULL, 0); | 835 | mu_header_append (header, name, value[0] ? value : NULL); |
830 | free (name); | 836 | free (name); |
831 | free (value); | 837 | free (value); |
832 | name = value = NULL; | 838 | name = value = NULL; |
... | @@ -856,7 +862,7 @@ parse_headers (mu_stream_t input, compose_env_t *env) | ... | @@ -856,7 +862,7 @@ parse_headers (mu_stream_t input, compose_env_t *env) |
856 | free (buf); | 862 | free (buf); |
857 | if (name) | 863 | if (name) |
858 | { | 864 | { |
859 | mu_header_set_value (header, name, value, 0); | 865 | mu_header_append (header, name, value); |
860 | free (name); | 866 | free (name); |
861 | free (value); | 867 | free (value); |
862 | } | 868 | } |
... | @@ -902,17 +908,27 @@ compose_header_set (compose_env_t *env, const char *name, | ... | @@ -902,17 +908,27 @@ compose_header_set (compose_env_t *env, const char *name, |
902 | switch (mode) | 908 | switch (mode) |
903 | { | 909 | { |
904 | case COMPOSE_REPLACE: | 910 | case COMPOSE_REPLACE: |
911 | if (is_address_field (name) | ||
912 | && mailvar_get (NULL, "inplacealiases", mailvar_type_boolean, 0) == 0) | ||
913 | { | ||
914 | char *exp = alias_expand (value); | ||
915 | status = mu_header_set_value (env->header, name, exp ? exp : value, 1); | ||
916 | free (exp); | ||
917 | } | ||
918 | else | ||
919 | status = mu_header_set_value (env->header, name, value, 1); | ||
920 | break; | ||
921 | |||
905 | case COMPOSE_APPEND: | 922 | case COMPOSE_APPEND: |
906 | if (is_address_field (name) | 923 | if (is_address_field (name) |
907 | && mailvar_get (NULL, "inplacealiases", mailvar_type_boolean, 0) == 0) | 924 | && mailvar_get (NULL, "inplacealiases", mailvar_type_boolean, 0) == 0) |
908 | { | 925 | { |
909 | char *exp = alias_expand (value); | 926 | char *exp = alias_expand (value); |
910 | status = mu_header_set_value (env->header, name, exp ? exp : value, | 927 | status = mu_header_append (env->header, name, exp ? exp : value); |
911 | mode); | ||
912 | free (exp); | 928 | free (exp); |
913 | } | 929 | } |
914 | else | 930 | else |
915 | status = mu_header_set_value (env->header, name, value, mode); | 931 | status = mu_header_append (env->header, name, value); |
916 | break; | 932 | break; |
917 | 933 | ||
918 | case COMPOSE_SINGLE_LINE: | 934 | case COMPOSE_SINGLE_LINE: | ... | ... |
... | @@ -964,7 +964,7 @@ util_header_expand (mu_header_t *phdr) | ... | @@ -964,7 +964,7 @@ util_header_expand (mu_header_t *phdr) |
964 | } | 964 | } |
965 | } | 965 | } |
966 | else | 966 | else |
967 | mu_header_set_value (hdr, name, value, 0); | 967 | mu_header_append (hdr, name, value); |
968 | } | 968 | } |
969 | 969 | ||
970 | if (errcnt == 0) | 970 | if (errcnt == 0) | ... | ... |
... | @@ -856,11 +856,11 @@ mh_annotate (mu_message_t msg, const char *field, const char *text, int date) | ... | @@ -856,11 +856,11 @@ mh_annotate (mu_message_t msg, const char *field, const char *text, int date) |
856 | tm = localtime (&t); | 856 | tm = localtime (&t); |
857 | mu_strftime (datebuf, sizeof datebuf, "%a, %d %b %Y %H:%M:%S %Z", tm); | 857 | mu_strftime (datebuf, sizeof datebuf, "%a, %d %b %Y %H:%M:%S %Z", tm); |
858 | 858 | ||
859 | mu_header_set_value (hdr, field, datebuf, 0); | 859 | mu_header_prepend (hdr, field, datebuf); |
860 | } | 860 | } |
861 | 861 | ||
862 | if (text) | 862 | if (text) |
863 | mu_header_set_value (hdr, field, text, 0); | 863 | mu_header_prepend (hdr, field, text); |
864 | mu_message_get_attribute (msg, &attr); | 864 | mu_message_get_attribute (msg, &attr); |
865 | mu_attribute_set_modified (attr); | 865 | mu_attribute_set_modified (attr); |
866 | } | 866 | } | ... | ... |
... | @@ -1944,7 +1944,7 @@ copy_header (mu_message_t msg, mu_header_t out) | ... | @@ -1944,7 +1944,7 @@ copy_header (mu_message_t msg, mu_header_t out) |
1944 | mu_header_sget_field_value (hdr, i, &value)) | 1944 | mu_header_sget_field_value (hdr, i, &value)) |
1945 | continue; | 1945 | continue; |
1946 | 1946 | ||
1947 | mu_header_set_value (out, name, value, 0); | 1947 | mu_header_append (out, name, value); |
1948 | } | 1948 | } |
1949 | } | 1949 | } |
1950 | 1950 | ||
... | @@ -2009,7 +2009,7 @@ finish_text_msg (struct compose_env *env, mu_message_t *msg, int ascii) | ... | @@ -2009,7 +2009,7 @@ finish_text_msg (struct compose_env *env, mu_message_t *msg, int ascii) |
2009 | mu_message_get_header (newmsg, &hdr); | 2009 | mu_message_get_header (newmsg, &hdr); |
2010 | copy_header (*msg, hdr); | 2010 | copy_header (*msg, hdr); |
2011 | mu_header_set_value (hdr, MU_HEADER_CONTENT_TRANSFER_ENCODING, | 2011 | mu_header_set_value (hdr, MU_HEADER_CONTENT_TRANSFER_ENCODING, |
2012 | "quoted-printable", 0); | 2012 | "quoted-printable", 1); |
2013 | 2013 | ||
2014 | mu_message_get_body (newmsg, &body); | 2014 | mu_message_get_body (newmsg, &body); |
2015 | mu_body_get_streamref (body, &output); | 2015 | mu_body_get_streamref (body, &output); | ... | ... |
... | @@ -247,7 +247,7 @@ make_draft (mu_mailbox_t mbox, int disp, struct mh_whatnow_env *wh) | ... | @@ -247,7 +247,7 @@ make_draft (mu_mailbox_t mbox, int disp, struct mh_whatnow_env *wh) |
247 | mu_message_create_copy (&tmp_msg, msg); | 247 | mu_message_create_copy (&tmp_msg, msg); |
248 | mu_message_get_header (tmp_msg, &hdr); | 248 | mu_message_get_header (tmp_msg, &hdr); |
249 | text = mu_opool_finish (fcc_pool, NULL); | 249 | text = mu_opool_finish (fcc_pool, NULL); |
250 | mu_header_set_value (hdr, MU_HEADER_FCC, text, 0); | 250 | mu_header_set_value (hdr, MU_HEADER_FCC, text, 1); |
251 | mh_format (&format, tmp_msg, msgno, width, &buf); | 251 | mh_format (&format, tmp_msg, msgno, width, &buf); |
252 | mu_message_destroy (&tmp_msg, NULL); | 252 | mu_message_destroy (&tmp_msg, NULL); |
253 | } | 253 | } | ... | ... |
... | @@ -623,7 +623,7 @@ _action_send (void *item, void *data) | ... | @@ -623,7 +623,7 @@ _action_send (void *item, void *data) |
623 | mu_header_set_value (hdr, MU_HEADER_X_MAILER, | 623 | mu_header_set_value (hdr, MU_HEADER_X_MAILER, |
624 | DEFAULT_X_MAILER, 0); | 624 | DEFAULT_X_MAILER, 0); |
625 | else if (strcmp (p, "no")) | 625 | else if (strcmp (p, "no")) |
626 | mu_header_set_value (hdr, MU_HEADER_X_MAILER, p, 0); | 626 | mu_header_remove (hdr, MU_HEADER_X_MAILER, 1); |
627 | } | 627 | } |
628 | } | 628 | } |
629 | 629 | ... | ... |
... | @@ -461,18 +461,18 @@ mimeflt input | ... | @@ -461,18 +461,18 @@ mimeflt input |
461 | [0], | 461 | [0], |
462 | [From: gray@example.net | 462 | [From: gray@example.net |
463 | Subject: Adjacent plain text contexts | 463 | Subject: Adjacent plain text contexts |
464 | Content-Type: multipart/mixed; boundary="BOUNDARY-1" | ||
465 | MIME-Version: 1.0 | 464 | MIME-Version: 1.0 |
465 | Content-Type: multipart/mixed; boundary="BOUNDARY-1" | ||
466 | 466 | ||
467 | --BOUNDARY-1 | 467 | --BOUNDARY-1 |
468 | Content-ID: 1 | ||
469 | Content-Type: text/plain | 468 | Content-Type: text/plain |
469 | Content-ID: 1 | ||
470 | 470 | ||
471 | this is the first content | 471 | this is the first content |
472 | 472 | ||
473 | --BOUNDARY-1 | 473 | --BOUNDARY-1 |
474 | Content-ID: 2 | ||
475 | Content-Type: text/plain | 474 | Content-Type: text/plain |
475 | Content-ID: 2 | ||
476 | 476 | ||
477 | and this is the second | 477 | and this is the second |
478 | 478 | ||
... | @@ -499,26 +499,26 @@ mimeflt input | ... | @@ -499,26 +499,26 @@ mimeflt input |
499 | [0], | 499 | [0], |
500 | [From: gray@example.net | 500 | [From: gray@example.net |
501 | Subject: Plaintext content types | 501 | Subject: Plaintext content types |
502 | Content-Type: multipart/mixed; boundary="BOUNDARY-1" | ||
503 | MIME-Version: 1.0 | 502 | MIME-Version: 1.0 |
503 | Content-Type: multipart/mixed; boundary="BOUNDARY-1" | ||
504 | 504 | ||
505 | --BOUNDARY-1 | 505 | --BOUNDARY-1 |
506 | Content-Description: First part | ||
507 | Content-ID: 1 | ||
508 | Content-Type: text/enriched | 506 | Content-Type: text/enriched |
507 | Content-ID: 1 | ||
508 | Content-Description: First part | ||
509 | 509 | ||
510 | this content will be tagged as text/enriched | 510 | this content will be tagged as text/enriched |
511 | 511 | ||
512 | --BOUNDARY-1 | 512 | --BOUNDARY-1 |
513 | Content-ID: 2 | ||
514 | Content-Type: text/plain | 513 | Content-Type: text/plain |
514 | Content-ID: 2 | ||
515 | 515 | ||
516 | and this content will be tagged as text/plain | 516 | and this content will be tagged as text/plain |
517 | 517 | ||
518 | --BOUNDARY-1 | 518 | --BOUNDARY-1 |
519 | Content-Description: this is a patch | ||
520 | Content-ID: 3 | ||
521 | Content-Type: application/x-patch | 519 | Content-Type: application/x-patch |
520 | Content-ID: 3 | ||
521 | Content-Description: this is a patch | ||
522 | 522 | ||
523 | and this content will be tagged as application/x-patch | 523 | and this content will be tagged as application/x-patch |
524 | 524 | ||
... | @@ -540,8 +540,8 @@ mimeflt input | ... | @@ -540,8 +540,8 @@ mimeflt input |
540 | [0], | 540 | [0], |
541 | [From: gray@example.net | 541 | [From: gray@example.net |
542 | Subject: Sharp at the beginning of a line | 542 | Subject: Sharp at the beginning of a line |
543 | Content-Type: text/plain | ||
544 | MIME-Version: 1.0 | 543 | MIME-Version: 1.0 |
544 | Content-Type: text/plain | ||
545 | 545 | ||
546 | #when sent, this line will start with only one # | 546 | #when sent, this line will start with only one # |
547 | 547 | ||
... | @@ -562,9 +562,9 @@ mimeflt input | ... | @@ -562,9 +562,9 @@ mimeflt input |
562 | [0], | 562 | [0], |
563 | [From: gray@example.net | 563 | [From: gray@example.net |
564 | Subject: Charset | 564 | Subject: Charset |
565 | Content-Transfer-Encoding: quoted-printable | ||
566 | Content-Type: text/plain; charset=utf-8 | ||
567 | MIME-Version: 1.0 | 565 | MIME-Version: 1.0 |
566 | Content-Type: text/plain; charset=utf-8 | ||
567 | Content-Transfer-Encoding: quoted-printable | ||
568 | 568 | ||
569 | Cze=C5=9B=C4=87 | 569 | Cze=C5=9B=C4=87 |
570 | 570 | ||
... | @@ -586,9 +586,9 @@ mimeflt input | ... | @@ -586,9 +586,9 @@ mimeflt input |
586 | [0], | 586 | [0], |
587 | [From: gray@example.net | 587 | [From: gray@example.net |
588 | Subject: Forwards | 588 | Subject: Forwards |
589 | Content-Description: forwarded messages | ||
590 | Content-Type: multipart/digest; boundary="BOUNDARY-1" | ||
591 | MIME-Version: 1.0 | 589 | MIME-Version: 1.0 |
590 | Content-Type: multipart/digest; boundary="BOUNDARY-1" | ||
591 | Content-Description: forwarded messages | ||
592 | 592 | ||
593 | --BOUNDARY-1 | 593 | --BOUNDARY-1 |
594 | Content-Type: message/rfc822 | 594 | Content-Type: message/rfc822 |
... | @@ -713,9 +713,9 @@ mimeflt input | ... | @@ -713,9 +713,9 @@ mimeflt input |
713 | [0], | 713 | [0], |
714 | [From: gray@example.net | 714 | [From: gray@example.net |
715 | Subject: Forwards | 715 | Subject: Forwards |
716 | Content-Description: forwarded messages | ||
717 | Content-Type: multipart/digest; boundary="BOUNDARY-1" | ||
718 | MIME-Version: 1.0 | 716 | MIME-Version: 1.0 |
717 | Content-Type: multipart/digest; boundary="BOUNDARY-1" | ||
718 | Content-Description: forwarded messages | ||
719 | 719 | ||
720 | --BOUNDARY-1 | 720 | --BOUNDARY-1 |
721 | Content-Type: message/rfc822 | 721 | Content-Type: message/rfc822 |
... | @@ -839,9 +839,9 @@ mimeflt input | ... | @@ -839,9 +839,9 @@ mimeflt input |
839 | [0], | 839 | [0], |
840 | [From: gray@example.net | 840 | [From: gray@example.net |
841 | Subject: Forwards | 841 | Subject: Forwards |
842 | Content-Description: forwarded messages | ||
843 | Content-Type: message/rfc822 | ||
844 | MIME-Version: 1.0 | 842 | MIME-Version: 1.0 |
843 | Content-Type: message/rfc822 | ||
844 | Content-Description: forwarded messages | ||
845 | 845 | ||
846 | Received: (from foobar@nonexistent.net) | 846 | Received: (from foobar@nonexistent.net) |
847 | by nonexistent.net id fBSKI8N04906 | 847 | by nonexistent.net id fBSKI8N04906 |
... | @@ -915,12 +915,12 @@ mimeflt input | ... | @@ -915,12 +915,12 @@ mimeflt input |
915 | [0], | 915 | [0], |
916 | [From: gray@example.net | 916 | [From: gray@example.net |
917 | Subject: External data | 917 | Subject: External data |
918 | Content-Type: message/external-body; name="mailutils-3.0.tar.gz"; directory="/gnu/mailutils"; site="ftp.gnu.org"; access-type=anon-ftp; mode="image" | ||
919 | MIME-Version: 1.0 | 918 | MIME-Version: 1.0 |
919 | Content-Type: message/external-body; name="mailutils-3.0.tar.gz"; directory="/gnu/mailutils"; site="ftp.gnu.org"; access-type=anon-ftp; mode="image" | ||
920 | 920 | ||
921 | Content-Description: GNU Mailutils distribution | ||
922 | Content-ID: 1 | ||
923 | Content-Type: application/octet-stream; type=tar; conversions=compress | 921 | Content-Type: application/octet-stream; type=tar; conversions=compress |
922 | Content-ID: 1 | ||
923 | Content-Description: GNU Mailutils distribution | ||
924 | 924 | ||
925 | 925 | ||
926 | ]) | 926 | ]) |
... | @@ -956,25 +956,25 @@ mimeflt input | ... | @@ -956,25 +956,25 @@ mimeflt input |
956 | [0], | 956 | [0], |
957 | [From: gray@example.net | 957 | [From: gray@example.net |
958 | Subject: Multipart | 958 | Subject: Multipart |
959 | Content-Type: multipart/mixed; boundary="BOUNDARY-1" | ||
960 | MIME-Version: 1.0 | 959 | MIME-Version: 1.0 |
960 | Content-Type: multipart/mixed; boundary="BOUNDARY-1" | ||
961 | 961 | ||
962 | --BOUNDARY-1 | 962 | --BOUNDARY-1 |
963 | Content-ID: 1 | ||
964 | Content-Type: text/plain | 963 | Content-Type: text/plain |
964 | Content-ID: 1 | ||
965 | 965 | ||
966 | Initial text part. | 966 | Initial text part. |
967 | 967 | ||
968 | 968 | ||
969 | --BOUNDARY-1 | 969 | --BOUNDARY-1 |
970 | Content-Type: multipart/mixed; boundary="BOUNDARY-2" | ||
971 | MIME-Version: 1.0 | 970 | MIME-Version: 1.0 |
971 | Content-Type: multipart/mixed; boundary="BOUNDARY-2" | ||
972 | 972 | ||
973 | --BOUNDARY-2 | 973 | --BOUNDARY-2 |
974 | Content-Description: forwarded message | ||
975 | Content-ID: 2 | ||
976 | Content-Type: message/rfc822 | ||
977 | MIME-Version: 1.0 | 974 | MIME-Version: 1.0 |
975 | Content-Type: message/rfc822 | ||
976 | Content-ID: 2 | ||
977 | Content-Description: forwarded message | ||
978 | 978 | ||
979 | Received: (from foobar@nonexistent.net) | 979 | Received: (from foobar@nonexistent.net) |
980 | by nonexistent.net id fBSKI8N04906 | 980 | by nonexistent.net id fBSKI8N04906 |
... | @@ -1025,22 +1025,22 @@ And the mome raths outgrabe. | ... | @@ -1025,22 +1025,22 @@ And the mome raths outgrabe. |
1025 | 1025 | ||
1026 | 1026 | ||
1027 | --BOUNDARY-2 | 1027 | --BOUNDARY-2 |
1028 | Content-ID: 3 | ||
1029 | Content-Type: text/plain | 1028 | Content-Type: text/plain |
1029 | Content-ID: 3 | ||
1030 | 1030 | ||
1031 | Plain text 1 | 1031 | Plain text 1 |
1032 | 1032 | ||
1033 | --BOUNDARY-2 | 1033 | --BOUNDARY-2 |
1034 | Content-ID: 4 | ||
1035 | Content-Type: text/x-special | 1034 | Content-Type: text/x-special |
1035 | Content-ID: 4 | ||
1036 | 1036 | ||
1037 | Plain text 2 | 1037 | Plain text 2 |
1038 | 1038 | ||
1039 | --BOUNDARY-2 | 1039 | --BOUNDARY-2 |
1040 | Content-Transfer-Encoding: base64 | ||
1041 | Content-Description: Tar archive | ||
1042 | Content-ID: 5 | ||
1043 | Content-Type: application/octet-stream; type=tar | 1040 | Content-Type: application/octet-stream; type=tar |
1041 | Content-ID: 5 | ||
1042 | Content-Description: Tar archive | ||
1043 | Content-Transfer-Encoding: base64 | ||
1044 | 1044 | ||
1045 | Tm90IGEgdGFyYmFsbCwgcmVhbGx5Cg== | 1045 | Tm90IGEgdGFyYmFsbCwgcmVhbGx5Cg== |
1046 | --BOUNDARY-2-- | 1046 | --BOUNDARY-2-- | ... | ... |
... | @@ -34,11 +34,11 @@ find . -name ,input | ... | @@ -34,11 +34,11 @@ find . -name ,input |
34 | [0], | 34 | [0], |
35 | [ENVELOPE FROM: mhtester@example.net | 35 | [ENVELOPE FROM: mhtester@example.net |
36 | ENVELOPE TO: <gray@example.net> | 36 | ENVELOPE TO: <gray@example.net> |
37 | 0: X-Mailer: MH (AT_PACKAGE_NAME AT_PACKAGE_VERSION) | 37 | 0: From: mhtester@example.net |
38 | 1: Date: now | 38 | 1: To: <gray@example.net> |
39 | 2: From: mhtester@example.net | 39 | 2: Subject: Send file test |
40 | 3: To: <gray@example.net> | 40 | 3: Date: now |
41 | 4: Subject: Send file test | 41 | 4: X-Mailer: MH (GNU Mailutils 3.2.91) |
42 | 5: | 42 | 5: |
43 | 6: Message body | 43 | 6: Message body |
44 | END OF MESSAGE | 44 | END OF MESSAGE |
... | @@ -73,21 +73,21 @@ find . -name ',input.[[12]]' | sort | ... | @@ -73,21 +73,21 @@ find . -name ',input.[[12]]' | sort |
73 | [0], | 73 | [0], |
74 | [ENVELOPE FROM: mhtester@example.net | 74 | [ENVELOPE FROM: mhtester@example.net |
75 | ENVELOPE TO: <gray@example.net> | 75 | ENVELOPE TO: <gray@example.net> |
76 | 0: X-Mailer: MH (AT_PACKAGE_NAME AT_PACKAGE_VERSION) | 76 | 0: From: mhtester@example.net |
77 | 1: Date: now | 77 | 1: To: <gray@example.net> |
78 | 2: From: mhtester@example.net | 78 | 2: Subject: Send file test 1 |
79 | 3: To: <gray@example.net> | 79 | 3: Date: now |
80 | 4: Subject: Send file test 1 | 80 | 4: X-Mailer: MH (GNU Mailutils 3.2.91) |
81 | 5: | 81 | 5: |
82 | 6: Message body 1 | 82 | 6: Message body 1 |
83 | END OF MESSAGE | 83 | END OF MESSAGE |
84 | ENVELOPE FROM: mhtester@example.net | 84 | ENVELOPE FROM: mhtester@example.net |
85 | ENVELOPE TO: <gray@example.org> | 85 | ENVELOPE TO: <gray@example.org> |
86 | 0: X-Mailer: MH (AT_PACKAGE_NAME AT_PACKAGE_VERSION) | 86 | 0: From: mhtester@example.net |
87 | 1: Date: now | 87 | 1: To: <gray@example.org> |
88 | 2: From: mhtester@example.net | 88 | 2: Subject: Send file test 2 |
89 | 3: To: <gray@example.org> | 89 | 3: Date: now |
90 | 4: Subject: Send file test 2 | 90 | 4: X-Mailer: MH (AT_PACKAGE_NAME AT_PACKAGE_VERSION) |
91 | 5: | 91 | 5: |
92 | 6: Message body 2 | 92 | 6: Message body 2 |
93 | END OF MESSAGE | 93 | END OF MESSAGE |
... | @@ -112,11 +112,11 @@ cat Mail/,draft | ... | @@ -112,11 +112,11 @@ cat Mail/,draft |
112 | [0], | 112 | [0], |
113 | [ENVELOPE FROM: mhtester@example.net | 113 | [ENVELOPE FROM: mhtester@example.net |
114 | ENVELOPE TO: <gray@example.net> | 114 | ENVELOPE TO: <gray@example.net> |
115 | 0: X-Mailer: MH (AT_PACKAGE_NAME AT_PACKAGE_VERSION) | 115 | 0: From: mhtester@example.net |
116 | 1: Date: now | 116 | 1: To: <gray@example.net> |
117 | 2: From: mhtester@example.net | 117 | 2: Subject: Send file test |
118 | 3: To: <gray@example.net> | 118 | 3: Date: now |
119 | 4: Subject: Send file test | 119 | 4: X-Mailer: MH (AT_PACKAGE_NAME AT_PACKAGE_VERSION) |
120 | 5: | 120 | 5: |
121 | 6: Message body | 121 | 6: Message body |
122 | END OF MESSAGE | 122 | END OF MESSAGE |
... | @@ -147,11 +147,11 @@ sed 's/: Date: .*/: Date: now/' $MTA_DIAG | ... | @@ -147,11 +147,11 @@ sed 's/: Date: .*/: Date: now/' $MTA_DIAG |
147 | [0], | 147 | [0], |
148 | [ENVELOPE FROM: mhtester@example.net | 148 | [ENVELOPE FROM: mhtester@example.net |
149 | ENVELOPE TO: <gray@example.net> | 149 | ENVELOPE TO: <gray@example.net> |
150 | 0: X-Mailer: MH (AT_PACKAGE_NAME AT_PACKAGE_VERSION) | 150 | 0: From: mhtester@example.net |
151 | 1: Date: now | 151 | 1: To: <gray@example.net> |
152 | 2: From: mhtester@example.net | 152 | 2: Subject: Draftfolder test |
153 | 3: To: <gray@example.net> | 153 | 3: Date: now |
154 | 4: Subject: Draftfolder test | 154 | 4: X-Mailer: MH (AT_PACKAGE_NAME AT_PACKAGE_VERSION) |
155 | 5: | 155 | 5: |
156 | 6: Message body | 156 | 6: Message body |
157 | END OF MESSAGE | 157 | END OF MESSAGE |
... | @@ -184,11 +184,11 @@ sed 's/: Date: .*/: Date: now/' $MTA_DIAG | ... | @@ -184,11 +184,11 @@ sed 's/: Date: .*/: Date: now/' $MTA_DIAG |
184 | [0], | 184 | [0], |
185 | [ENVELOPE FROM: mhtester@example.net | 185 | [ENVELOPE FROM: mhtester@example.net |
186 | ENVELOPE TO: <gray@example.org> | 186 | ENVELOPE TO: <gray@example.org> |
187 | 0: X-Mailer: MH (AT_PACKAGE_NAME AT_PACKAGE_VERSION) | 187 | 0: From: mhtester@example.net |
188 | 1: Date: now | 188 | 1: To: <gray@example.org> |
189 | 2: From: mhtester@example.net | 189 | 2: Subject: Draftmessage test |
190 | 3: To: <gray@example.org> | 190 | 3: Date: now |
191 | 4: Subject: Draftmessage test | 191 | 4: X-Mailer: MH (AT_PACKAGE_NAME AT_PACKAGE_VERSION) |
192 | 5: | 192 | 5: |
193 | 6: Message body | 193 | 6: Message body |
194 | END OF MESSAGE | 194 | END OF MESSAGE | ... | ... |
... | @@ -31,8 +31,8 @@ sed 's/ENVELOPE FROM:.*/ENVELOPE FROM/' ./mta.diag | ... | @@ -31,8 +31,8 @@ sed 's/ENVELOPE FROM:.*/ENVELOPE FROM/' ./mta.diag |
31 | ], | 31 | ], |
32 | [ENVELOPE FROM | 32 | [ENVELOPE FROM |
33 | ENVELOPE TO: <bug-foobar-request@example.org> | 33 | ENVELOPE TO: <bug-foobar-request@example.org> |
34 | 0: Subject: confirm 7e02c99a82a21a2349291a4f142ee2347bb5fd0b | 34 | 0: To: bug-foobar-request@example.org |
35 | 1: To: bug-foobar-request@example.org | 35 | 1: Subject: confirm 7e02c99a82a21a2349291a4f142ee2347bb5fd0b |
36 | 2: | 36 | 2: |
37 | END OF MESSAGE | 37 | END OF MESSAGE |
38 | ], | 38 | ], |
... | @@ -55,9 +55,9 @@ cat ./mta.diag | ... | @@ -55,9 +55,9 @@ cat ./mta.diag |
55 | ], | 55 | ], |
56 | [ENVELOPE FROM: sergiusz@example.org | 56 | [ENVELOPE FROM: sergiusz@example.org |
57 | ENVELOPE TO: <bug-foobar-request@example.org> | 57 | ENVELOPE TO: <bug-foobar-request@example.org> |
58 | 0: From: <sergiusz@example.org> | 58 | 0: To: bug-foobar-request@example.org |
59 | 1: Subject: confirm 7e02c99a82a21a2349291a4f142ee2347bb5fd0b | 59 | 1: Subject: confirm 7e02c99a82a21a2349291a4f142ee2347bb5fd0b |
60 | 2: To: bug-foobar-request@example.org | 60 | 2: From: <sergiusz@example.org> |
61 | 3: | 61 | 3: |
62 | END OF MESSAGE | 62 | END OF MESSAGE |
63 | ], | 63 | ], | ... | ... |
... | @@ -36,11 +36,11 @@ sed 's/ $//' ./mta.diag | ... | @@ -36,11 +36,11 @@ sed 's/ $//' ./mta.diag |
36 | [0], | 36 | [0], |
37 | [ENVELOPE FROM: coyote@desert.example.org | 37 | [ENVELOPE FROM: coyote@desert.example.org |
38 | ENVELOPE TO: <gray@gnu.org> | 38 | ENVELOPE TO: <gray@gnu.org> |
39 | 0: X-Loop-Prevention: foobar@nonexistent.net | 39 | 0: From: coyote@desert.example.org |
40 | 1: From: coyote@desert.example.org | 40 | 1: To: roadrunner@acme.example.com |
41 | 2: To: roadrunner@acme.example.com | 41 | 2: Subject: I have a present for you |
42 | 3: Subject: I have a present for you | 42 | 3: X-Caffeine: C8H10N4O2 |
43 | 4: X-Caffeine: C8H10N4O2 | 43 | 4: X-Loop-Prevention: foobar@nonexistent.net |
44 | 5: | 44 | 5: |
45 | 6: Look, I'm sorry about the whole anvil thing, and I really | 45 | 6: Look, I'm sorry about the whole anvil thing, and I really |
46 | 7: didn't mean to try and drop it on you from the top of the | 46 | 7: didn't mean to try and drop it on you from the top of the |
... | @@ -55,12 +55,12 @@ ENVELOPE TO: <gray@gnu.org> | ... | @@ -55,12 +55,12 @@ ENVELOPE TO: <gray@gnu.org> |
55 | END OF MESSAGE | 55 | END OF MESSAGE |
56 | ENVELOPE FROM: b1ff@de.res.example.com | 56 | ENVELOPE FROM: b1ff@de.res.example.com |
57 | ENVELOPE TO: <gray@gnu.org> | 57 | ENVELOPE TO: <gray@gnu.org> |
58 | 0: X-Loop-Prevention: foobar@nonexistent.net | 58 | 0: From: youcouldberich!@reply-by-postal-mail.invalid |
59 | 1: From: youcouldberich!@reply-by-postal-mail.invalid | 59 | 1: To: rube@landru.example.edu |
60 | 2: To: rube@landru.example.edu | 60 | 2: Subject: $$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$ |
61 | 3: Subject: $$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$ | 61 | 3: Date: TBD |
62 | 4: Date: TBD | 62 | 4: X-Number: 0015 |
63 | 5: X-Number: 0015 | 63 | 5: X-Loop-Prevention: foobar@nonexistent.net |
64 | 6: | 64 | 6: |
65 | 7: YOU MAY HAVE ALREADY WON TEN MILLION DOLLARS, BUT I DOUBT | 65 | 7: YOU MAY HAVE ALREADY WON TEN MILLION DOLLARS, BUT I DOUBT |
66 | 8: IT! SO JUST POST THIS TO SIX HUNDRED NEWSGROUPS! IT WILL | 66 | 8: IT! SO JUST POST THIS TO SIX HUNDRED NEWSGROUPS! IT WILL |
... | @@ -72,15 +72,15 @@ ENVELOPE TO: <gray@gnu.org> | ... | @@ -72,15 +72,15 @@ ENVELOPE TO: <gray@gnu.org> |
72 | END OF MESSAGE | 72 | END OF MESSAGE |
73 | ENVELOPE FROM: bar@dontmailme.org | 73 | ENVELOPE FROM: bar@dontmailme.org |
74 | ENVELOPE TO: <gray@gnu.org> | 74 | ENVELOPE TO: <gray@gnu.org> |
75 | 0: X-Loop-Prevention: foobar@nonexistent.net | 75 | 0: Received: (from bar@dontmailme.org) |
76 | 1: Received: (from bar@dontmailme.org) | 76 | 1: by dontmailme.org id fERKR9N16790 |
77 | 2: by dontmailme.org id fERKR9N16790 | 77 | 2: for foobar@nonexistent.net; Fri, 28 Dec 2001 22:18:08 +0200 |
78 | 3: for foobar@nonexistent.net; Fri, 28 Dec 2001 22:18:08 +0200 | 78 | 3: Date: Fri, 28 Dec 2001 23:28:08 +0200 |
79 | 4: Date: Fri, 28 Dec 2001 23:28:08 +0200 | 79 | 4: From: Bar <bar@dontmailme.org> |
80 | 5: From: Bar <bar@dontmailme.org> | 80 | 5: To: Foo Bar <foobar@nonexistent.net> |
81 | 6: To: Foo Bar <foobar@nonexistent.net> | 81 | 6: Message-Id: <200112232808.fERKR9N16790@dontmailme.org> |
82 | 7: Message-Id: <200112232808.fERKR9N16790@dontmailme.org> | 82 | 7: Subject: Coffee |
83 | 8: Subject: Coffee | 83 | 8: X-Loop-Prevention: foobar@nonexistent.net |
84 | 9: | 84 | 9: |
85 | 10: How about some coffee? | 85 | 10: How about some coffee? |
86 | END OF MESSAGE | 86 | END OF MESSAGE | ... | ... |
... | @@ -55,8 +55,8 @@ sed -f filter.sed ./mta.diag | ... | @@ -55,8 +55,8 @@ sed -f filter.sed ./mta.diag |
55 | [ENVELOPE FROM: MAILER-DAEMON@nonexistent.net | 55 | [ENVELOPE FROM: MAILER-DAEMON@nonexistent.net |
56 | ENVELOPE TO: <coyote@desert.example.org> | 56 | ENVELOPE TO: <coyote@desert.example.org> |
57 | 0: To: coyote@desert.example.org | 57 | 0: To: coyote@desert.example.org |
58 | 1: Content-Type: multipart/mixed; boundary=(boundary) | 58 | 1: MIME-Version: 1.0 |
59 | 2: MIME-Version: 1.0 | 59 | 2: Content-Type: multipart/mixed; boundary=(boundary) |
60 | 3: | 60 | 3: |
61 | 4: --(boundary) | 61 | 4: --(boundary) |
62 | 5: Content-Type: text/plain;charset=UTF-8 | 62 | 5: Content-Type: text/plain;charset=UTF-8 |
... | @@ -104,8 +104,8 @@ END OF MESSAGE | ... | @@ -104,8 +104,8 @@ END OF MESSAGE |
104 | ENVELOPE FROM: MAILER-DAEMON@nonexistent.net | 104 | ENVELOPE FROM: MAILER-DAEMON@nonexistent.net |
105 | ENVELOPE TO: <b1ff@de.res.example.com> | 105 | ENVELOPE TO: <b1ff@de.res.example.com> |
106 | 0: To: b1ff@de.res.example.com | 106 | 0: To: b1ff@de.res.example.com |
107 | 1: Content-Type: multipart/mixed; boundary=(boundary) | 107 | 1: MIME-Version: 1.0 |
108 | 2: MIME-Version: 1.0 | 108 | 2: Content-Type: multipart/mixed; boundary=(boundary) |
109 | 3: | 109 | 3: |
110 | 4: --(boundary) | 110 | 4: --(boundary) |
111 | 5: Content-Type: text/plain;charset=UTF-8 | 111 | 5: Content-Type: text/plain;charset=UTF-8 |
... | @@ -151,8 +151,8 @@ END OF MESSAGE | ... | @@ -151,8 +151,8 @@ END OF MESSAGE |
151 | ENVELOPE FROM: MAILER-DAEMON@nonexistent.net | 151 | ENVELOPE FROM: MAILER-DAEMON@nonexistent.net |
152 | ENVELOPE TO: <bar@dontmailme.org> | 152 | ENVELOPE TO: <bar@dontmailme.org> |
153 | 0: To: bar@dontmailme.org | 153 | 0: To: bar@dontmailme.org |
154 | 1: Content-Type: multipart/mixed; boundary=(boundary) | 154 | 1: MIME-Version: 1.0 |
155 | 2: MIME-Version: 1.0 | 155 | 2: Content-Type: multipart/mixed; boundary=(boundary) |
156 | 3: | 156 | 3: |
157 | 4: --(boundary) | 157 | 4: --(boundary) |
158 | 5: Content-Type: text/plain;charset=UTF-8 | 158 | 5: Content-Type: text/plain;charset=UTF-8 | ... | ... |
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment