]> diplodocus.org Git - nmh/blob - test/mhmail/test-mhmail
More debugging statements for OpenBSD.
[nmh] / test / mhmail / test-mhmail
1 #!/bin/sh
2 ######################################################
3 #
4 # Test mhmail
5 #
6 ######################################################
7
8 set -e
9
10 if test -z "${MH_OBJ_DIR}"; then
11 srcdir=`dirname $0`/../..
12 MH_OBJ_DIR=`cd $srcdir && pwd`; export MH_OBJ_DIR
13 fi
14
15 . "${srcdir}/test/post/test-post-common.sh"
16
17 # Find MIME type string, using mimetypeproc if configured with it.
18 MIMETYPEPROC=`mhparam mimetypeproc`
19 file -i * # temporary, for debugging on OpenBSD
20 content_type_string() {
21 echo $1
22 echo $MIMETYPEPROC; $MIMETYPEPROC $1 # temporary, for debugging on OpenBSD
23 if test -z "$MIMETYPEPROC"; then
24 echo "text/plain; name=\"`basename $1`\"; charset=\"us-ascii\""
25 else
26 # 1) Excise leading filename followed by : and any whitespace.
27 # 2) Wrap charset value in double quotes. Assume that it isn't already.
28 printf "%s %s%s" \
29 `$MIMETYPEPROC $1 | sed -e 's/.*: *//' -e 's/\(charset=\)\(.*\)/\1"\2"/'`\
30 "; name=\"`basename $1`\""
31 fi
32 }
33
34 # Customize test_post () for use with mhmail.
35 # $1 is expected output file, provided by caller
36 # $2 is mhmail switches, except for -body
37 # $3 of -b signifies use -body switch, | signifies provide body on stdin
38 # $4 contains the message body.
39 test_mhmail ()
40 {
41 pid=`"${MH_OBJ_DIR}/test/fakesmtp" "$actual" $localport`
42
43 if [ $3 = '|' ]; then
44 printf '%s' "$4" | mhmail recipient@example.com $2 \
45 -server 127.0.0.1 -port $localport
46 else
47 mhmail recipient@example.com $2 -body "$4" \
48 -server 127.0.0.1 -port $localport
49 fi
50
51 #
52 # It's hard to calculate the exact Date: header post is going to
53 # use, so we'll just use sed to remove the actual date so we can easily
54 # compare it against our "correct" output. And same for
55 # Message-ID.
56 #
57
58 sed -e 's/^Date:.*/Date:/' \
59 -e 's/^Resent-Date:.*/Resent-Date:/' \
60 -e 's/^Message-ID:.*/Message-ID:/' "$actual" > "$actual".nodate
61 rm -f "$actual"
62
63 check "$actual".nodate "$1"
64 }
65
66 expected=$MH_TEST_DIR/test-mhmail$$.expected
67 expected_err=$MH_TEST_DIR/test-mhmail$$.expected_err
68 actual=$MH_TEST_DIR/test-mhmail$$.actual
69 actual_err=$MH_TEST_DIR/test-mhmail$$.actual_err
70
71
72 # check -help
73 # Verified behavior consistent with compiled sendmail.
74 cat >$expected <<EOF
75 Usage: mhmail [-t(o)] addrs ... [switches]
76 switches are:
77 -at(tach) file [-at(tach) file] ...
78 -b(ody) text
79 -c(c) addrs ...
80 -f(rom) addr
81 -hea(derfield) name:value [-hea(derfield) name:value] ...
82 -su(bject) text
83 -r(esent)
84 -pr(ofile)
85 -se(nd)
86 -nose(nd)
87 -v(ersion)
88 -hel(p)
89 and all post(8)/send(1) switches
90 mhmail with no arguments is equivalent to inc
91 EOF
92
93 mhmail -help >$actual 2>&1
94 check $expected $actual
95
96
97 # check -version
98 # Verified same behavior as compiled mhmail.
99 case `mhmail -v` in
100 mhmail\ --*) ;;
101 * ) printf '%s: mhmail -v generated unexpected output\n' "$0" >&2
102 failed=`expr ${failed:-0} + 1`;;
103 esac
104
105 # check for missing argument to switches that require them
106 for switch in attach body cc from headerfield subject to; do
107 run_test "mhmail recipient -$switch" \
108 "mhmail: missing argument to -$switch"
109 done
110 for switch in attach body cc from headerfield subject to; do
111 run_test "mhmail recipient -$switch -nosend" \
112 "mhmail: missing argument to -$switch"
113 done
114 for switch in attach body cc from headerfield subject to; do
115 run_test "mhmail recipient -$switch -server 127.0.0.1" \
116 "mhmail: missing argument to -$switch"
117 done
118
119
120 # check with no switches
121 # That will just run inc, which we don't want to do anything,
122 # so tell inc to just display its version.
123 # Verified same behavior as compiled mhmail.
124 printf 'inc: -version\n' >> $MH
125 case `mhmail` in
126 inc\ --*) ;;
127 * ) echo "$0: mhmail generated unexpected output" >&2
128 failed=`expr ${failed:-0} + 1`;;
129 esac
130
131
132 # check -nosend
133 # Not supported by compiled mhmail.
134 mhmail -nosend recipient@example.com -from sender1@localhost \
135 -server 127.0.0.1 -port $localport -body '' >"$actual" 2>"$actual_err"
136
137 cat > "$expected" <<EOF
138 To: recipient@example.com
139 From: sender1@localhost
140
141
142 EOF
143
144 cat > "$expected_err" <<EOF
145 EOF
146
147 check "$expected" "$actual"
148 check "$expected_err" "$actual_err"
149 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
150
151
152 # check -send
153 # Not supported by compiled mhmail.
154 cat > "$expected" <<EOF
155 EHLO nosuchhost.example.com
156 MAIL FROM:<sender2@localhost>
157 RCPT TO:<recipient@example.com>
158 DATA
159 To: recipient@example.com
160 From: sender2@localhost
161 Date:
162
163 message
164 .
165 QUIT
166 EOF
167
168 test_mhmail "$expected" "-from sender2@localhost -nosend -send" '|' message
169 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
170
171
172 # check -from
173 # Verified same behavior as compiled mhmail.
174 cat > "$expected" <<EOF
175 EHLO nosuchhost.example.com
176 MAIL FROM:<sender3@localhost>
177 RCPT TO:<recipient@example.com>
178 DATA
179 To: recipient@example.com
180 From: sender3@localhost
181 Date:
182
183 message
184 .
185 QUIT
186 EOF
187
188 test_mhmail "$expected" "-from sender3@localhost" '|' message
189 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
190
191
192 # check -from and -body
193 # Verified same behavior as compiled mhmail.
194 cat > "$expected" <<EOF
195 EHLO nosuchhost.example.com
196 MAIL FROM:<sender4@localhost>
197 RCPT TO:<recipient@example.com>
198 DATA
199 To: recipient@example.com
200 From: sender4@localhost
201 Date:
202
203 body
204 .
205 QUIT
206 EOF
207
208 test_mhmail "$expected" "-from sender4@localhost" -b body
209 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
210
211
212 # check -from and -cc
213 # Verified same behavior as compiled mhmail.
214 cat > "$expected" <<EOF
215 EHLO nosuchhost.example.com
216 MAIL FROM:<sender5@localhost>
217 RCPT TO:<recipient@example.com>
218 RCPT TO:<recipient2@example.com>
219 DATA
220 To: recipient@example.com
221 Cc: recipient2@example.com
222 From: sender5@localhost
223 Date:
224
225 message
226 .
227 QUIT
228 EOF
229
230 test_mhmail "$expected" \
231 "-from sender5@localhost -cc recipient2@example.com" '|' message
232 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
233
234
235 # check -from and multiple -cc addresses
236 # Verified same behavior as compiled mhmail.
237 cat > "$expected" <<EOF
238 EHLO nosuchhost.example.com
239 MAIL FROM:<sender6@localhost>
240 RCPT TO:<recipient@example.com>
241 RCPT TO:<recipient2@example.com>
242 RCPT TO:<recipient3@example.com>
243 RCPT TO:<recipient4@example.com>
244 DATA
245 To: recipient@example.com
246 Cc: recipient2@example.com, recipient3@example.com,
247 recipient4@example.com
248 From: sender6@localhost
249 Date:
250
251 message
252 .
253 QUIT
254 EOF
255
256 test_mhmail "$expected" \
257 '-from sender6@localhost -cc recipient2@example.com '\
258 'recipient3@example.com recipient4@example.com' '|' message
259 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
260
261
262 # check -from and -subject
263 # Verified same behavior as compiled mhmail.
264 cat > "$expected" <<EOF
265 EHLO nosuchhost.example.com
266 MAIL FROM:<sender7@localhost>
267 RCPT TO:<recipient@example.com>
268 DATA
269 To: recipient@example.com
270 Subject: Test
271 From: sender7@localhost
272 Date:
273
274 message
275 .
276 QUIT
277 EOF
278
279 test_mhmail "$expected" '-from sender7@localhost -subject Test' '|' message
280 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
281
282
283 # check -from and -profile
284 # Show that -profile causes mhmail to 1) read the profile and
285 # 2) use send(1) by added a send switch to the profile and
286 # verifying that it gets used.
287 # Not supported by compiled mhmail.
288 printf 'send: -msgid\n' >> $MH
289
290 cat > "$expected" <<EOF
291 EHLO nosuchhost.example.com
292 MAIL FROM:<sender8@localhost>
293 RCPT TO:<recipient@example.com>
294 DATA
295 To: recipient@example.com
296 From: sender8@localhost
297 Date:
298 Message-ID:
299
300 message
301 .
302 QUIT
303 EOF
304
305 test_mhmail "$expected" '-from sender8@localhost -profile' '|' message
306 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
307
308
309 # check repeated -from and -subject switches
310 # Verified same behavior as compiled mhmail.
311 cat > "$expected" <<EOF
312 EHLO nosuchhost.example.com
313 MAIL FROM:<sender9@localhost>
314 RCPT TO:<recipient@example.com>
315 DATA
316 To: recipient@example.com
317 Subject: Subject2
318 From: sender9@localhost
319 Date:
320
321 message
322 .
323 QUIT
324 EOF
325
326 test_mhmail "$expected" '-from sender9@localhost -from sender9@localhost '\
327 '-subject Subject1 -subject Subject2' -b message
328 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
329
330 # check repeated -body switches
331 # Verified same behavior as compiled mhmail.
332 cat > "$expected" <<EOF
333 EHLO nosuchhost.example.com
334 MAIL FROM:<sender10@localhost>
335 RCPT TO:<recipient@example.com>
336 DATA
337 To: recipient@example.com
338 From: sender10@localhost
339 Date:
340
341 body2
342 .
343 QUIT
344 EOF
345
346 test_mhmail "$expected" "-from sender10@localhost -body body1" -b body2
347 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
348
349
350 # check multiple -cc switches
351 # Verified same behavior as compiled mhmail.
352 cat > "$expected" <<EOF
353 EHLO nosuchhost.example.com
354 MAIL FROM:<sender11@localhost>
355 RCPT TO:<recipient@example.com>
356 RCPT TO:<cc1@example.com>
357 RCPT TO:<cc2@example.com>
358 DATA
359 To: recipient@example.com
360 Cc: cc1@example.com, cc2@example.com
361 From: sender11@localhost
362 Date:
363
364 message
365 .
366 QUIT
367 EOF
368
369 test_mhmail "$expected" \
370 '-from sender11@localhost -cc cc1@example.com -cc cc2@example.com' -b message
371 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
372
373
374 # check separated -cc arguments
375 # Verified same behavior as compiled mhmail.
376 cat > "$expected" <<EOF
377 EHLO nosuchhost.example.com
378 MAIL FROM:<sender12@localhost>
379 RCPT TO:<recipient@example.com>
380 RCPT TO:<cc1@example.com>
381 RCPT TO:<cc2@example.com>
382 DATA
383 To: recipient@example.com
384 Cc: cc1@example.com, cc2@example.com
385 Subject: Test
386 From: sender12@localhost
387 Date:
388
389 message
390 .
391 QUIT
392 EOF
393
394 test_mhmail "$expected" \
395 '-from sender12@localhost -cc cc1@example.com -subject '\
396 'Test cc2@example.com' -b message
397 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
398
399
400 # check -cc switch followed by -to switch
401 # Verified same behavior as compiled mhmail.
402 cat > "$expected" <<EOF
403 EHLO nosuchhost.example.com
404 MAIL FROM:<sender13@localhost>
405 RCPT TO:<recipient@example.com>
406 RCPT TO:<recipient2@example.com>
407 RCPT TO:<cc1@example.com>
408 DATA
409 To: recipient@example.com, recipient2@example.com
410 Cc: cc1@example.com
411 Subject: Test
412 From: sender13@localhost
413 Date:
414
415 message
416 .
417 QUIT
418 EOF
419
420 test_mhmail "$expected" \
421 "-from sender13@localhost -cc cc1@example.com -subject Test \
422 -to recipient2@example.com" \
423 -b message
424 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
425
426
427 # check with no newline on stdin
428 # Shows different behavior than compiled mhmail, which was silent in this case.
429 cat > "$expected" <<EOF
430 EOF
431
432 cat > "$expected_err" <<EOF
433 mhmail: empty message not sent, use -body '' to force.
434 EOF
435
436 set +e
437 printf '' | mhmail recipient@example.com -server 127.0.0.1 -port $localport \
438 >"$actual" 2>"$actual_err"
439 set -e
440
441 check "$expected" "$actual"
442 check "$expected_err" "$actual_err"
443 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
444
445
446 # check with one newline on stdin
447 # Verified same behavior as compiled mhmail.
448 cat > "$expected" <<EOF
449 EHLO nosuchhost.example.com
450 MAIL FROM:<sender14@localhost>
451 RCPT TO:<recipient@example.com>
452 DATA
453 To: recipient@example.com
454 From: sender14@localhost
455 Date:
456
457
458 .
459 QUIT
460 EOF
461
462 test_mhmail "$expected" '-from sender14@localhost' '|' '
463 '
464 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
465
466
467 # check with multiple newlines on stdin
468 # Verified same behavior as compiled mhmail.
469 cat > "$expected" <<EOF
470 EHLO nosuchhost.example.com
471 MAIL FROM:<sender15@localhost>
472 RCPT TO:<recipient@example.com>
473 DATA
474 To: recipient@example.com
475 From: sender15@localhost
476 Date:
477
478
479
480
481 .
482 QUIT
483 EOF
484
485 test_mhmail "$expected" '-from sender15@localhost' '|' '
486
487
488 '
489 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
490
491
492 # check with text and no trailing newline on stdin
493 # Verified same behavior as compiled mhmail.
494 cat > "$expected" <<EOF
495 EHLO nosuchhost.example.com
496 MAIL FROM:<sender16@localhost>
497 RCPT TO:<recipient@example.com>
498 DATA
499 To: recipient@example.com
500 From: sender16@localhost
501 Date:
502
503 no newline in input
504 .
505 QUIT
506 EOF
507
508 test_mhmail "$expected" '-from sender16@localhost' '|' 'no newline in input'
509 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
510
511
512 # check with text and multiple trailing blank lines on stdin
513 # Verified same behavior as compiled mhmail.
514 cat > "$expected" <<EOF
515 EHLO nosuchhost.example.com
516 MAIL FROM:<sender17@localhost>
517 RCPT TO:<recipient@example.com>
518 DATA
519 To: recipient@example.com
520 From: sender17@localhost
521 Date:
522
523 here's some text
524
525
526 .
527 QUIT
528 EOF
529
530 test_mhmail "$expected" '-from sender17@localhost' '|' "here's some text
531
532
533 "
534 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
535
536
537 # check with no newline to -body
538 # Verified same behavior as compiled mhmail.
539 cat > "$expected" <<EOF
540 EHLO nosuchhost.example.com
541 MAIL FROM:<sender18@localhost>
542 RCPT TO:<recipient@example.com>
543 DATA
544 To: recipient@example.com
545 From: sender18@localhost
546 Date:
547
548
549 .
550 QUIT
551 EOF
552
553 test_mhmail "$expected" '-from sender18@localhost' -b ''
554 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
555
556
557 # check with one newline to -body
558 # Shows different behavior than compiled mhmail, which suppressed the newline.
559 cat > "$expected" <<EOF
560 EHLO nosuchhost.example.com
561 MAIL FROM:<sender19@localhost>
562 RCPT TO:<recipient@example.com>
563 DATA
564 To: recipient@example.com
565 From: sender19@localhost
566 Date:
567
568
569
570 .
571 QUIT
572 EOF
573
574 test_mhmail "$expected" '-from sender19@localhost' -b '
575 '
576 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
577
578
579 # check with multiple newlines to -body
580 # Shows different behavior than compiled mhmail, which suppressed one
581 # of the newlines.
582 cat > "$expected" <<EOF
583 EHLO nosuchhost.example.com
584 MAIL FROM:<sender20@localhost>
585 RCPT TO:<recipient@example.com>
586 DATA
587 To: recipient@example.com
588 From: sender20@localhost
589 Date:
590
591
592
593
594
595 .
596 QUIT
597 EOF
598
599 test_mhmail "$expected" '-from sender20@localhost' -b '
600
601
602 '
603 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
604
605
606 # check with text and no trailing newline to -body
607 # Verified same behavior as compiled mhmail.
608 cat > "$expected" <<EOF
609 EHLO nosuchhost.example.com
610 MAIL FROM:<sender21@localhost>
611 RCPT TO:<recipient@example.com>
612 DATA
613 To: recipient@example.com
614 From: sender21@localhost
615 Date:
616
617 no newline in input
618 .
619 QUIT
620 EOF
621
622 test_mhmail "$expected" '-from sender21@localhost' -b 'no newline in input'
623 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
624
625
626 # check with text and multiple trailing blank lines to -body
627 # Shows different behavior than compiled mhmail, which suppressed one
628 # of the newlines.
629 cat > "$expected" <<EOF
630 EHLO nosuchhost.example.com
631 MAIL FROM:<sender22@localhost>
632 RCPT TO:<recipient@example.com>
633 DATA
634 To: recipient@example.com
635 From: sender22@localhost
636 Date:
637
638 here's some text
639
640
641 .
642 QUIT
643 EOF
644
645 test_mhmail "$expected" '-from sender22@localhost' -b "here's some text
646
647 "
648 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
649
650
651 # check -resent
652 # Verified same behavior as compiled mhmail.
653 cat > "$expected" <<EOF
654 EHLO nosuchhost.example.com
655 MAIL FROM:<orig_recipient@example.com>
656 RCPT TO:<recipient@example.com>
657 DATA
658 Resent-To: recipient@example.com
659 Resent-From: orig_recipient@example.com
660 To: recipient@example.com
661 From: sender23@localhost
662 Date:
663 Resent-Date:
664
665 please resend this message, 1
666 .
667 QUIT
668 EOF
669
670 test_mhmail "$expected" '-from orig_recipient@example.com -resent' \
671 -b 'To: recipient@example.com
672 From: sender23@localhost
673 Date: Sat Jun 16 18:35:15 -0500
674
675 please resend this message, 1'
676
677 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
678
679 # check -resent -profile, using stdin
680 # Not supported by compiled mhmail.
681 cat > "$expected" <<EOF
682 EHLO nosuchhost.example.com
683 MAIL FROM:<orig_recipient@example.com>
684 RCPT TO:<recipient@example.com>
685 DATA
686 To: recipient@example.com
687 From: sender24@localhost
688 Date:
689 Resent-To: recipient@example.com
690 Resent-From: orig_recipient@example.com
691 Resent-Date:
692
693 please resend this message, 2
694 .
695 QUIT
696 EOF
697
698 test_mhmail "$expected" \
699 '-from orig_recipient@example.com -resent -profile -nomsgid' \
700 '|' 'To: recipient@example.com
701 From: sender24@localhost
702 Date: Sat Jun 16 18:35:15 -0500
703
704 please resend this message, 2'
705
706 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
707
708
709 # check -resent -profile, using -b
710 # Not supported by compiled mhmail.
711 cat > "$expected" <<EOF
712 EHLO nosuchhost.example.com
713 MAIL FROM:<orig_recipient@example.com>
714 RCPT TO:<recipient@example.com>
715 DATA
716 To: recipient@example.com
717 From: sender25@localhost
718 Date:
719 Resent-To: recipient@example.com
720 Resent-From: orig_recipient@example.com
721 Resent-Date:
722
723 please resend this message, 3
724 .
725 QUIT
726 EOF
727
728 test_mhmail "$expected" \
729 '-from orig_recipient@example.com -resent -profile -nomsgid' \
730 -b 'To: recipient@example.com
731 From: sender25@localhost
732 Date: Sat Jun 16 18:35:15 -0500
733
734 please resend this message, 3'
735
736 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
737
738
739 # check -headerfield.
740 # Not supported by compiled mhmail.
741 cat > "$expected" <<EOF
742 EHLO nosuchhost.example.com
743 MAIL FROM:<sender26@example.com>
744 RCPT TO:<recipient@example.com>
745 DATA
746 To: recipient@example.com
747 From: sender26@example.com
748 User-Agent: nmh
749 Date:
750
751 with added header field
752 .
753 QUIT
754 EOF
755
756 test_mhmail "$expected" \
757 '-from sender26@example.com -headerfield User-Agent:nmh' \
758 -b 'with added header field'
759
760 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
761
762
763 # check multiple -headerfields.
764 # Not supported by compiled mhmail.
765 cat > "$expected" <<EOF
766 EHLO nosuchhost.example.com
767 MAIL FROM:<sender27@example.com>
768 RCPT TO:<recipient@example.com>
769 DATA
770 To: recipient@example.com
771 From: sender27@example.com
772 MIME-Version: 1.0
773 Content-Type: text/plain;charset=utf-8
774 Content-Transfer-Encoding: 8bit
775 Date:
776
777 with added header fields
778 .
779 QUIT
780 EOF
781
782 test_mhmail "$expected" \
783 "-from sender27@example.com -headerfield MIME-Version:1.0 \
784 -headerfield Content-Type:text/plain;charset=utf-8 \
785 -headerfield Content-Transfer-Encoding:8bit" \
786 -b 'with added header fields'
787
788 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
789
790
791 # check -attach
792 # Not supported by compiled mhmail.
793 cat > "$expected" <<EOF
794 EHLO nosuchhost.example.com
795 MAIL FROM:<sender28@example.com>
796 RCPT TO:<recipient@example.com>
797 DATA
798 To: recipient@example.com
799 From: sender28@example.com
800 MIME-Version: 1.0
801 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
802 Date:
803 Message-ID:
804
805 ------- =_aaaaaaaaaa0
806 Content-Type: text/plain; charset="us-ascii"
807
808 See how easy it is to add an attachment!
809
810 ------- =_aaaaaaaaaa0
811 Content-Type: `content_type_string ${srcdir}/test/mhmail/attachment.txt`
812 Content-Description: attachment.txt
813 Content-Disposition: attachment; filename="attachment.txt"
814
815 The future disappears into memory, With only a moment between,
816 Forever dwells in that moment, hope is what remains to be seen
817 Forever dwells in that moment, hope is what remains to be seen.
818
819 ------- =_aaaaaaaaaa0--
820 .
821 QUIT
822 EOF
823
824 test_mhmail "$expected" \
825 "-from sender28@example.com -attach ${srcdir}/test/mhmail/attachment.txt" \
826 -b 'See how easy it is to add an attachment!'
827
828 [ ${failed:-0} -eq 0 ] || exit ${failed:-0}
829
830
831 exit ${failed:-0}