blob: f6cfd888ca12a27be0573c79257b0df4a94a62f9 (
plain) (
blame)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
proc init-helo-mailfrom {
expect smtp ok
writeln "HELO regress"
expect smtp helo
writeln "MAIL FROM: <>"
expect smtp ok
}
# RCPT TO can't be empty
test-case name "rcptto.empty" {
call init-helo-mailfrom
writeln "RCPT TO: <>"
expect smtp permfail
}
# RCPT TO can't be empty
test-case name "rcptto.at-sign" {
call init-helo-mailfrom
writeln "RCPT TO: <@>"
expect smtp permfail
}
# Reject address without a '@'
test-case name "rcptto.no-at-sign" {
call init-helo-mailfrom
writeln "RCPT TO: <a>"
expect smtp permfail
}
# Reject address with empty domain
test-case name "rcptto.no-domain" {
call init-helo-mailfrom
writeln "RCPT TO: <a@>"
expect smtp permfail
}
# Reject address with empty user
test-case name "rcptto.no-user" {
call init-helo-mailfrom
writeln "RCPT TO: <@a>"
expect smtp permfail
}
# Accept address after source-route stripping
test-case name "rcptto.src-route" {
call init-helo-mailfrom
writeln "RCPT TO: <whatever:a@a>"
expect smtp ok
}
# Reject address with empty user after source-route stripping
test-case name "rcptto.src-route-no-user" {
call init-helo-mailfrom
writeln "RCPT TO: <a:@a>"
expect smtp permfail
}
# Reject address with space as user
test-case name "rcptto.space-as-user" {
call init-helo-mailfrom
writeln "RCPT TO: < @a>"
expect smtp permfail
}
# Reject address with space as domain
test-case name "rcptto.space-as-domain" {
call init-helo-mailfrom
writeln "RCPT TO: <a@ >"
expect smtp permfail
}
# Reject options
test-case name "rcptto.option" {
call init-helo-mailfrom
writeln "RCPT TO: <user@domain> OPT"
expect smtp permfail
}
# Reject options
test-case name "rcptto.option-size" {
call init-helo-mailfrom
writeln "RCPT TO: <user@domain> SIZE=3005"
expect smtp permfail
}
# Reject options
test-case name "rcptto.option-7bit" {
call init-helo-mailfrom
writeln "RCPT TO: <user@domain> BODY=7BIT"
expect smtp permfail
}
# Reject options
test-case name "rcptto.option-8bitmime" {
call init-helo-mailfrom
writeln "RCPT TO: <user@domain> BODY=8BITMIME"
expect smtp permfail
}
# Reject options
test-case name "rcptto.option-8bitmime-size" {
call init-helo-mailfrom
writeln "RCPT TO: <user@domain> BODY=8BITMIME"
expect smtp permfail
}
# Reject options
test-case name "rcptto.option-auth" {
call init-helo-mailfrom
writeln "RCPT TO: <user@domain> AUTH=WHATEVER"
expect smtp permfail
}
|