test1187 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <testcase>
  2. <info>
  3. <keywords>
  4. SMTP
  5. MULTIPART
  6. </keywords>
  7. </info>
  8. #
  9. # Server-side
  10. <reply>
  11. </reply>
  12. #
  13. # Client-side
  14. <client>
  15. <server>
  16. smtp
  17. </server>
  18. <name>
  19. SMTP multipart with file name escaping
  20. </name>
  21. <stdin>
  22. From: different
  23. To: another
  24. body
  25. </stdin>
  26. <command>
  27. smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt [email protected] --mail-from [email protected] -F "=This is the mail text" -F '=File content;filename="strange\file\"name"'
  28. </command>
  29. </client>
  30. #
  31. # Verify data after the test has been "shot"
  32. <verify>
  33. <strippart>
  34. s/^--------------------------[a-z0-9]*/------------------------------/
  35. s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/
  36. </strippart>
  37. <protocol>
  38. EHLO %TESTNUMBER
  39. MAIL FROM:<[email protected]>
  40. RCPT TO:<[email protected]>
  41. DATA
  42. QUIT
  43. </protocol>
  44. <upload>
  45. Content-Type: multipart/mixed; boundary=----------------------------
  46. Mime-Version: 1.0
  47. ------------------------------
  48. This is the mail text
  49. ------------------------------
  50. Content-Disposition: attachment; filename="strange\\file\"name"
  51. File content
  52. --------------------------------
  53. .
  54. </upload>
  55. </verify>
  56. </testcase>