Re: How to stop ange-ftp from doing ls

Pawel Turnau (uzturnau@cyf-kr.edu.pl)
Sun, 30 Apr 1995 13:09:24 +0200 (METDST)


On 29 Apr 1995, Erik Naggum wrote:

> |   I tell rmail to use my inbox on the remote host, it loads ange-ftp and
> |   fetches the mail over to my local Linux box. Everything works fine --
> |   except that each time I do this, ange-ftp insists of getting a
> |   directory listing of /usr/mail on the remote host, and that takes
> |   impossibly long [...] Is there a way of cheating it somehow to make it
> |   skip this step?
> 
> you don't tell us _how_ you "tell rmail to use my inbox on the remote
> host".  the behavior you describe is typical of the extremely annoying
> behavior of ange-ftp when combined with the interactive filename-reading
> functions, but there's no code in rmail that does what you describe, at
> lest not that I can see.  have you tried to use `set-rmail-inbox-list' for
> your local RMAIL file?  you should then be able to `rmail-get-new-mail'
> ("g") and it should retrieve the mailbox content without further ado.
> 

I did C-u g, and then typed in the remote filename. I also tried
set-rmail-inbox-list. Same result. This is the *ftp* buffer contents:

ftp> open kinga
Connected to kinga.cyf-kr.edu.pl.
220 kinga FTP server (Version 1.7.109.9 Tue Feb  1 18:44:31 GMT 1994) ready.
user "uzturnau" Turtle Power!
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> 331 Password required for uzturnau.
230 User uzturnau logged in.
hash
ftp> Hash mark printing on (1024 bytes/hash mark).
pwd
ftp> 257 "/export/home/kinga/uzturnau" is current directory.
ftp> ls "-al /export/home/kinga/uzturnau/inbox/uzturnau+/." 
/tmp/ange-ftpa00059
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.

226 Transfer complete.
ftp> ls "-al /export/home/kinga/uzturnau/inbox/." /tmp/ange-ftpa00059
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.

226 Transfer complete.
ftp> ls "-al /usr/mail/uzturnau/." /tmp/ange-ftpa00059
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.

226 Transfer complete.
ftp> ls "-al /usr/mail/." /tmp/ange-ftpa00059
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.


(This time I somehow managed to abort ftp without hanging emacs - C-c C-\
worked).

> note, however, that mailbox locking may not work, and if you're on a slow
> link, that could cause unexpected and undesirable problems.  I suggest this
> line of action: rename the mailbox on the remote host to something else,
> possibly using ange-ftp, then use that file, instead.  obviously, you can
> put this file in a near-empty directory if the above scheme doesn't work.
> 

I am not allowed to mv the file /usr/mail/uzturnau -- I can only cp it.
But then rmail would not truncate the original file to zero length
and the next time I read in new mail I would get all the messages
repeated. Wouldn't I?

> all this may be automated, but please try it out first.
> 
> as for your problem with the ftp process.  the ftp program doesn't want to
> die with a connection that is likely to cause remains to be hanging around
> the system for a while, so it wants to die gracefully by shutting down
> everything it has created first.  this is often a major pain, but the
> alternative, to just go up in flames, can leave lingering connections that
> the other side will hate you for.
> 
> #<Erik 3008145619>
> 

Yes, you are right. I think it might have been my fault the previous
time. I may have hit C-c C-c instead of C-c C-\ and then seeing that
emacs did not abort the ftp transfer I just killed the ftp process
from another shell.

Thanks a lot for all the help. I was also considering mounting
the remote filesystem if ange-ftp refuses to cooperate.

Pawel