[8801] in Commercialization & Privatization of the Internet

home help back first fref pref prev next nref lref last post

Re: re-sync script

daemon@ATHENA.MIT.EDU (Larry Walker)
Sun Dec 5 11:34:19 1993

Date: Sun, 5 Dec 93 10:35:07 CST
To: com-priv@psi.com
From: walkerl@med.ge.com (Larry Walker)

>Larry, I'd actually be very interested in the shell script you use to sync
>up Eudora with Mailtool at the office.  I use MH, but so far have restricted
>myself to using remote login to read my mail when on the road because of the 
>syncing problem.  I think lot5s of people would be interested in that...
>
>                    Thanks,
>                       Milo
Milo:

No problem:

<techie mode on>

Enclosed is the script I use, for use at your own risk. It's in the
Politically-Incorrect C shell language, and doesn't make the most optimized
use of scripting over ftp (like the user login prompt still echoes on
stdout, which could be fixed by correct use of ftp cmdline args, I think.
But I do want the password to prompt at run-time...)

We have Gatorboxes that let either LocalTalk Macs get on the same TCP/IP
WAN that all our Unix servers are on. 

I start NCSA/Telnet and pop up the 'Show IP numbers' dialog box. Then I run
this script on a Sun, supplying the (dynamically assigned) IP address of my
PowerBook. 

I also keep a TechText file on my Mac desktop, containing the output of an
'ls' of my mail-folders directory on the Sun. I follow a convention in
Eudora that all mailboxes to be sync'd live under a mailbox called
"mailboxes". This gives the shell script a "root" directory from which to
'ls' the list of mailboxes (without accidently catching things like
Eudora's In and Out mailboxes). 

When I want to file mail on the PowerBook, I just use Eudora's Transfer
function, and create new mailboxes as needed under the "mailboxes" mailbox.
I can quickly pop up my list of Sun mail-folder names in TeachText when I
forget Capitalization and abbrevs.

When I'm done sync'ing, I go into Eudora's Mailboxes menu, open the
"mailboxes" mailbox and delete all mailboxes under it (since they're now
appended/copied to my Sun server).

A similar approach should work for Windows systems, but I don't know what
the equivalent step to "start NCSA/Telnet and just let it sit" is in the PC
world. (I think it involves just running the ftpd daemon that your TCP/IP
stack vendor supplies).

<techie mode off>

Back to Break of Bulk issues, note that this solution still doesn't let me
easily look things up in my Sun mail folders when I'm remote on a Mac. I
can reconnect to the network (via PPP), and run regular Unix cmdline 'mail'
with the +f option so it browses a particular folder instead of my inbox,
but that's a pain (back to unix tty mode) and it runs up connect-time $$$s.
So I sometimes use Fetch to just pull the mail-folder file back over to the
Mac, stick it in the Eudora mailboxes folder, and browse it off-line with
Eudora.

This works ok, except that Eudora takes a while to build the
table-of-contents the first time you open the mailbox. The Sept'93 archive
of com-priv ran out of memory and crashed Eudora (well, 1.7 meg _is_ a
pretty outrageous load to throw at it. The 500K Aug'93 archive worked fine
and kept me busy for a whole weekend...)

So the issue of home directory vs email feed vs email folders is still
pretty much up for grabs, as far as I can tell. Last week's <InfoWeek?
EETimes?> said Microsoft is working on an enhanced file system that will
let mobile users carry off copies of server-based files and resync
_at_the_record-level_ (not at the _file-level_ )!  This is what it will
take to get a real handle on the problem, I think...

Larry

------------ C shell script follows -----------

#!/bin/csh -b

# script to fetch Eudora mailboxes from my PB100 
# and merge them into Unix mail folder

mkdir temp
cd temp >/dev/null

echo ""
echo Telnet to this machine and check IP Address!
echo ""
echo -n "Enter PB100 ip.addr: "
set ipaddr = $<


echo ""
echo fetching mailboxes from PB100
echo ""

ftp $ipaddr <<EOF
walkerl
cd "/PB100 HD/System Folder/Eudora Folder/mailboxes"
prompt
mget *
bye
EOF

echo merging mailboxes from PB100
echo ""

rm -f *.toc

foreach file (*)

    if (-e ~/mail/$file)    then
        echo appending $file
        cat $file >> ~/mail/$file 
    else
        echo adding $file
        mv $file ~/mail
    endif
    
end

rm -f *
cd .. >/dev/null
rmdir temp

echo ""
echo mailboxes from PB100 merged
echo ""

#echo ""
#echo remember to delete mailboxes on PB100
#echo ""


exit



home help back first fref pref prev next nref lref last post