0











Drizzle Internet NW

Frequently-Asked-Questions
Search Drizzle
access
signup
websitehosting
faq

How do I use Procmail to route my mail locally?

You can filter and locally reroute your e-mail using Procmail.

Uses for Procmail

  • Send spam into a black hole
  • Ignore chronic harrassers
  • Route your incoming mail to special folders

Here's how:

Create a file in your home directory called .procmailrc

You can do this when you are in the shell by typing pico, and hitting enter. Cut and paste the text below into the file, editing it to include the name of the spammer in question, then use the commands at the bottom of the screen to quit, save changes and name the file .procmailrc.

If you want to use an FTP program instead, you can create a file in a simple text editor like Simple Text or Notepad, cut and paste the text below, save it as .procmailrc, then FTP it to your account using the host drizzle.com (NOT ftp.drizzle.com).

To check whether or not the file is in there when you finish, in the shell at the name prompt, type ls -a . That should list all of your files.

Here are the scripts to cut and paste:

Copy one of the following commands for .procmailrc to carry out. (/dev/null is the place on the server where things go and never come back. It is like a black hole for files and other information.)

Send spam to a black hole

:0
* ^From.*badperson@spammer\.org

/dev/null

(badperson@spammer.org is the address from which the spam comes.)

Ignore chronic harrassers

:0
* ^From.*badperson@badperson\.com

/dev/null

(badperson@badperson.com is the address of the person whose e-mails you no longer wish to receive.)

 

If you want to block out more than one address, you can just stack the requests, one after another, with one space between them.

If you want to get rid of e-mail from a company who's spamming you with an address like "1800bagadonuts.224632394@s2u2.com" try listing the address as something like ".*1800bagadonuts.* " The .* will help you catch anything by anybody that has "bagadonuts" in the address.

 

A valuable suggestion from a trusted coworker: "When you first set up procmail, send the messages to a special folder (see below), instead of sending them to the black hole. Then you can check and make sure that you're not actually catching someone legitimate." Listen and learn.

    File mail in a special folder
    :0:
* ^TO.*special@yourdomain\.com
/home/userID/mail/special

 

 

Special@yourdomain.com is the address for e-mail that you want stored somewhere besides your inbox.

/home/userID/mail/special is the path to the folder where you wish the mail to be stored. NOTE: create the folder (in this case, a folder called "special") in the location indicated before you activate the script.

You may also combine these commands to filter mail FROM people you like to special folders by replacing the /dev/null with a path to a folder like /home/userID/mail/bestfriends. To use multiple commands, simply "stack" commands in the same .procmailrc file like this:

:0
* ^From.*someone.i.dont.like@somewhere\.org
/dev/null

:0:
* ^TO.*Special@mydomain\.net
/home/me/mail/special

 

Additional help for procmail: Timo's Procmail Tips


Quick links to other FAQ topics
faq home | dialup/modem | e-mail | dsl | web | billing | salon | shell | news | Drizzle

   
Drizzle Internet NW 14823 S.E. 82nd Dr., Clackamas, OR 97015 206-447-2702
© copyright 2003 Drizzle Media Arts, Inc.