FAQ about patches | More patches | Main Page | MD5 sum for this patch

Define your own rules and make Alpine flexible!
Patch is available for versions: alpine 1.00 alpine 1.10 alpine 2.00 alpine 2.01 alpine 2.10 alpine 2.11 alpine 2.20
 
This patch allows you to create specific hooks, so that operations that would normally be global in nature can be customized on a per message/folder/person basis.

There are two ingredients in this configuration. One are the variables that can be configured, the other how to configure them.

The syntax used to configure them is very standard. If you are new to this patch, read the explanation of the syntax before seeing the examples below.

NEW in version 2.11, this patch adds the OR logical connection. It is symbolized by ||. The classical AND connector, is symbolized by &&.

This text describes all configuration options that are related to this patch. They are sorted alphabetically, regardless of when they were added. There is more help available in the patch itself.

  • Compose Rules This option can be used to generate signatures in cases when setting up a role does not work. Examples are
    1. _TO_ >> {Peter Flinstones} => _SIGNATURE_{~/.petersignature}
    2. _COLLECTION_ >> {Mail} => _SIGNATURE_{~/ll}

     
  • Forward Rules This option controls several aspects of what happens when you forward a message. Examples are
    1. _ROLE_ == {admin} && _SUBJECT_ !> {[tag] } => _COPY_{[tag] _SUBJECT_}
    2. _ROLE_ == {work} => _LCC_ := _TRIM_{_FORWARDFROM_ <_FORWARDADDRESS_>}

     
  • Index Rules This option controls the index format of a folder. It supersedes any value configured in Alpine, including the one set under Other Rules. Examples are:
    1. _FOLDER_ == {INBOX} => _INDEX_{IMAPSTATUS DATE FROM(33%) SIZE SUBJECT(67%)}
    2. _FOLDER_ == {INBOX} => _INDEX_{SHORTIMAPSTATUS FROMORTO(18) SUBJECT(18) OPENINGTEXTNQ}

     
  • Key Definition Rules This option allows to redefine keys, or create macros in different screens. Examples are:
    1. "_SCREEN_ == {index} && _PKEY_ == {~} => _COMMAND_{a,s,"spam",CR,x}"
    2. _SCREEN_ == {index} && _PKEY_ == {~} => _COMMAND_{"$h"}

     
  • Replace Rules This option allows you to override the way in which the index screen is printed in several fields, like the From, Subject, or Opening text. Examples are:
    1. _FOLDER_ != {sent-mail} && _NICK_ != {} => _FROM_ := _REPLACE_{_FROM_ (_NICK_)}
    2. _FOLDER_ == {mailing-list} => _OPENINGTEXTNQ_ := _REXTRIM_{On.*wrote: }
    3. _FOLDER_ == {INBOX} => _SUBJECT_ := _EXEC_{/path/to/script}

    The rule with the _EXEC_ function, takes the _SUBJECT_ as the input of the script and transforms it, then Alpine uses its output as the new subject.
     
    Take a look at the impact that a rule like this can have.
     
  • Reply Indent Rules This option allows you to customize your reply indent string, examples are:
    1. _FROM_ == {Your Boss} => _RESTR_{"> "}
    2. _FROM_ == {Perter Flinstone;Wilma Flinstone} => _RESTR_{"_INIT_ > "}

     
  • Reply Leadin Rules This option allows you to change the text that Alpine writes on the top of the message before the quoted text. Examples are:
    1. _FOLDER_ << {pine-info;_NEWS_} => _REPLY_{*** _FROM_ wrote: }
    2. _FOLDER_ == {INBOX} => _REPLY_{On _DATE_ you wrote:}

     
  • Reply Subject Rules This option can be used to control how to form the subject of a message that is being replied to. Examples are:
    1. _SUBJECT_ == {} => _RESUB_{Re: your message}
    2. _SUBJECT_ >> {Sv: ;AW: } => _SUBJECT_ := _TRIM_{Sv: ;AW: }

     
  • Save Rules This is a quite powerful option that allows you to control the folder to which a message is offered to be saved. Examples are:
    1. _FLAG_ >> {D} -> Trash
    2. _FROM_ == {U2} -> Bono
    3. _FOLDER_ == {comp.mail.pine} -> pine-stuff

     
    If you enable the feature [X] Auto Move Read Messages Using Rules, and the Read Message Folder has been defined, then these rules will be applied to move the matching messages to their target folders as defined above.
     
  • Smtp Rules This option allows you to define smtp servers that you can use to send your messages. An examples is:
    1. _ADDRESSTO_ == {peter@bedrock.com} => _SMTP_{smtp.bedrock.com}

     
  • Sort Rules You can use this option to configure sort order for specific folders. Examples are:
    1. _FOLDER_ == {INBOX;comp.mail.pine;maildroptest} => _SORT_{tHread}
    2. _COLLECTION_ >> {Incoming-Folders;News} && _FOLDER_ != {INBOX} => _SORT_{Arrival}

     
  • Startup Rules You can tell Alpine where to position the cursor when a folder is opened, in a per-folder basis. Examples are
    1. _FOLDER_ == {Lynx;pine-info;_NEWS_} => _STARTUP_{first-unseen}
    2. _FOLDER_ == {INBOX} => _STARTUP_{first-recent}

     
  • Threading Display Style Rule You can use this option to configure the display style of a thread of specific folders. For example:
    1. _FOLDER_ == {pine-info} => _THREADSTYLE_{mutt-like}
    2. _FOLDER_ == {INBOX} => _THREADSTYLE_{show-thread-structure}

     
  • Threading Index Style Rule You can use this option to configure the index style of a thread of specific folders. For example:
    1. _FOLDER_ == {pine-info} => _THREADINDEX_{regular-index-with-expanded-threads}
    2. _FOLDER_ == {INBOX} => _TREADINDEX_{separate-index-screen-except-for-single-messages}

Last Updated 13:07:08 MDT Sat Aug 15 2015.