![]() |
![]() |
|
|
||
Reduced to one sentence: An auto-responder accepts an email, extracts the sender's address, and returns a response. I've set up an autoresponder you can test. An email to MasterAutoResponder@willmaster.com will cause a test email to be sent to you. So this is what happens:
In general, auto-responder programs don't care what email address you use for the special address. You decide what address is appropriate. But auto-responder programs do care that they receive the email addressed to them. The method I employ to relay email to a Perl program is with sendmail's aliases file. ("aliases" is the name of the file.) Not all hosting companies give their accounts access to their own aliases file. True UNIX virtual servers do. Many of the cheaper "virtual hosting" solutions do not. (We use iServer.com's virtual servers. For those of you who have attention on price, I have noticed that virtual servers and "virtual hosting" solutions can be similarly priced.) Although not the only method, if you have your own sendmail aliases file then I can show you how to set it up to relay email to your auto-responder program. You can ask your hosting company whether or not you have your own sendmail aliases file. Or, you can look for yourself with FTP, Telnet, or SSH. First, look in the root directory. If the file is not there, check your "etc" and "usr" directories. If you don't have those directories or you don't find the file in those, look in other likely directories. Download your aliases file with FTP as ASCII/plain text. Do all edits with an ASCII/plain text editor. (See http://MasterCGI.com/faq/ for more info.) At this point, I'm assuming you have an auto-responder program installed on your server. If not, download a copy of Master Auto-Responder from http://willmaster.com/a/8/pl.pl?prog85 for your use. The current version 1.0 is free. Later versions will probably require purchase. Decide what email address you will use for your auto-responder program.
Open the "aliases" file with your editor. The line you'll
be adding to this file is a little different from the
The location of the line you'll be adding doesn't really
matter so long as it is somewhere below the This is the line to add to your "aliases" file:
responderaddy: "|/path/to/perl /path/to/program.cgi" Now, replace:
Replace only what is specified above; keep the colon, vertical bar or "pipe", and quote characters. The line you just added relays email with the specified address to whatever follows the colon. Because the complete destination contains a space, it is enclosed within quotes. The first character of the destination is the vertical bar (sometimes called "pipe") character, which tells sendmail to pipe the email straight to whatever follows it. Incoming sent to the special address is piped to your perl installation, which then launches MasterAutoResponder.cgi (specified in the path following the space) and hands it the email to process. If you want to add a comment within the aliases file, begin the comment line with the # character. Upload your modified aliases file with FTP as ASCII/plain text. The final step is to update sendmail's database with the new information you put into the aliases file. Different servers have different procedures for this. You'll probably need to telnet or SSH to your account and run a program called "vnewalises" or "newaliases" (without the quotes). (You run the program by typing its name and pressing the Enter key.) When the program runs, it should give you a message about how many aliases your database now has. If you can't figure it out, your hosting company should be able to tell you how to do it. If you decide to download Master Auto-Responder, installation instructions are within the script. You'll be asked:
Did you enjoy the article? Once you get your auto-responder working, you might consider obtaining Master Info Relay. That program will let you put forms on your web pages that trigger your auto-responder when visitors fill in their email address. A link to the program is on the Master Auto-Responder download page. Copyright 2001 William Bontrager
| ||