Mail Filtering For Pine
Written by yangying   
April 29, 2008 16:34

This document will show you how to create filtering rules in Pine by using these examples:

  • Email From Specific Address: Moving or Deleting to Specific Folder
  • Message Header or Body Text: Moving or Deleting to Specific Folder
BEFORE YOU BEGIN
You will need:
  • to enable the Anti-Spam solution on your account. This will drastically reduce your spam.
  • to be logged in your Acad account. If you don't have an Acad account, you may create one online at the Account Center.
  • to be running Pine from Acad. The easiest way to do this is to SSH to acad.gwu.edu and type pine at the UNIX prompt. When prompted for a username and password, use your GWMail access information.
  • to know that your mouse won't work in any of Pine's menus. You will have to use arrow keys and/or the keyboard to navigate.
  • to know that the filter patterns here are not case sensitive.
1. Adding A Filter

FALSE POSITIVES: There is a good chance that some of your mail filter may delete (or move) legitimate messages. If you believe this may be possible with your filters, we recommend you at least test your delete filters with a Move first. Deleted messages cannot be restored.

FILTER NOTIFICATION: When you set your rules to delete messages or move them to folders, you will receive a brief notification at the bottom of the main Pine menu. Please test your rules after you've saved them. If you are moving messages, you will have to check the Move To folders on a regular basis.

1.1 From the main Pine menu, type s to access SETUP.

Select SETUP by typing s

1.2 This will bring you to the SETUP menu. Type r for Rules.

Type r to got to Rules

1.3 Type f for Filtering menu

Type f to got to Filters

1.4 Type a to Add a filtering rule.

Type a to Add a filter

and it will bring you to the ADD A FILTERING RULE screen:

Specify Parameters for Filtering rule

On this screen you can instruct Pine to take certain Filter Actions based on the above Patterns.

2. Email From Specific Address: Moving or Deleting to Specific Folder
2.1 In screen in 1.4 above, you can scroll to any of the fields, press enter and specify a pattern(s). In this case, I've added the following:
  • Nickname: Filter Mail From John Doe (just a name to remember the filter action by)
  • Sender pattern: johndoe@johndoe.com
Remember, these patterns are not case sensitive. In this simple case, I specified the senders email address. The more patterns you specify, the narrower your filter will get.

Specify Parameters for Filtering rule

2.2 Below the patterns, you will see several options to help you filter your mail. Leave them at their default settings.

2.3 Now, scroll to the bottom of this screen to Filter Action.

2.4.a Moving Mail: Scroll to Move and press Enter. An asterisk or * will appear next to the Move.

Select Filter Action: Move

2.4.b Next, scroll to to Folder, and press Enter. You will be prompted for the name of an existing folder or a new folder that you want messages moved to. Here, I chose the johndoe folder. Press Enter done.

2.4.c Now, type e to Exit Setup. You will be asked if you want to Commit Changes. Answer Yes by typing y. This will save your filter. And all email sent from johndoe@johndoe.com will be moved to the johndoe folder.

Type y to Commit Changes

2.5.a Deleting Mail: Scroll down using the arrow keys, to Filter Action. Scroll to Delete and press Enter. An asterisk or * will appear next to the Delete.

Select Filter Action: Delete

2.5.b Now, type e to Exit. You will be asked if you want to Commit Changes. Answer Yes by typing y. This will save your filter. And all email sent from johndoe@johndoe.com will be deleted.

Type y to Commit Changes


3. Message Header or Body Text: Moving or Deleting to Specific Folder

3.1 Follow steps 1.1 - 1.4 above to come to the ADD A FILTERING RULE screen.

Here, after picking a name for my filter (Moving Text), I went straight to the AllText Pattern and entered test, Example. This will make Pine match the words test and/or example in any email that arrives in the INBOX (default setting). To add more words to your filtering rule, simply separate them by a comma.

Type y to Commit Changes

3.2.a Moving Mail: Scroll to Move and press Enter. An asterisk or * will appear next to the Move.

Select Filter Action: Move

3.2.b Next, scroll to to Folder, and press Enter. You will be prompted for the name of an existing folder or a new folder that you want messages moved to. Here, I chose the spam folder. Press Enter done.

3.2.c Now, type e to Exit Setup. You will be asked if you want to Commit Changes. Answer Yes by typing y. This will save your filter and now all email with the words test and/or example will be moved to the spam folder.

Type y to Commit Changes

3.3.a Deleting Mail: Scroll down using the arrow keys, to Filter Action. Scroll to Delete and press Enter. An asterisk or * will appear next to the Delete.

Select Filter Action: Delete

3.3.b Now, type e to Exit. You will be asked if you want to Commit Changes. Answer Yes by typing y. This will save your filter. And all email sent from johndoe@johndoe.com will be deleted.

 


4. Parting Comments

The above two examples should give you the general idea behind adding filtering rules in Pine. Feel free to experiment with other patterns as well, especially Subject pattern.

As a rule of thumb, if you are planning on deleting messages, you should at least test the filter first with a move instead of a delete. Also remember that when using AllText pattern, the text here includes text in the message body and message headers as well, and is not case sensitive. Words and phrases should be separated by commas.


Rate This Document
Help us improve by rating the quality of this document:
low high

1

2

3

4

5
Liked or disliked this document? If you tell us why, we'll keep up the good work or improve it! Your submissions are anonymous.


If you would like a response, please send an email to the ISS Suggestion Box at suggest@gwu.edu.