# Basic mail handling

## Mail folders

If you receive a lot of emails, you will probably soon find that your Inbox folder is growing to the point where you have a hard time finding an email again, even if you received it just a few days ago. This is why Sylpheed-Claws, like most good mail clients, provides you with multiple possibilities in organising your mails.

You can create as many folders and subfolders as you need. For example, one folder for your family, one folder for friends, folders for mailing-lists, archive folders for old mails that you still want to have available, etc. To create a new folder, simply right-click on its parent folder and choose New folder... from the drop-down menu. If you want to create a folder 'Friends' inside your Inbox folder, for example, just right-click on the Inbox folder, choose New folder..., and type in 'Friends' in the dialogue that appears. Click the OK button, and the new folder is created.

## Folder organisation

Now that you have created folders, you can manipulate them and their contents using menu items or drag 'n' drop. Moving one folder into another, for example, can be done by right-clicking on the folder you want to move, choosing the Move folder... menu item, and selecting the destination folder. This will move the folder, with the mail it contains, to a subfolder of the chosen folder. Alternatively, you can drag a folder to another one by clicking on it, keeping the mouse pressed, moving the mouse cursor over the destination folder and releasing the button.

If you want to remove a folder and the mail it contains, simply right-click on the folder and choose Delete folder.... As this is potentially harmful, (the mails in the folder will be deleted and not recoverable), you will be asked for confirmation.

In the same manner that you move a folder to another one, you can move emails from one folder to another. The same method applies for this: either drag 'n' drop emails to a folder, or choose Move... after right-clicking on the mail. You can select multiple emails by using the Control or Shift key while clicking on them. You can also copy emails to another folder by pressing the Control key when drag'n'dropping, or by choosing Copy... from the email's contextual menu.

## Filtering

Once you have a nice folder hierarchy in place, you'll probably want Sylpheed-Claws to sort your incoming emails automatically, in order to avoid having to move messages manually each time they arrive. For this you can use the Filtering feature.

You will find the filtering preferences via the Configuration menu, Filtering item. From this dialogue you will be able to define new rules, modify or delete existing rules, re-order the rules, and enable/disable them. Filtering rules are defined by four things: the enabled status, a name, a condition, and an action. All disabled rules are simply ignored. The name format is optional, it's there to help you identify your existing rules. The condition format is an expression defining what Sylpheed-Claws should look for when filtering emails, for example: 'to matchcase sylpheed-claws-users' is for messages sent to any address containing 'sylpheed-claws-users'. You can easily define conditions by clicking the Define... button at the right of the field. The third part of a filtering rule is the action, which instructs Sylpheed-Claws what to do with emails matching the condition we just defined. For example, 'mark_as_read' marks the mail as read as soon as it arrives in your inbox, or 'move #mh/Mailbox/Friends' moves the mail to your 'Friends' subfolder. Here, too, a Define... button is available to help you define the action to take.

Once you have defined the rule, you can add it to the list of rules with the Add button. Don't forget that the order of the rules is important: if Sylpheed-Claws finds a rule suitable for an email that either moves or deletes the email, it will stop looking for further rules for that email. This is why, at the right of the rules list, you will find four buttons allowing the re-ordering of rules. The rules can also be reordered by drag 'n' drop.

There is also a quick method of creating filtering rules based on the selected message. After selecting a mail of the type you want to filter, choose Create filter rule... from the Tools menu, and choose a type from the submenu: Automatically mainly helps for mailing-lists posts, by From creates a filter based on the sender of the email, by To creates a filter based on the recipient, and by Subject creates a filter based on the subject. Each one of these types of filtering has its advantages, it's up to you to find out what would be the more practical. Usually, by From is nice to sort out your regular contacts' mails, whereas by To is more useful to sort mails sent to your different accounts.

## Searching

There are several methods for searching your emails.

One of them is relatively standard, and can be found in the Edit menu, it's the Search folder... item. This will open a window where you can specify one or more fields to search in: From, To, Subject, and Body. After having specified your criteria, click on the Back or Forward buttons to navigate through the matching emails, or use Find all to select all the matching emails at once. Be aware that searching for text in the body of emails is much slower than searching in its headers, because the body of emails isn't cached by Sylpheed-Claws.

If you're looking at a large email and want to find a particular part of it, you can use the Find in current message... item of the Edit menu. This works like search in a text document.

The last way of searching for emails is using Quick Search, which you can display or hide using the little magnifying glass under the Message List. It's also accessible from the Quick Search item of the Edit menu. Quick Search is more powerful than the normal search as it can search in standard headers (From, To, Subject) or in Extended mode using just about any criteria you can think of. When in Extended mode, the Extended symbols button is visible, enabling you to see the search syntax. A ... button is also available which allows you to quickly create a rule. You can also configure the Quick Search to search recursively through the subfolders, and whether it should reset itself when you change folders.

When you hit Enter after having specified the search string, the Message List will shrink to present you with only the matching messages. If you set the search to be recursive, any subfolder of the current one that has matching emails will change its icon to a magnifying glass icon. This way, you can search in your whole mailbox at once. If the search is in Sticky mode, the filter will stay applied when you go to another folder. This can be disturbing at first, as you can forget about it, but is useful in some cases, for example if you want to search in the body of emails and are not sure of which folder contains the searched email: a recursive search on the body of emails in a whole mailbox can be really slow.