University of 
Pennsylvania
School of Arts & Sciences
SAS Computing servicesstaffsearchFAQ
   


How do I filter mail when using elm?

If you use elm on mail.sas, you can use the "filter" program to deal automatically with incoming mail in a number of ways: you can save messages from certain people or about certain subjects to specific folders, or you can delete mail from certain people without even having to see it.

To set up filtering, you'll need to create a file called ".forward" in your home directory, and then set up a filter-rules file.

  1. type unix and press enter

  2. type pico .forward

  3. in the .forward file, type in the following line:

    "|/pkg/bin/filter"

    type it at the very start of the file, and include the double-quotes.

  4. type ctrl-x, and type y to save changes to the file.

    If you already have a .forward file, just add the line at the beginning of the file and separate it from the forwarding address with a comma:

    "|/pkg/bin/filter", user@someother.account.edu

  5. type cd .elm

  6. type pico filter-rules

  7. Type the information below into the file:

    # $HOME/.elm/filter-rules
    #
    # filter rules for the elm filter program.
    #
    # rule 1
    #
    from "xxxxx" ? save "~/Mail/friends"
    #
    # rule 2
    from "yyyyy" ? delete
    #
    

  8. Rule 1 will save messages from xxxxx to a folder called "friends" in your Mail folder. (You can name the folder anything you'd like.)
    Rule 2 will delete any messages from yyyyy. Make sure the username or address looks like it does in the "from" line of any e-mail you've received from them. Any part of the address will work, so just the username is fine, as long as it's exact.

    If you only want to delete messages, just delete the line under "rule 1".

  9. type ctrl-x, and type y to save changes to the file.

  10. type "cd .." without the quotes

  11. type menu

    From now on, any mail from the address "xxxxx" will be automatically saved to a folder called "friends" -- you won't ever see it in your inbox. Messages with the address "yyyyy" will be deleted automatically.

    You can check this by putting your own username in first, and sending yourself mail. When you're sure you are not receiving it, take your name out.

    You can make a separate rule for each address you would like to save, or delete, or copy.


    Make a New Search

    Enter your query below to begin.



    Last modified: Friday, 13-Jun-2003 14:23:19 EDT