[sylpheed:30492] Re: Saving configuration

Andrei Mircea mircea.andrei at wanadoo.fr
Tue Dec 5 06:32:27 JST 2006


I think the easiest thing to do is to send you a copy of my message to John:
From: Andrei Mircea <mircea.andrei at wanadoo.fr>
To: John Gateley <j at jfoo.net>
Subject: Re: [sylpheed:30480] Re: Saving configuration
Date: Sun, 3 Dec 2006 21:06:18 +0100
X-Mailer: Sylpheed version 2.2.10 (GTK+ 2.6.10; i686-pc-mingw32)

Well, if you use IMAP then maybe you are not enthusiastical about the idea of carrying a USB stick with you. 
I put on the USB stick the different versions of the configuration files, such as are needed, e.g., on Windows vs Linux. Then on each computer I call Sylpheed through a script which copies the correct version first. As an example, this is the script I use for calling Sylpheed on a Windows computer in Lausanne, Switzerland (I commute between France and Switzerland):
------------------------------
set USBDIR=K:
set POSTADIR=%USBDIR%\posta
set MAILDIR=%USBDIR%\Mail
set MAILDIRESC=%USBDIR%\\Mail
set CONFIGDIR=%POSTADIR%\Sylpheed
copy %POSTADIR%\addrbook-000001.xml %CONFIGDIR%
copy %POSTADIR%\addrbook-000002.xml %CONFIGDIR%
copy %CONFIGDIR%\accountrc.ch %CONFIGDIR%\accountrc
%POSTADIR%\sed sXUSB/MailX%MAILDIRESC%X %POSTADIR%\folderlist.xml > %CONFIGDIR%\folderlist.xml
e:\sylpheed-2.2.10\sylpheed.exe --configdir %CONFIGDIR%
%POSTADIR%\sed sX%MAILDIRESC%XUSB/MailX %CONFIGDIR%\folderlist.xml > %POSTADIR%\folderlist.xml
copy %CONFIGDIR%\addrbook-000001.xml %POSTADIR%
copy %CONFIGDIR%\addrbook-000002.xml %POSTADIR%
-------------------------------------
Explanations:
The first line sets the environment name of the USB partition.
Lines 2-5 set the environment names of the Mail directory (you probably don't need that one) and the configuration directory (called Sylpheed) for Windows.
Line 6 puts the appropriate accountrc in place.
Line 8 calls sylpheed with the indication of the configuration directory.
Lines 7 and 9 are the hack I did for changing the header line in folderlist.xml to fit the computer and operating system. This is the main thing in the script.
The Windows version of sed, taken from cygwin, is stored in %POSTADIR% for convenience (not all my Windows machines have cygwin installed).
Now in a machine with Linux OS I would use instead of these two lines, another set. The script is more like this:
----------------------------------------
USB=sda1
USBDIR=/mnt/${USB}_removable
POSTADIR=${USBDIR}/posta
MAILDIR=${USBDIR}/Mail
CONFIGDIR=~/.sylpheed-2.0
mount -t vfat /dev/$USB $USBDIR
ln -s $POSTADIR/.sylpheed-2.0 ~
cp -f $CONFIGDIR/accountrc.ch $CONFIGDIR/accountrc
cp -f ${POSTADIR}/addrbook-000001.xml $CONFIGDIR
cp -f ${POSTADIR}/addrbook-000002.xml $CONFIGDIR
cp -f $USBDIR/wordlist.db ~/.bogofilter/wordlist.db
sed sXUSB/MailX${MAILDIR}X $POSTADIR/folderlist.xml > $CONFIGDIR/folderlist.xml
/usr/local/bin/sylpheed 
cp -f $CONFIGDIR/addrbook-000001.xml ${POSTADIR} 
cp -f $CONFIGDIR/addrbook-000002.xml ${POSTADIR} 
sed sX${MAILDIR}XUSB/MailX $CONFIGDIR/folderlist.xml > $POSTADIR/folderlist.xml
rm ~/.sylpheed-2.0
cp -f ~/.bogofilter/wordlist.db $USBDIR/wordlist.db
----------------------------------------------------------
(In this case I carry the bogofilter data base on the USB stick, while in the Windows case, I use bsfilter and I leave it on the computer in the sylpheed program directory.)
Hope this helps. I don't know if you can adapt this for several accounts on the same system (I use only one account). If you have questions (or maybe critical remarks), do not hesitate to write them. 

On Sun, 3 Dec 2006 10:12:06 -0600
John Gateley <j at jfoo.net> wrote:

> Hi Andrei,
> 
> Yes, I'd be interested in the details.
> 
> I don't need to carry a Mail directory - I use IMAP instead. But I do need to figure
> out how to get the configuration files on different machines. One thing: the configuration
> files must contain the accounts, which they may not if you are carrying the Mail directory
> around too...
> 
> Thanks,
> 
> j
> 
> On Sun, 3 Dec 2006 08:29:40 +0100
> Andrei Mircea <mircea.andrei at wanadoo.fr> wrote:
> 
> > I also run Sylpheed on several computers, Linux and Windows, in several places. However I carry the Mail directory and another directory containing configuration files with me on USB stick. On each computer, Sylpheed is launched from a different script which is adjusted to account for the local conditions (Windows or Linux, name of the stick partition...). This works well. If you are interested, I can write you the details.
> > 	Andrei 
> > 
> > 
> > On Sat, 2 Dec 2006 21:15:02 -0600
> > John Gateley <sylpheed at jfoo.net> wrote:
> > 
> > > Hi,
> > > 
> > > I run Sylpheed on (at least) 3 different computers: work/linux, work/windows
> > > and home/windows.
> > > 
> > > I've been playing with my e-mail set up, and now have several e-mail accounts
> > > too (such as sylpheed at jfoo.net). Sylpheed handles the multiple accounts
> > > gracefully.
> > > 
> > > I'd like to be able to save the configuration so that any time I change
> > > my account setup, I could just save it, send it to myself via e-mail
> > > (or web page) and start Sylpheed on the other systems with the new
> > > configuration. Otherwise, when I add an account, I have to remember
> > > to add it to all the systems.
> > > 
> > > It looks like I could just do it with tar to save the configuration
> > > files, if all the systems were linux. Unfortunately, some are windows,
> > > and I'm not sure where the windows variant is saving the configuration files.
> > > 
> > > I'm also not sure, even if I could copy the conf files, if the Windows
> > > Sylpheed could read files generated by Linux Sylpheed and vice versa.
> > > 
> > > Thanks for any help or suggestions...
> > > 
> > > j
> > > 
> 


On Mon, 4 Dec 2006 12:58:47 -0500
Bruce Bowler <bbowler at bigelow.org> wrote:

> I'm not John, but I'd be interested in the various scripts to set things
> up properly...
> 
> Bruce
> 
> On Sun, 3 Dec 2006 08:29:40 +0100
> Andrei Mircea <mircea.andrei at wanadoo.fr> put fingers to keyboard and said:
> 
> > I also run Sylpheed on several computers, Linux and Windows, in several
> > places. However I carry the Mail directory and another directory
> > containing configuration files with me on USB stick. On each computer,
> > Sylpheed is launched from a different script which is adjusted to
> > account for the local conditions (Windows or Linux, name of the stick
> > partition...). This works well. If you are interested, I can write you
> > the details. Andrei 
> > 
> > 
> > On Sat, 2 Dec 2006 21:15:02 -0600
> > John Gateley <sylpheed at jfoo.net> wrote:
> > 
> > > Hi,
> > > 
> > > I run Sylpheed on (at least) 3 different computers: work/linux,
> > > work/windows and home/windows.
> > > 
> > > I've been playing with my e-mail set up, and now have several e-mail
> > > accounts too (such as sylpheed at jfoo.net). Sylpheed handles the
> > > multiple accounts gracefully.
> > > 
> > > I'd like to be able to save the configuration so that any time I
> > > change my account setup, I could just save it, send it to myself via
> > > e-mail (or web page) and start Sylpheed on the other systems with the
> > > new configuration. Otherwise, when I add an account, I have to
> > > remember to add it to all the systems.
> > > 
> > > It looks like I could just do it with tar to save the configuration
> > > files, if all the systems were linux. Unfortunately, some are windows,
> > > and I'm not sure where the windows variant is saving the
> > > configuration files.
> > > 
> > > I'm also not sure, even if I could copy the conf files, if the Windows
> > > Sylpheed could read files generated by Linux Sylpheed and vice versa.
> > > 
> > > Thanks for any help or suggestions...
> > > 
> > > j
> > > 
> 
> 
> -- 
> +-------------------+---------------------------------------------------+
> Bruce Bowler        | I'd hate to recommend drugs, alcohol, and violence 
> 1.207.633.9600      | to anyone, but they've always worked for me --
> bbowler at bigelow.org | Hunter S. Thompson  
> +-------------------+---------------------------------------------------+
> 


More information about the Sylpheed mailing list