From owner-freebsd-questions Sat Oct 31 21:46:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA13303 for freebsd-questions-outgoing; Sat, 31 Oct 1998 21:46:10 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from luomat.peak.org (port-5-ts2-gnv.da.fdt.net [209.212.132.36]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA13298 for ; Sat, 31 Oct 1998 21:46:05 -0800 (PST) (envelope-from luomat@luomat.peak.org) Message-Id: <199811010257.VAA26488@ocalhost> Content-Type: text/plain MIME-Version: 1.0 In-Reply-To: From: Timothy J Luoma Date: Sat, 31 Oct 1998 21:57:17 -0500 To: BEAUPRE Antoine Subject: Re: Shell scripting using telnet cc: freebsd-questions References: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Author: BEAUPRE Antoine Date: Sat, 31 Oct 1998 17:43:54 -0500 (EST) ID: > 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