--- misc/mailinfo/mailinfo.pl 2001/07/19 12:19:39 1.2 +++ misc/mailinfo/mailinfo.pl 2001/07/19 14:28:22 1.3 @@ -9,7 +9,7 @@ # - T.D.Bishop@ukc.ac.uk # # $Author: tdb $ -# $Id: mailinfo.pl,v 1.2 2001/07/19 12:19:39 tdb Exp $ +# $Id: mailinfo.pl,v 1.3 2001/07/19 14:28:22 tdb Exp $ #------------------------------------------------------------ $| = 1; @@ -87,10 +87,10 @@ sub mailinfo() { PeerAddr => $server, PeerPort => $port, Proto => 'tcp' - ) or die "Cannot connect!"; + ) or die "Connection to server broken"; if(!defined $sock) { - print "unable to connect to mailinfo server: $server:$port"; + print "Connection to server broken"; exit(1); } @@ -111,7 +111,12 @@ sub mailinfo() { # read and print the response while($response ne ".\n") { $response = <$sock>; - print "$response" unless $response eq ".\n"; + if($response =~ s/^\?/mailinfo: /) { + print "$response"; + } + else { + print "$response" unless $response eq ".\n"; + } } # quit and close