Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Oct 1998 21:57:17 -0500
From:      Timothy J Luoma <public+FreeBSD@fdt.net>
To:        BEAUPRE Antoine <beaupran@JSP.UMontreal.CA>
Cc:        freebsd-questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Shell scripting using telnet
Message-ID:  <199811010257.VAA26488@ocalhost>
In-Reply-To: <Pine.SGI.3.96.981031173942.6421A-100000@derby.jsp.umontreal.ca>
References:  <Pine.SGI.3.96.981031173942.6421A-100000@derby.jsp.umontreal.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
	Author:	BEAUPRE Antoine <beaupran@JSP.UMontreal.CA>
	Date:	Sat, 31 Oct 1998 17:43:54 -0500 (EST)
	ID:	<Pine.SGI.3.96.981031173942.6421A-100000@derby.jsp.umontreal.ca>

> I want to fetch my mail from my ISP, but it does not allow any POP or IMAP
> connection. I can enter in telnet or ftp. And I would know how to fetch
> the mail using a combination of movemail and fetch on the remote, but I
> just can't pass commands on the other side... I tried echo "command" |
> telnet my_isp , and it didnt work.

Not exactly FBSD related, but I can answer it (reply sent to the list as  
well to save others from duplicating efforts).

telnet is interactive and cannot easily be scripted.  You could find a  
program called "expect" and do that.

However, the easier way would be to ftp the mailspool.... you should be able  
to do that automatically with ncftp and define a macro.... download the  
mailspool, then delete it on the server.

Hrm... but then you'd have to make sure to lockfile it.

Gosh this would be a lot easier if they would let you do POP....

With an expect script, you could automate a telnet session, lockfile the  
mailspool, download and delete it.... it's just that it will take some time  
to learn how to use expect.... and POP would be so much easier.

TjL


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811010257.VAA26488>