test908 883 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <testcase>
  2. <info>
  3. <keywords>
  4. SMTP
  5. SASL
  6. SASL AUTH OAUTH2
  7. RFC4954
  8. RFC6749
  9. </keywords>
  10. </info>
  11. #
  12. # Server-side
  13. <reply>
  14. <servercmd>
  15. AUTH XOAUTH2
  16. REPLY AUTH 334 XOAUTH2 supported
  17. REPLY dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB 235 Authenticated
  18. </servercmd>
  19. </reply>
  20. #
  21. # Client-side
  22. <client>
  23. <server>
  24. smtp
  25. </server>
  26. <name>
  27. SMTP OAuth 2.0 (XOAUTH2) authentication
  28. </name>
  29. <stdin>
  30. mail body
  31. </stdin>
  32. <command>
  33. smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-from sender@example.com -u user --oauth2-bearer mF_9.B5f-4.1JqM -T -
  34. </command>
  35. </client>
  36. #
  37. # Verify data after the test has been "shot"
  38. <verify>
  39. <protocol>
  40. EHLO %TESTNUMBER
  41. AUTH XOAUTH2
  42. dXNlcj11c2VyAWF1dGg9QmVhcmVyIG1GXzkuQjVmLTQuMUpxTQEB
  43. MAIL FROM:<sender@example.com>
  44. RCPT TO:<recipient@example.com>
  45. DATA
  46. QUIT
  47. </protocol>
  48. <upload>
  49. mail body
  50. .
  51. </upload>
  52. </verify>
  53. </testcase>