File: smtp-auth

package info (click to toggle)
nullmailer 1:2.2-3
  • links: PTS
  • area: main
  • in suites: buster, sid
  • size: 1,228 kB
  • sloc: cpp: 6,785; sh: 504; makefile: 221; perl: 184
file content (25 lines) | stat: -rw-r--r-- 920 bytes parent folder | download
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
. functions
export HELOHOST=f.q.d.n

# make-testmail

# start server "tcpserver -1 ::0 0 sh $srcdir/test/authtest-smtp.sh $tmpdir/smtp-result"
# catch-port server

# echo 'Testing auth success with smtp'
# echo '250 OK' > $tmpdir/smtp-result
# protocol smtp --host=localhost --port=$port --user=example --pass=example 3<$testmail

# echo 'Testing auth login success with smtp'
# echo $'350 Go ahead\n250 AUTH' > $tmpdir/smtp-result
# protocol smtp --host=localhost --port=$port --user=example --pass=example --auth-login 3<$testmail

# echo 'Testing auth temporary failure with smtp'
# echo '450 No' > $tmpdir/smtp-result
# error 16 protocol smtp --host=localhost --port $port --user=example --pass=example 3<$testmail

# echo 'Testing auth permanent failure with smtp'
# echo '550 No' > $tmpdir/smtp-result
# error 20 protocol smtp --host=localhost --port $port --user=example --pass=example 3<$testmail

# stop server