syncing mail and address book

Tony Baechler tony at
Fri Mar 28 17:38:29 UTC 2008

Daniel Dalton wrote:
> So how can I sync all my emails from the laptop to the desktop?
> Say if I am away and I download 200 emails how can I add these emails 
> to my messages at home on my desktop?


The rsync (1) program is your friend.  It's ideal for just such a 
purpose.  Do something like this, replacing the ip addresses and/or 
hostnames with the right ones:

rsync . for current directory, replace with ~ for home dir

rsync /var/mail/ to sync email boxes

The rsync man page is very detailed and comprehensive.  You didn't say 
what MTA you're using but I'm assuming it supports standard mbox 
format.  In that case, you could do:

rsync /var/mail/root

I don't know if the full path is necessary after the colon but it 
works.  Also, you probably want to use the -a and -v switches for 
archiving and verbose output.  rsync is great for backing up hard drives 
as well.  I'm not sure how Alpine does address books but if it's in a 
file or directory, rsync can probably mirror it.  Alternatively, if you 
have Samba working you could do it that way but rsync is probably better 
and easier.  This assumes that both computers are turned on and 
networked, but you could just as easily do it with a remote server.  
There is a site that does online backups and storage with rsync.  I 
often use it to mirror my home dir on a remote server to my local 
machine.  The uses are endless and it's really worth learning.  You 
might need the ssh-client packages installed for it to work, I'm not 
sure.  It will work with rsh but ssh is more secure.  Here is an example 
of how I mirror my home dir.  I hope this helps.

rsync -av tony at .

More information about the Blinux-list mailing list