View previous topic :: View next topic |
Author |
Message |
hilfsbremser n00b
Joined: 04 Jun 2004 Posts: 60 Location: Hamm
|
Posted: Mon Oct 18, 2004 7:35 am Post subject: moving emails without errormessage |
|
|
hi everybody!
i tried to let spamassassin learn from email that it did not sort correctly. therefore i move uncorrectly sorted email to a special folder. one an hoer sa-learn works on these email lying in a maildirfoler in my mailbox. this is done with a simple cron job.
but nw i want the mail to be moved to Trash when sa-learn finishes its work.
therefore i made another simple cron job (code beneath) which should move the files from that special folder (called FalsePositives here) to the Trash folder.
the only problem is that it is throwing me an error message if there are no files in the FalsePositives Folder. if there are some files in there everything works fine.
what can i do?
thanks for any help.
this is the little bash script for moving the files:
Code: |
#!/bin/sh
#
for file1 in $HOME/.maildir/.FalsePositives/cur/*
do
mv $file1 $HOME/.maildir/.Trash/cur/
done
#
|
and the error message says (i just recreated it from mind as did not get this message last time, because there were some files in the folder :
Code: |
mv: stat error for ,,/home/user/.maildir/.FalsePositives/cur/*" not possible:
File or directory not found
|
|
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Mon Oct 18, 2004 7:38 am Post subject: |
|
|
Silly.
Just use procmail to move those messages, it handles maildirs exceptionally well. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
hilfsbremser n00b
Joined: 04 Jun 2004 Posts: 60 Location: Hamm
|
Posted: Mon Oct 18, 2004 7:44 am Post subject: |
|
|
hi!
can i just call procmail from command line to sort those messages?
maybe with some parameters? or how would you do that?
greetz
flo |
|
Back to top |
|
|
|