repo.or.cz
/
smtp.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
sm*: clean up sml, smq, and smr
[smtp.git]
/
smr
blob
619943b60e638f5345eb3520da9678dc3a19dd64
1
#!/bin/sh
2
# Send queued messages
3
4
QDIR
=
"
$HOME
/.smq"
5
6
cd
"
$QDIR
"
||
exit
1
7
if
!
test -f
"`ls mail* 2>/dev/null | head -n1`"
;
then
8
echo
"no mail in
$QDIR
"
9
exit
0
10
fi
11
12
# process all mails
13
for
m
in
mail
*;
do
14
if
smtp
<
$m
;
then
15
rm
"
$m
"
16
echo
"
$m
sent successfully"
17
else
18
echo
"failed to send
$m
"
19
fi
20
done