summaryrefslogtreecommitdiffstats
path: root/imap/pop3testsuite
blob: 6ce6c1e05b7f306002ed3b554549b2d12df34cda (plain)
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/bin/sh

# Maintainer's sanity check

OPTIONS=""
export OPTIONS
TZ=EST5EDT
export TZ

echo '****************************' >&2
echo '* Sanity check in progress *' >&2
echo '****************************' >&2
#test ! -d confmdtest || find confmdtest -exec chmod u+rwx {} \;
#test ! -d confmdtest2 || find confmdtest2 -exec chmod u+rwx {} \;
test ! -d confmdtest || chmod -R u+rwx confmdtest
rm -rf confmdtest
../maildir/maildirmake confmdtest || exit 1

if test "$POP3INVOKE" = ""
then
    POP3INVOKE="./pop3d.testmock"
fi

cat >confmdtest/new/msg1 <<EOF
Subject: test
From: nobody@example.com

Line 1
Line 2
Line 3
EOF
$POP3INVOKE confmdtest <<EOF
STAT
UIDL
RETR 1
TOP 1 1
EOF

cat >confmdtest/new/msg2 <<EOF
Subject: test 2
From: nobody@example.com

Line 1
Line 2
Line 3
EOF
$POP3INVOKE confmdtest <<EOF
STAT
UIDL 1
UIDL 2
TOP 1 0
EOF
mv confmdtest/cur/msg2:2, confmdtest/cur/msg2:2,S || exit 1
rm confmdtest/cur/msg1:2,S || exit 1
cat >confmdtest/new/msg3 <<EOF
Subject: test 3
From: nobody@example.com

Line 1
Line 2
Line 3
EOF
$POP3INVOKE confmdtest <<EOF
STAT
UIDL
TOP 1 0
TOP 2 0
EOF
rm confmdtest/cur/msg3:2,
$POP3INVOKE confmdtest <<EOF
STAT
EOF
cat confmdtest/courierpop3dsizelist
cat >confmdtest/new/msg4 <<EOF
Subject: test 4
From: nobody@example.com

Line 1
Line 2
Line 3
EOF
POP3DEBUGNOSAVE=1 $POP3INVOKE confmdtest <<EOF
STAT
UIDL
DELE 1
RSET
EOF
ls confmdtest/cur
rm -f confmdtest/cur/*
cat >confmdtest/new/msg5 <<EOF
Subject: test 5
From: nobody@example.com

Line 1
Line 2
Line 3
EOF
POP3DEBUGNOSAVE=1 $POP3INVOKE confmdtest <<EOF
STAT
UIDL
DELE 1
QUIT
EOF
ls confmdtest/cur
cat >confmdtest/new/msg6 <<EOF
Subject: test 6 Привет
From: nobody@example.com

Line 1
Line 2
Line 3
EOF
$POP3INVOKE confmdtest <<EOF
LIST 1
EOF
cat >confmdtest/new/msg7 <<EOF
Subject: test 7
From: nobody@example.com

Line 1
Line 2
Line 3
EOF
UTF8=0 $POP3INVOKE confmdtest <<EOF | sed 's/[1-9][0-9]* octets follow/octets follow/'
LIST
RETR 1
UTF8
RETR 1
EOF
rm -rf confmdtest