Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
moving emails without errormessage
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
hilfsbremser
n00b
n00b


Joined: 04 Jun 2004
Posts: 60
Location: Hamm

PostPosted: Mon Oct 18, 2004 7:35 am    Post subject: moving emails without errormessage Reply with quote

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
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Mon Oct 18, 2004 7:38 am    Post subject: Reply with quote

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
View user's profile Send private message
hilfsbremser
n00b
n00b


Joined: 04 Jun 2004
Posts: 60
Location: Hamm

PostPosted: Mon Oct 18, 2004 7:44 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum