Email software tools
Email Account Polling Software
pop3 polling & email piping script
home | email server 101 | pop3 email | email piping | email account polling | contact us

Email piping is a powerful technique, which allows advanced on-the-server email processing such as sending an auto response, submitting help desk ticket, subscribing the sender to a newsletter, spam filtering etc. Unfortunately the email piping feature is not available with each and every hosting account. If your hosting provider does not support email piping, you may use an alternate technique - pop3 account polling.

The idea is pretty simple: poll an external POP3 account on a regular basis, retrieve email messages (if any), execute an email processing program and feed the message text to the program's standard input.

The Perl script, which may be executed both on Windows and UNIX servers is available from CGI-Research, a division of Eastwright Corporation.

Order the POP2PIPE Perl script.

Setup instructions.

IMPORTANT: The script requires the following Perl library to be installed on your server: Net::POP3. The module is a part of libnet package, which is installed by most hosting providers by default. However, some servers may luck the library. Please ensure you have the library installed prior to ordering the POP2PIPE script. Please feel free to cut and paste the following 6 lines long Perl script, change the very first line if needed, upload it on your server in ASCII mode as a test.cgi and execute. The script will check for the Net::POP3 library presence and will report results.

print "Content-type: text/html\n\n<html><body><center><br><br><h1>\n";
eval "use Net::POP3";
if ($@) { print "You do NOT have the Net:".":POP3 library"; }
else { print "The Net:".":POP3 library is available on your server"; }
print "</h1></center></body></html>\n";

1. Download the archive from the POP2PIPE download page.

2. Unpack the archive, it contains the following files:
  • readme.txt - setup instructions
  • test.cgi - the Net::POP3 library checking script
  • pop2pipe.cgi - the POP2PIPE script
3. Edit the pop2pipe.cgi script using text editor (e.g. NOTEPAD. Do not use editors like Microsoft Word!)
a) (UNIX servers only) Change the very first line if needed, it must contain valid path to the Perl on your server.

b) Assign your POP3 server address to the $pop3server variable (line 14)

c) Assign your POP3 server user id to the $pop3login variable (line 15)

d) Assign your POP3 server password to the $pop3passwd variable (line 16)

e) Assign the mail processing program name to the $pipe variable (line 17). Note: If it is a Perl script, on a Windows web server you may need to add name of the Perl executable in front of the program name, for example 'perl mailbox.cgi' instead of 'mailbox.cgi'. Special note for Trouble Ticket Express users: you should execute the mailbox.cgi with an -s option, that is 'mailbox.cgi -s' or 'perl mailbox.cgi -s' on Windows servers.

f) (optional) Enable logging - assign an 1 to the $debug variable (line 18), this will enable logging to the text file as specified by the $logfile variable.

4. Upload the pop2pipe.cgi to your web server in ASCII mode, chmod it to 755 (UNIX only).

5. Make sure everything is configured properly - run the script using your web browser. The script will report errors (if any). If $debug variable was set to 1, the script will also print all retreived email messages info.

6. Schedule the script for a repeated execution. If your hosting provider allows scheduling recurring tasks via crontab on UNIX or via some job planner on a Windows server, use the feature as it is the most convenient method. If no crontab or substitue features available, you may try one of the following:

a) (Windows servers only) Use 3rd party software to schedule recurrent tasks. We recommend xStarter package.

b) Link the script via SSI to a page, which receives reasonable number of hits. The SSI directive should look like

<!--#include virtual="url-path-to-the-script/pop2pipe.cgi" -->

please consult your web site manuals for detailed SSI instructions applicable to your web server.

This way the pop2pipe.cgi will be executed every time a visitor comes to the page you have placed the SSI code on. If you have a page with at least 500 hits daily the SSI trick should work well.

c) If SSI is not an option or your web site does not receive sizable traffic, you may subscribe to a web site monitoring service (just look for the "web site monitoring" term using your favourite web search service). Make sure the service uses a) multiple heartbeat servers and b) they fetch a specified URL on your server, rather than pinging your IP. As a bonus you will be alerted each time your server is down.

d) If needed our company may setup a cron job on our servers to poll pop2pipe.cgi script on your web site every 5 minutes using 2 alternate servers located in TX and NJ. We charge $4.95/mo, 6 months minimum subscription. Please feel free to contact us for more details and ordering info.

Are you sure your email messages reach your customers? Are you sure your server is not blacklisted? Get notified and act instantly the same day. Try our email blacklist monitor free!

home | email server 101 | pop3 email | email piping | email account polling | contact us