On Sat, Sep 26, 1998 at 05:41:26PM -0500, Wesley Felter wrote:
> On 9/26/98 5:01 PM, christ said:
> 
> >anyone know if mail.utexas.edu supports APOP?  i believe it is a
> >"secure" pop protocol.

If you have fetchmail installed (or you have some other pop
client and you don't mind editing a couple of lines in this
script), you can make a connection through an ssh pipe using the
script I've attached.  You have to run it from a shell that is
running on top of an ssh-agent process with the necessary key
added, or it will hang (if you want to use the script and didn't
understand that last sentence, e-mail me back).

   - rick

-- 
Richard Kilgore                     |  [EMAIL PROTECTED]
Electrical & Computer Engineering   |  http://lore.ece.utexas.edu/~rkilgore/
The University of Texas at Austin   |  (512) 471-8011
#!/usr/bin/perl
#

use lib "$ENV{HOME}/lib/perl";
use opts;

$quiet = &opts::getopt("-q") || &opts::getopt("--quiet");
&opts::ignoreopts;

if ($ARGV[0] eq "" || $ARGV[1] ne "")
{  $prog=`basename $0`; chop $prog;
   die "\n   usage: $prog [ -q | --quiet ] pop_host\n\n";
}
$pophost = "$ARGV[0]";

$rc = system "ssh -n -f -L 20110:$pophost:110 $pophost sleep 20 >/dev/null 2>&1";
if ($rc != 0)
{  printf "\n   ssh failed\n\n";
   exit 1;
}
if ($quiet)
{  # system "getpop3 -t 60 >/dev/null 2>&1";
   system "fetchmail -v"
}
else
{  # system "getpop3 -t 60";
   system "fetchmail"
}

opts.pm

Reply via email to