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