blob: bfa70531a5a3d1c90a0f4656dbc4fc5f78c8570e [file] [log] [blame]
#!/usr/local/plan9/bin/rc
if (~ $#* 0)
echo usage: unspambox mailfs/mbox && exit "usage"
box=$1
msgs=(`{9p ls $box>[2=1]|awk '$10 ~ /[0-9][0-9]*/{print $10}'})
if (~ $#msgs 0)
echo no messages in $box && exit "none"
echo -n adding
for (m in $msgs){
echo -n ' '$m
unspam $box/$m
}