test1320 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <testcase>
  2. <info>
  3. <keywords>
  4. SMTP
  5. HTTP
  6. HTTP CONNECT
  7. HTTP proxy
  8. </keywords>
  9. </info>
  10. #
  11. # Server-side
  12. <reply>
  13. <connect>
  14. HTTP/1.1 200 Mighty fine indeed
  15. smtp: sure hit me
  16. </connect>
  17. </reply>
  18. #
  19. # Client-side
  20. <client>
  21. <server>
  22. smtp
  23. http-proxy
  24. </server>
  25. <features>
  26. http
  27. </features>
  28. <name>
  29. SMTP send tunneled through HTTP proxy
  30. </name>
  31. <stdin>
  32. From: different
  33. To: another
  34. body
  35. </stdin>
  36. <command>
  37. smtp://smtp.1320:%SMTPPORT/1320 --mail-rcpt recipient@example.com --mail-from sender@example.com -T - -p -x %HOSTIP:%PROXYPORT
  38. </command>
  39. </client>
  40. #
  41. # Verify data after the test has been "shot"
  42. <verify>
  43. <strip>
  44. ^User-Agent: curl/.*
  45. </strip>
  46. <protocol>
  47. EHLO 1320
  48. MAIL FROM:<sender@example.com>
  49. RCPT TO:<recipient@example.com>
  50. DATA
  51. QUIT
  52. </protocol>
  53. <upload>
  54. From: different
  55. To: another
  56. body
  57. .
  58. </upload>
  59. <proxy>
  60. CONNECT smtp.1320:%SMTPPORT HTTP/1.1
  61. Host: smtp.1320:%SMTPPORT
  62. User-Agent: curl/7.24.0-DEV (i686-pc-linux-gnu) libcurl/7.24.0-DEV OpenSSL/1.0.0e zlib/1.2.3.4 c-ares/1.7.6-DEV libidn/1.23 libssh2/1.4.0_DEV librtmp/2.2e
  63. Proxy-Connection: Keep-Alive
  64. </proxy>
  65. </verify>
  66. </testcase>