In order to use Mac OS X Mail with FastMail.FM, you'll need to enter the following information:
Many thanks to Tom Penzer and Sonic Purity for these instructions.
Launch Mail and select Preferences from the Mail menu.

In the Preferences window, click the Accounts button and then the + button in the lower left of the window:

(An equally good alternative to Steps 1 and 2 is to start Mail and select Add Account from the File menu. Either way, you will wind up in the same place, described next.)
The setup sheet will drop down from the Accounts window, starting with General Information. Set the Account Type to IMAP (or POP if your Fastmail account level supports POP and for some reason you prefer it). Set Account Description: to anything you want (or leave it alone) to name this account inside Apple Mail (as displayed in the left column of the main Mail window, and elsewhere in Mail). (What is typed in Account Description does not show up anywhere outside of the Mail program.) In the Full Name: field, enter your name as you would like it to appear in the emails you send. For Email Address:, enter your FastMail account email address as it should appear in your outgoing email messages (the address others will see and use to respond to your message).

Click the Continue button.
Incoming Mail Server information is next. In the Incoming Mail Server: field, enter 'mail.messagingengine.com'. For the User Name: field, again enter your email address at FastMail.FM. Type your password in the Password: field:

Click the Continue button.
Mail will attempt to connect to the Fastmail IMAP (or POP) server to test the connection and login information. This can happen so fast that it is almost not visible, or take a little time, depending upon network conditions. When it is visible, the middle blank area of the window below will have explanatory text that testing is underway and the "spoked wheel" progress indicator displaying.
In rare cases, Mail may not be able to successfully connect to the server. If this happens, there will be a warning message in the middle of this window, somewhat like this:

Proceed to Troubleshooting Issues at the bottom of this page.
Normally, the connection will be successful, and you will next be presented with the Outgoing Mail Server sheet.
Note: Guest users do not have access to Fastmail's 'mail.messagingengine.com' SMTP server. (Member, Full and Enhanced users do have access to the 'mail.messagingengine.com' SMTP server, so the following does not apply to them.) Guest users should instead set the Outgoing Mail Server field to your ISP's SMTP server. You should be able to find this information in your ISP's documentation. We don't have the information, so please don't email us asking what it is. Also, depending on the strictness of your ISP, you may also need to set the Email Address field in step 3 to your ISP's email address. The only way to be sure if this is required or not is to try and send an email, and if you get an error, try again after changing to your ISP's email address. Finally, if it still doesn't work, you should make sure that the Use SSL checkbox displayed in step 6 below is Not checked. If outgoing mail is still not working, you will need to contact your ISP to resolve the issue.
In the Outgoing Mail Server sheet, enter 'mail.messagingengine.com' in the Outgoing Mail Server: text field. To use the Fastmail SMTP server, you must check the Use Authentication checkbox. In the User Name: field, enter your full email address at FastMail.FM and in the Password: field, enter your FastMail.FM password.

Click the Continue button.
Mail will attempt to connect to the Fastmail SMTP server to test the connection and login information. This can happen so fast that it is almost not visible, or take a little time, depending upon network conditions. When it is visible, the middle blank area of the window below will have explanatory text that testing is underway and the "spoked wheel" progress indicator displaying.
In rare cases, Mail may not be able to successfully connect to the server. If this happens, there will be a warning message in the middle of this window. Proceed to Troubleshooting Issues at the bottom of this page.
Normally, the connection will be successful, and you will next be presented with the Outgoing Mail Security sheet. It is highly recommended that you check the Use Secure Sockets Layer (SSL) box, as this will keep your Fastmail login information and messages between your computer and Fastmail's servers (but not necessarily beyond) private.
Authentication needs to be set to Password, the only option in the list supported by Fastmail:

Click the Continue button.
Mail will now present you with an Account Summary sheet of the settings you just entered. Look them over to see if there are any obvious discrepancies. You can either go back and make adjustments, or continue and still make the adjustments later in different-looking windows with the same options. Once satisfied, click the Continue button.

One final sheet will appear, notifying you that your new account inside Mail has been created, and offering you the choice of Create Another Account (useful if you are setting up several Fastmail accounts at one time), or Done.

Now we need to do some fine-tuning and checking for best results. You will now be looking at the Accounts window in Mail Preferences, where you started. In the left column is your newly-created account. The Account Information tab will be filling most of the rest of the window. Here you will see most of what you just entered and saw in the summary sheet, displayed in a different manner:

Unless you're having problems or want to change something you just entered, there is only one item here to check now: click the Outgoing Mail Server Settings... button at the bottom of this window area.
As before, this is an Outgoing (SMTP) server setting, which only applies to customers using Fastmail's SMTP server for sending out email, and may or may not be correct for your ISP's Outgoing (SMTP) server.
A small sheet will drop down from the Accounts window. Very likely the Server port will be set to 25. You may use this default value if you wish, if it works for you, yet it very well may not work for you. Laptop users who travel will be especially likely to have problems. It is recommended that Server port be changed to 587, a newer port number for a newer standard, SMTP submission, which minimizes sending failures for you (whether at home or traveling, no matter what ISP you use for your physical Internet connection) and makes it much easier for all ISPs to fight spammers. If you find that port 587 will not work for you, please refer to this article for suggested options.
The final result should look mostly like this:

Authentication must remain set to Password. Click OK to accept the settings and dismiss the Server Settings sheet.
Click the Mailbox Behaviors tab. These settings are mostly personal preference choices. If you access your email both via the Fastmail web interface and Mail, or from multiple computers, you'll probably want most or all of the "Store ____ messages on the server" boxes checked. If your account level supports the per-user Bayesian filters and you are using them (highly recommended), you'll want "Store junk messages on the server" checked, "Delete junk messages when: One week old" (or longer), and you will need to set your Junk Mail folder in the Fastmail web interface to be your Spam training folder.

Click the Advanced tab. With one exception, generally there should be no need to change any settings here from their defaults, or what you set up earlier. The Port number should be 993 for SSL, and 143 with SSL off (unchecked), and Mail supplies these numbers automatically. Authentication must remain set to Password for Fastmail.
The one exception is the checkbox for Automatically synchronize changed mailboxes, which should be checked. This poorly documented function appeared circa Mail 1.3 for OS 10.3 Panther, is present in Mail 2 for OS 10.4 Tiger, and has been removed from Mail 3 for OS 10.5 Leopard. When checked, Mail is more diligent about checking for updates to the server mailbox (folder) structure, and updating contents and unread counts. With this box unchecked, these updates appear to only happen when the user individually clicks on a folder in Mail, or uses one of the manual synchronization options. There have been reports elsewhere that this automatic synchronization may be troublesome for dial-up users and others with a slow Internet connection, which is likely why Apple included the checkbox. It is safe to try your Mail awhile with one setting, then the other, to find if one works better for you.
Recommendations for what, if anything, to put in the IMAP Path Prefix box for best results with Fastmail has changed over time and varies with Mail versions. The current recommendation appears to be that most users of (any subversions of) Mail 2 (for OS 10.4 Tiger) and Mail 1 (for OS 10.3 Panther and earlier) will get the best results leaving this box blank. As of this writing and Leopard OS 10.5.4, the situation with Mail 3 is complicated. Mail 3 users should refer to Troubleshooting below (end of item 2A). If anything at all goes in that box, it should be INBOX, Inbox, or inbox (recommended to try those in that order) for Fastmail.

Especially if your account level supports the per-user Bayesian filters and you are using them, it is worthwhile to click over to the Junk Mail button and set the settings as follows:

This completes everything which needs to be done in any part of the Preferences window, which may now be closed. If you are using IMAP (recommended), please continue for best results. If you are using POP, you are finished at this point.
Now your Mail main window ("Viewer" window) should look something like this (other than no, or different, email messages on the right):

If you don't see any subfolders of Inbox when the triangle is pointing downwards, and they are not somewhere farther down in the left column, you have an extra step or two:
Either very quickly or after a minute or two, you should see the folders in the left column.
We now need to convince Mail that these special folders on the IMAP server need to be used for the same functions they have inside the Mail program. Select the "Trash" folder by single-clicking it in the left column. Click Mailbox -> Use This Mailbox For -> Trash. Repeat for the special mailboxes Sent and Drafts and Junk. These special folders will now be synchronized between Mail and the IMAP server.
Mail will use Inbox, Sent Items, and Drafts in the same way as FastMail.FM webmail. When you delete items however, they will not be deleted from the server. They will instead be moved to the Trash folder until you purge the trash folder. You can purge a folder by going to the Mailbox menu and selecting Erase Deleted Messages -> In All Accounts:

Or just in your Fastmail account, as you prefer. The Permanently erase deleted messages setting at the bottom of Preferences -> Accounts -> Mailbox Behaviors will allow this to happen automatically on the schedule you select there.
IMAP is a powerful protocol that allows you keep to your email synchronised, whether you're at home, at work, at a friends place or an internet cafe. You don't have to worry about what computer the email is on, because all the email is kept on the server and each client sees the same 'view' of the email. See this FAQ page to learn more about IMAP
Mail 2 and newer have a useful built-in diagnostic function, named Connection Doctor. It is accessed under the Window menu:

Connection Doctor tests each of your incoming and outgoing email accounts set up in Mail for the ability to properly connect to each respective server. It briefly describes any problems it finds at the end of testing. Here is an example Connection Doctor results window for the case of a good Internet connection, a good IMAP connection, yet a failing SMTP connection:

If Connection Doctor reports everything OK, Mail has correct basic connection abilities with each server, yet some details may or may not be optimal (folder synchronization in IMAP, for example). For more information on using Connection Doctor, check Help in the Mail program.
Some versions of Mail, notably Mail 2 (for Tiger OS 10.4), are notorious for not keeping track of passwords the user types in, under some poorly-documented conditions. If you are having trouble connecting, re-check whether or not Mail is remembering your password (even though you typed it in already): very likely you will find the Password box blank. Often, on your first attempt to check email, you will see a box like this:

Besides the window above, which you may or may not get to see, you should check Preferences -> Accounts -> Account Information. Type in the password, again, carefully and click OK. Test the connection with Connection Doctor. Normally a second entering of the password is sufficient to get Mail to remember it, though in rare cases it may require a 3rd. or even 4th. attempt. If Mail is still not remembering your password, you may want to try the following:
For Mail 3 users, the situation remains subject to change and is still under investigation as of this writing.
Last modified on: Thu 17 July 2008