File: smtp_simple.htt

package info (click to toggle)
httest 2.4.23-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,748 kB
  • sloc: ansic: 19,551; sh: 10,550; xml: 1,047; makefile: 509; lisp: 145; perl: 31
file content (38 lines) | stat: -rw-r--r-- 674 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
INCLUDE $TOP/test/config.htb
INCLUDE $TOP/macros/smtp.htb

CLIENT
# connect to host and port same like wellknown _REQ command
_SMTP:CONNECT $YOUR_HOST $YOUR_PORT
# sending smtp command with a single line return
_SMTP:SEND "HELO bluewin.ch"
_EXPECT . "220"
_SMTP:WAIT
# sending smtp command with multiline return
_SMTP:SEND "HELP"
_EXPECT . "220"
_EXPECT . "250"
_SMTP:WAIT
_SMTP:SEND "QUIT"
_EXPECT . "220"
_SMTP:WAIT
END

SERVER $YOUR_PORT
_RES
__220 small stupid smtp test server
_FLUSH
_READLINE
__220 say HELO too
_FLUSH
_READLINE
__220-Help text 1
__220-Help text 2
__250-Help text 3
__220-Help text 4
__220-Help text 5
__220 Final
_FLUSH
_READLINE
__220 terminate
END