FastMail.FM FAQ - Rules

Once you are done reading this FAQ information, you may simply close this window

Questions

  1. What does the 'Define Rules' screen let me do?
  2. I changed some rules on the 'Define Rules' screen, but they don't work?
  3. I want to create some more complex set of rules. What can I do?
  4. Um, not quite that complex!
  5. What does the 'Message with' part of Define Rules mean?
  6. What does the 'Order' column in the 'Define Rules' screen do?
  7. What does the 'Forward type' column in the 'Define Rules' screen do?
  8. Can I forward only part of a message as an SMS?
  9. What's the order of Sieve rules automatically generated by Rules screen forms?
  10. How do I tell what address an email was delivered to?

Answers

  1. What does the 'Define Rules' screen let me do?
  2. The 'Define Rules' screen lets you setup rules to control what happens when email is delivered to your account. There are several sections to the screen:

    The rules from all sections are combined together when processing incoming emails.

    Top

  3. I changed some rules on the 'Define Rules' screen, but they don't work?
  4. When you make any changes on the 'Define Rules' screen, you must make sure you click the 'Done' button at the top of the screen. Clicking 'Back' in your browser or the 'Cancel' button will not work. The 'Done' button forces a rebuild of the internal rules script, which is what FastMail.FM actually uses. See this for more details.

    Top

  5. I want to create some more complex set of rules. What can I do?
  6. Internally, FastMail.FM actually uses the powerful 'sieve' filtering language. The 'Define Rules' screen just provides an easier way to build this sieve script. You can however directly edit this script to create more complex rule sets. To do this, you click the 'View filter source' link at the bottom of the 'Define Rules' screen.

    For more details on sieve, see:

    Top

  7. Um, not quite that complex!
  8. We do support slightly more complicated behaviour than is accessible on the Rules screen, but you need some incantations in the 'Text' field to trigger it.

    NOTEUsing any of these forms in the 'Text' field will cause the 'That' drop down to be ignored. Because of this it will be replaced with a text string next time you load the page.

    Top

  9. What does the 'Message with' part of Define Rules mean?
  10. When an e-mail is sent it consists of two parts, a 'Headers' and a 'Body'. The Body is the part with the actual message, the headers are the part where information like sender, recipient, date and time of sending and what server it was sent through, among other things. The Rules for filtering mail work by looking through these headers to see if there is a match with any of the rules. The various options in 'Message with' each examine a different part of the headers.


    Subject
    Looks in the Subject part of the headers, this is the subject that you see in the Mailbox view.
    To/CC
    Looks in the 'To' or 'CC' part of the headers. 'To' is the address the mail was sent to, this can be your account, but it can also be an alias, a pop-link you retrieved a mail from or a subdomain-addressing address. CC means Carbon Copy, and can be used to specify additional recipients of an e-mail. It's combined with To since essentially they mean the same.
    From
    Looks in the 'From' part of the header. This is used to determine who sent the e-mail, and allows you to sort and filter mail depending on the sender.
    Any header
    Looks through all the headers. Be careful with this one, as there are a lot of headers, including things like servers an e-mail passed through. It is very easy to make a rule that accidentally has a lot more positives than you intended.
    Envelope
    This is pretty advanced stuff. The Envelope is the 'real' source of the mail. All the other headers are created by the e-mail client someone uses. The envelope is created by the e-mail server. This is particularly useful for filtering mailing-lists and mails where you are addressed through the BCC field, as there won't be a TO: field to filter for.
    Advanced
    Advanced is not really a header, but it allows you to filter for anything you want in the headers. For example, if you receive mails that have a very strange characterset and you wish to set those aside in another folder, you can use this filter. Important:You will need to understand the 'sieve' mail filtering language before you use this filter type as the contents are passed directly into a 'sieve' "if" clause. If you don't know 'sieve', do not use this filter type, as it may stop all your rules from working.
    Always
    This matches any email that comes across this rule. Use this if you want to apply the current rule for all emails that gets to this rule.
    Body
    This will look for the match in the body of the email.

    Top

  11. What does the 'Order' column in the 'Define Rules' screen do?
  12. The 'Order' column allows you to specify in which order you want the rules to be applied. If you have multiple rules with the same 'Order' value, they get applied in the order they appear in the 'Define Rules' page. But if you specify a value for the 'Order' field, rules with a lower 'Order' value will be applied before rules with a higher 'Order' value. This is very useful for sometimes an e-mail might trigger several rules. In that case it's important that you have the 'Order' set up correctly.

    For example, if you want to filter all mail containing 'Foo' in the subject to Folder A, and you want all mail from 'Bob' to be filed in Folder B you'd make two rules for that (Subject 'Foo' into folder A, and From 'Bob' into folder B). This would work perfectly until Bob sends you an email with 'Foo' in the subject. Now what? Well, in that case it would be smart to have the Order working. If the rule to file mail from 'Bob' into the folder B has the lower Order value, your mail will end up in folder B. Similarly, if the rule to file mail with 'Foo' in the subject into folder A has the lower Order value, your mail will end up in folder A.

    Top

  13. What does the 'Forward type' column in the 'Define Rules' screen do?
  14. The 'Forward type' column allows you to specify how the message will be sent to the destination specified in the 'Forward to' column. The following types are available:

    If you are using either 'SMS summary', 'SMS squeezed summary' or 'SMS subject', ensure that the 'Forward to' column contains a mobile telephone number. You must include the country and area code in the number, and you will need to have purchased enough SMS Credits to pay for the SMS messages that will be sent. For more information on purchasing SMS Credits, see Paying for SMS messages.

    Top

  15. Can I forward only part of a message as an SMS?
  16. Yes. You have to use the "Custom" forwarding mechanism as described here to create a custom notify call.

    To forward only the first N characters of a message, you can specify $text[N]$ in the :message parameter. So for instance to forward only the first 50 characters of a message to the mobile number 12345689, you can use:

    notify :method "sms" :options ["123456789"] :message "$from$ / $subject$ / $text[50]$"

    You can also extract part of a message based on a regular expression to use as the forwarding text. To do that, you use a special construct of the form below before the $text$ parameter.

    extract{{regular-express-with-capturing-()'s}}

    So for instance, say you receive messages which contain stock quotes, but the messages contain a pre-amble you don't want to forward. You do know that just before the actual quote portion of the email, there is the text "Your stock quote is" and then the actual quote. Using a regular expression, you can capture the text after that string, and forward only it. That would be done with a rule like:

    notify :method "sms" :options ["123456789"] :message "$from$ / $subject$ / extract{{Your stock quote is(.*)}} $text$"

    The text captured in the (.*) capture is what will be forwarded. Additional notes on using this:

    Top

  17. What's the order of Sieve rules automatically generated by Rules screen forms?
  18. The following screens currently generate rules that appear in the final sieve script for your account.

    The screens above automatically create Sieve code in the following order. If no rule is activated, the message by default is filed in the Inbox by the implicit keep.

    1. SMTP filing - Each Personality which has SMTP filing to folder active generates Sieve code examining the x-resolved-to header looking for +personalitysentitem- followed by a unique number for that personality in your account. There is one of these clauses per Personality which has SMTP filing active. This code is ignored on incoming external messages, and is only executed when the account sends a message. Sieve execution is stopped after the filing action.
    2. Secret word - If found in "to", "cc", or "subject", then the following six sections are skipped: Rejecting emails, Maximum size, Whitelisting, Backscatter filtering, Definite Spam, and Probable Spam.
    3. Rejecting emails clauses - If a match is found, the message is either rejected with the bounce message "Message bounced by server content filter" or silently discarded, and Sieve execution is stopped.
    4. Maximum size - If the message size is exceeded, the message is rejected with the bounce message "Message not delivered; size over limit accepted by recipient", or if the settings are "Move to folder" and the Folder is set to <Reject> the message is silently discarded, or if the Folder is set otherwide the message is filed in that folder. If the message size was exceeded, Sieve execution is stopped after these actions.
    5. Whitelisting - If the sender is whitelisted (exact address or *@domain appears in the online address book), then the following three sections (Backscatter filtering, Definite Spam, and Probable Spam) are skipped.
    6. Backscatter filtering - If the sender is not whitelisted by the address book, then the backscatter rules are executed, and Sieve execution is stopped after these actions.
    7. Definite Spam - If the sender is not whitelisted by the address book, then the Definite Spam rule is executed (which can discard the message), and Sieve execution is stopped after these actions.
    8. Probable Spam - If the sender is not whitelisted by the address book, then the Probable Spam rule is executed, which can file the message (normally in Junk Mail), and Sieve execution is stopped after these actions.
    9. Bypass File into Folders for Mailing Lists - If this parameter is found in "TO" or "CC", then the next two sections (File into folders and POP links filing) are skipped.
    10. File into folders - If this test is satisfied, the message (optionally flagged) is filed into a specified folder and the next section (POP links filing) is skipped.
    11. POP links filing - If the message was obtained from a POP link, then the filing rule on the POP Links screen is executed, and Sieve execution continues to the next step.
    12. Automatic notification (vacation message) - If the incoming message was sent to an address set up on the Personalities screen, then the vacation message is executed, and Sieve execution continues to the next step.
    13. Forwarding - The forwarding rules are executed.

    Top

  19. How do I tell what address an email was delivered to?
  20. When an email is sent as 'Bcc', there are no header fields which show the exact address the email was sent to. There are however a number of fields added as the email is processed. The delivery process is described here. You can use these extra delivery details to filter emails sent to a Bcc address.

    Top

Other FAQ sections