x
Loading
 Loading
Hello, Guest | Login | Register

Troubleshooting Your POP Server with Perl

Many of us make the mistake of limiting our own vision. We put tools or people in boxes that are too confining. Even experienced Perl programmers sometimes believe, “Perl is great for text filters,” or “Unix system administrators should use Perl to automate their work,” without seeing that Perl can do much, much more. The fact is that Perl’s virtues of expressiveness and concision apply to more than simple text manipulation or sysadmin automation.

Many of us make the mistake of limiting our own vision. We put tools or people in boxes that are too confining. Even experienced Perl programmers sometimes believe, “Perl is great for text filters,” or “Unix system administrators should use Perl to automate their work,” without seeing that Perl can do much, much more. The fact is that Perl’s virtues of expressiveness and concision apply to more than simple text manipulation or sysadmin automation.

Suppose you’re the administrator of an e-mail server. People look to you to solve their “I can’t get my messages!” complaints. You know the patterns: Users misremember their passwords, misconfigured firewalls block traffic, servers go haywire. Can Perl help?

Sure it can! Help desks are often trained to reproduce what the end user is doing. For the e-mail case, this might mean reconfiguring an e-mail client program like Netscape Communicator to duplicate what the end user is doing. Perl can help you do this much more quickly than by pointing-and-clicking, though. It’s also a lot easier to “glue” a little Perl utility together that will check this information for you.

Listing One: Complete Contents of pop-check Utility

 1 #!/usr/bin/perl 2 use Net::POP3; 3 usage(0) if “-h” eq $ARGV[0] || “-help” eq $ARGV[0]; 4 usage(1) if 2 != $#ARGV; 5 ($hostname, $account, $password) = @ARGV; 6 # Net::POP3->new () optionally takes a Timeout…

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. Helpful Tools for Software Developers
  2. The Github Hall of Fame
  3. Book'em, Github.
  4. This Week on Github: Stupid Ruby Tricks
  5. A Veritable Scatter Shot!
Follow Linux Magazine
Rackspace