Thread: Claws Mail port
View Single Post
Posts: 46 | Thanked: 3 times | Joined on Jan 2007
#49
I wrote this script who convert the emails in "~/apps/email/Mail/Inbox/" to a sub-directory "osso_to_claws" in a existing email box folder. This script must be launched in a xterm and must receive the name of an existing mailbox folder.
Example : You have in claws-mail a mailbox named "foo". For this mailbox, a directory "foo" exists in your home directory : ~/foo/
Launch the script by :
Code:
directory_where_script_is/back.sh foo
Below the content of the script, create a new file with this content (or download back.txt and rename to back.sh)and don't forget to apply a "chmod +x back.sh" before launch it.

Code:
#!/bin/sh
if [ -z "$1" -o ! -d ~/"$1" ] 
then
echo "please enter the name of an existing mailbox folder"
exit
fi

i=0
rm ~/$1/osso_to_claws/ -rf
mkdir ~/$1/osso_to_claws/
for file in `ls ~/apps/email/Mail/Inbox/`
do
	cp ~/apps/email/Mail/Inbox/$file ~/$1/osso_to_claws/$i
	i=$(($i + 1))
done
echo "emails saved on ~/$1/osso_to_claws"
WARNING: This script remove the sub-directory osso_to_claws in mailbox directory before recreate it.

After start Claws again, tap-and-hold on the mailbox root folder, and choose "Check for new folders". a folder "osso_to_claws" should appear containing your Osso emails.

This script rename and copy all files in "~/apps/Mail/Inbox/" with a name as "foo^Inbox^1.hdr" into "~/directory_name_received_on_parameter/osso_to_claws/" with a name as "1", "2" etc.

Say us if this script work for you (it work on my tablet).

Last edited by jlbrd; 2007-04-19 at 13:18.