Thread: Claws Mail port
View Single Post
Posts: 148 | Thanked: 4 times | Joined on May 2006
#53
Originally Posted by jlbrd View Post
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).

I downloaded that backup.txt but I can't see it in folder I just saved it. Not in Xterm or in Filemanager. I can't rename from .txt to .sh and so I can't use it.

I did that Colin's command and used proper name in the command (silly me, just noticed how it should be) and it copied all to Claws but when I open the Claws and see all those folders they are empty. Still in Xterm there's all those mails in folders. Could it be that Claws can't see those files or can't open those? Jlbrd, do you have those copied mails OK in your osso-folder?