22 Feb
2008
22 Feb
'08
9:22 p.m.
Raphael Bittencourt S. Costa wrote:
Andreas,
You can write a shell script to do this for you.
cd ~/Maildir/cur
for i in *; do /usr/local/libexec/dovecot/deliver -d user < $i; rm -f $i; echo "Message $i"; done
it would be safer to move the messages to another directory before running the loop, and moving the delivrered ones to another dir instead of deleting them.
cd ~/Maildir mkdir todo mkdir done cp cur/* todo for i in todo/*; do echo "Delivering message $i ..." /path/to/deliver -d user < $i && mv $i done/ done