test1187 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. <features>
  16. Mime
  17. </features>
  18. <server>
  19. smtp
  20. </server>
  21. <name>
  22. SMTP multipart with file name escaping
  23. </name>
  24. <stdin>
  25. From: different
  26. To: another
  27. body
  28. </stdin>
  29. <command>
  30. smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -F "=This is the mail text" -F '=File content;filename="strange\file\"name"'
  31. </command>
  32. </client>
  33. #
  34. # Verify data after the test has been "shot"
  35. <verify>
  36. <strippart>
  37. s/^--------------------------[A-Za-z0-9]*/------------------------------/
  38. s/boundary=------------------------[A-Za-z0-9]*/boundary=----------------------------/
  39. </strippart>
  40. <protocol>
  41. EHLO %TESTNUMBER
  42. MAIL FROM:<sender@example.com>
  43. RCPT TO:<recipient@example.com>
  44. DATA
  45. QUIT
  46. </protocol>
  47. <upload>
  48. Content-Type: multipart/mixed; boundary=----------------------------
  49. Mime-Version: 1.0
  50. ------------------------------
  51. This is the mail text
  52. ------------------------------
  53. Content-Disposition: attachment; filename="strange\\file\"name"
  54. File content
  55. --------------------------------
  56. .
  57. </upload>
  58. </verify>
  59. </testcase>