senthil vel wrote:
Dear Jack,
Thanks a ton for your advice. I have developed a simple script
to do that.
#!/bin/bash
find /home/vpopmail/domains/test.com/test/Maildir/new -type f -print0
| xargs -0 grep -l 'Subject: The Subject of the mail' > temp.txt
tobmoved=`cat temp.txt`
mv "$tobmoved" /home/vpopmail/domains/test.com/test1/Maildir/cur
And put it in Cron.
My crontab -e looks like this
* 4 * * * sh /root/mail1.sh
At morning 4 oclock the script will run.
It is working fine. My little hesitation is the temp.txt. Can we do
the same without any temp file? Can you help on this?
It can be done, but it would be easier just to add:
rm -f temp.txt
to the script.
---------------------------------------------------------------------
QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]