repo.or.cz
/
arrow.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[UP] show/alert/warn for battery status.
[arrow.git]
/
testforge
/
shell
/
telnet_mail.sh
blob
98aa1643c93b3947ccc26ac5ff087142b3a714a7
1
#!/bin/sh -x
2
3
if
((
$#
!=
1
));
then
4
echo
"usage:
$0
<mail-host>"
5
exit
1
6
fi
7
8
host
=
$1
9
10
i
=
infile
11
o
=
outfile
12
13
rm
-rf
$i $o
14
mknod
$i
p
15
touch
$o
16
17
exec
7
<>
$i
18
exec
8
<>
$o
19
20
telnet
$host
25
<&
7
&
21
22
sleep
1
23
echo
"helo arrow.archss.org"
>>
$i
24
echo
"mail from:<test@arrow.archss.org>"
>>
$i
25
echo
"rcpt to:<arrow@arrow.archss.org>"
>>
$i
26
echo
"data"
>>
$i
27
echo
"Hello, this is test mail data."
>>
$i
28
echo
""
>>
$i
29
echo
"."
>>
$i
30
echo
"quit"
>>
$i