xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 1 | <testcase> |
| 2 | <info> |
| 3 | <keywords> |
| 4 | SMTP |
| 5 | MULTIPART |
| 6 | </keywords> |
| 7 | </info> |
| 8 | |
| 9 | # |
| 10 | # Server-side |
| 11 | <reply> |
| 12 | </reply> |
| 13 | |
| 14 | # |
| 15 | # Client-side |
| 16 | <client> |
| 17 | <features> |
| 18 | Mime |
| 19 | </features> |
| 20 | <server> |
| 21 | smtp |
| 22 | </server> |
| 23 | <name> |
| 24 | SMTP multipart with transfer content encoders |
| 25 | </name> |
| 26 | <stdin> |
| 27 | From: different
|
| 28 | To: another
|
| 29 |
|
| 30 | body
|
| 31 | </stdin> |
| 32 | <command> |
| 33 | smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -F '=This is the email inline text with a very long line containing the special character = and that should be split by encoder.;headers=Content-disposition: "inline";encoder=quoted-printable' -F "=@log/test%TESTNUMBER.txt;encoder=base64" -H "From: different" -H "To: another" |
| 34 | </command> |
| 35 | <file name="log/test%TESTNUMBER.txt"> |
| 36 | This is an attached file. |
| 37 | |
| 38 | It may contain any type of data and will be encoded in base64 for transfer. |
| 39 | </file> |
| 40 | </client> |
| 41 | |
| 42 | # |
| 43 | # Verify data after the test has been "shot" |
| 44 | <verify> |
| 45 | <strippart> |
| 46 | s/^--------------------------[a-z0-9]*/------------------------------/ |
| 47 | s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/ |
| 48 | </strippart> |
| 49 | <protocol> |
| 50 | EHLO %TESTNUMBER
|
| 51 | MAIL FROM:<sender@example.com>
|
| 52 | RCPT TO:<recipient@example.com>
|
| 53 | DATA
|
| 54 | QUIT
|
| 55 | </protocol> |
| 56 | <upload> |
| 57 | Content-Type: multipart/mixed; boundary=----------------------------
|
| 58 | Mime-Version: 1.0
|
| 59 | From: different
|
| 60 | To: another
|
| 61 |
|
| 62 | ------------------------------
|
| 63 | Content-Transfer-Encoding: quoted-printable
|
| 64 | Content-disposition: "inline"
|
| 65 |
|
| 66 | This is the email inline text with a very long line containing the special =
|
| 67 | character =3D and that should be split by encoder.
|
| 68 | ------------------------------
|
| 69 | Content-Disposition: attachment; filename="test%TESTNUMBER.txt"
|
| 70 | Content-Transfer-Encoding: base64
|
| 71 |
|
| 72 | VGhpcyBpcyBhbiBhdHRhY2hlZCBmaWxlLgoKSXQgbWF5IGNvbnRhaW4gYW55IHR5cGUgb2YgZGF0
|
| 73 | YSBhbmQgd2lsbCBiZSBlbmNvZGVkIGluIGJhc2U2NCBmb3IgdHJhbnNmZXIuCg==
|
| 74 | --------------------------------
|
| 75 | .
|
| 76 | </upload> |
| 77 | </verify> |
| 78 | </testcase> |