How to Setup an AutoResponder
An autoresponder is a program setup to send back a particular email message in response to an email that either mentions a particular topic in its subject line or is addressed to a particular user or alias name. Autoresponders can be used for some of the following purposes:
Because Intersessions uses Procmail, an extremely flexible email processing program, two forms of autoresponders can be created and even combined. The first looks at the subject line of an incoming email. If the subject line matches your criteria then a responding text message is sent back. The second form looks at the "To:" address. If this address matches certain criteria a responding text message is sent back.
To create an autoresponder you need to upload (by FTP or create using telnet) a file named '.procmailrc' to your home directory. This is not necessarily the same directory as your html pages. Its path would be '/home/login' where 'login' is the login name for your account. Be sure to use ASCII, text or unix format when uploading and be sure to note that '.procmailrc' starts with a period. Also, be sure to read the additional notes below.
Example 1 - Send the contents of the file 'info.txt' if someone sends an email to 'info@yourdomain.com'.
Here's the '.procmailrc' file:
SHELL=/bin/sh
:0 c
* !^From +YOUR_USERNAME
* !^Subject:.*Re:
* !^FROM_DAEMON
* !^X-Loop: info@yourdomain.com
* ^TOinfo
| (formail -rI"From: info@yourdomain.com" -A"X-Loop: \
info@yourdomain.com" ; cat info.txt) | $SENDMAIL -oi -t
Your 'info.txt' file can look like this:The information you requested is .....
If you want to specify the subject of the returned email then change the last lines to:
| (formail -rI"From: info@yourdomain.com" -A"X-Loop: \
info@yourdomain.com" -I"Subject: This is the subject" ; \
cat info.txt) | $SENDMAIL -oi -t
Example 2 - Send the contents of torquewrench.txt if someone sends you an email with 'Info on torquewrenches' in the subject line.
Here's the '.procmailrc' file:
SHELL=/bin/sh
:0 h c
* !^From +YOUR_USERNAME
* !^Subject:.*Re:
* !^FROM_DAEMON
* !^X-Loop: user@yourdomain.com
* ^Subject:.*torquewrench
| (formail -rI"From: user@yourdomain.com" -A"X-Loop: \ user@yourdomain.com" ; cat info_file) | $SENDMAIL -oi -tExample 3 - Send the file 'aruba.txt' if you get an email addressed to 'aruba@yourdomain.com' and the file 'cancun.txt' if you get an email addressed to 'cancun@yourdomain.com.'
SHELL=/bin/sh
:0 h c
* !^From +YOUR_USERNAME
* !^Subject:.*Re:
* !^FROM_DAEMON
* !^X-Loop: aruba@yourdomain.com
* ^TOaruba
| (formail -rI"From: aruba@yourdomain.com" -A"X-Loop: \ aruba@yourdomain.com" ; cat aruba.txt) | $SENDMAIL -oi -t
:0 h c
* !^From +YOUR_USERNAME
* !^Subject:.*Re:
* !^FROM_DAEMON
* !^X-Loop: cancun@yourdomain.com
* ^TOcancun
| (formail -rI"From: cancun@yourdomain.com" -A"X-Loop: \ cancun@yourdomain.com" ; cat cancun.txt) | $SENDMAIL -oi -t
Additional Notes:
The email addresses used above must exist as either your login name or as an email alias that delivers email to your login email account. For example, if your login name is 'wester' and your domain name is 'south.com' then 'aruba@south.com' and 'cancun@south.com' must be setup using our email alias control panel to forward email to 'wester@south.com'. In addition, 'wester@south.com' must be setup in the email alias control panel to deliver its mail to the pop3 email account on your server.
Procmail
Procmail is an extremely flexible mail handling program. For more information on procmail, its language syntax and procmail examples see;
http://www.procmail.org/