Knowledge Base

E-Mail - Using pmproto

Important Note: The information contained in this article is still accurate with regards to the pmproto software. However, pmproto itself is obsolete, as all pair servers have been converted to My pair Account Control Center. Pmproto will continue to function, and be available, for the foreseeable future. We do recommend that all new mail recipes should be set up as described on the e-mail recipes documentation page.

pmproto is pair Networks' custom generator for setting up advanced mail forwarding. The pmproto program itself does not process mail, but it sets up configuration files (named .forward and .procmailrc) that allow the advanced mail-processing package procmail to handle mail in the manner you wish.

pmproto works by processing a special file of directives that you place in the home directory (/usr/home/username) of your account. This file is named .mailproto, and it controls how pmproto sets up your mail processing.

While you may upload this file to your account via FTP, you'll need to connect to the account via Telnet/SSH in order to run the pmproto program. For this reason, a Basic Account or higher is required.

After you have created a .mailproto file that suits your needs, you must connect to the account via Telnet/SSH and use the pmproto command. This is accomplished by simply typing `pmproto` (with no quotes) after you've logged in, and hitting return. You should see output like the following:

username@server% pmproto
Processing /usr/home/username/.mailproto...
done.
username@server%

If you do not see this output, make sure that your .mailproto file is in your home directory. If it is, and you still are having problems, contact support@pair.com.

The following is a sample .mailproto file that addresses each of pmproto's capabilities:

SAFETY
RESPOND sales salesinfo.txt COPY
FORWARD To sales bob@example.com
FOLDER To info infofile
DISCARD From evilspammer

SAFETY

If used, this command should come first. It saves a copy of all incoming mail to a file in your home directory, named SavedMail. This directive should be used only while experimenting with various forward options (to make sure no mail is accidentally discarded), and is not intended for prolonged use.

FORWARD To sales bob@example.com

This command takes mail sent to "sales", and forwards it on to bob@example.com. Please see the article on mail forwarding for more information.

RESPOND sales salesinfo.txt COPY

This command takes mail sent to "sales", autoresponds to the sender with the file "salesinfo.txt" from your home directory, and saves a copy in your mailbox. Please see the article on setting up autoresponders for detailed information.

FOLDER To info infofile

This command takes mail sent to an address, and saves it in a folder in your home directory. In this case, it takes mail sent to "info", and saves it in the file named "infofile" in your home directory .

This is similar to the action of the SAFETY directive, but allows you to specify which mail should be saved, and also the name of the file it is saved to.

With this command, you can substitute "From" for "To", in order to folder mails that are from certain addresses, rather than to an address. This is useful, for instance, to separate out mail from mailing lists.

MBOX To webmaster

This command is similar to FOLDER. It takes mail sent to an address, and saves it to your default mail spool (inbox). In this case it would save out mail sent to "webmaster" to /var/mail/USERNAME. This command is useful in conjunction with DISCARD. If you only use a few addresses in your virtual domain, you can MBOX the addresses that you want to keep and DISCARD everything else so as to avoid unwanted mails.

With this command, you can substitute "From" for "To", in order to save out mails that are from certain addresses, rather than to an address.

DISCARD From evilspammer

This command takes mail whose sender matches a certain pattern ("evilspammer", in the example above) and discards it. No copy of the mail is received by your mailbox. Because no copy of the mail is kept, this command should be used very carefully. It is probably most useful to filter out those who repeatedly send you unsolicited e-mail ("Spam").

With this command, you can also substitute "To" for "From", in order to discard mails based on what address they are coming to, rather than were they were sent from.

It is important to note that all matching done on mail is "wild-card" style. Matching is case insensitive ("hello" matches "HeLLo"), and is done on the entire e-mail address.

Because matching is done on the entire address, you must take care to make sure you are matching on unique strings. The classic example involves trying to forward based on a username that is a subset of your domain name. That is, trying to forward mail addressed to "info", when your domain is "information.com". Because "info" is a substring of "information.com", it will match all incoming mail to the domain, which is probably not your intent.

In such cases, you can make the distinction by using a full address to match, like:

FORWARD To info@information.com bob@example.com

IMPORTANT NOTES:

In order to activate changes to your .mailproto file, you must make sure to rerun pmproto after each time you make changes to it. Also, it is important not to delete the two files pmproto creates, .forward and .procmailrc, as without these files your mail forwarding will not work. If you accidentally delete or damage either of those files, simply rerun pmproto and they will be recreated.

Please provide feedback on this article.




 
Related Links
» The Basics
» Frequently Asked Questions
» E-Mail
» E-Commerce
» Promotion
» Advertising on Your Site
» Glossary
» Authoring/Development
» About Your Account
» Our Network and Servers
» Billing

» Contact Tech Support

« Knowledge Base Home