+.section Testing for personal mail
+.rset SECTpersonal "~~chapter.~~section"
+A common requirement is to distinguish between incoming personal mail and mail
+from a mailing list, or from a robot or other automatic process (for example, a
+bounce message). In particular, this test is normally required for `vacation
+messages'.
+
+.em
+The \"personal"\ condition checks that the message is not a bounce message and
+that the current user's email address appears in the \"To:"\ header. It also
+checks that the sender is not the current user or one of a number of common
+daemons, and that there are no header lines starting \"List-"\ in the message.
+Finally, it checks the content of the \"Precedence:"\ header line, if there is
+one.
+
+You should always use the \"personal"\ condition when generating automatic
+responses.
+.nem
+This example shows the use of \"personal"\ in a filter file that is sending out
+vacation messages:
+.display asis
+if personal then
+ mail
+ to $reply_address
+.newline
+.em
+ subject "I am on holiday"
+.nem
+.newline
+ file $home/vacation/message
+ once $home/vacation/once
+ once_repeat 10d
+endif
+.endd
+.em
+It is tempting, when writing commands like the above, to quote the original
+subject in the reply. For example:
+.display asis
+subject "Re: $h_subject:"
+.endd
+There is a danger in doing this, however. It may allow a third party to
+subscribe you to an opt-in mailing list, provided that the list accepts bounce
+messages as subscription confirmations. (Messages sent from filters are always
+sent as bounce messages.) Well-managed lists require a non-bounce message to
+confirm a subscription, so the danger is relatively small.
+
+If prefixes or suffixes are in use for local parts -- something which depends
+on the configuration of Exim (see section ~~SECTmbox below) -- the tests for
+the current user are done with the full address (including the prefix and
+suffix, if any) as well as with the prefix and suffix removed. If the system is
+configured to rewrite local parts of mail addresses, for example, to rewrite
+`dag46' as `Dirk.Gently', the rewritten form of the address is also used in the
+tests.
+.nem
+
+.em
+.section Alias addresses for the personal condition
+It is quite common for people who have mail accounts on a number of different
+systems to forward all their mail to one system, and in this case a check for
+personal mail should test all their various mail addresses. To allow for this,
+the \"personal"\ condition keyword can be followed by
+.display
+alias <<address>>
+.endd
+any number of times, for example
+.display asis
+if personal alias smith@else.where.example
+ alias jones@other.place.example
+then ...
+.endd
+The alias addresses are treated as alternatives to the current user's email
+address when testing the contents of header lines.
+.nem
+
+
+.em
+.section Details of the personal condition
+The basic \"personal"\ test is roughly equivalent to the following:
+.display flow asis
+not error_message and
+$message_headers does not contain "\nList-" and
+$header_auto-submitted: does not contain "auto-" and
+$header_precedence: does not contain "bulk" and
+$header_precedence: does not contain "list" and
+$header_precedence: does not contain "junk" and
+foranyaddress $header_to:
+ ( $thisaddress contains "$local_part@$domain" ) and
+not foranyaddress $header_from:
+ (
+ $thisaddress contains "$local_part@domain" or
+ $thisaddress contains "server@" or
+ $thisaddress contains "daemon@" or
+ $thisaddress contains "root@" or
+ $thisaddress contains "listserv@" or
+ $thisaddress contains "majordomo@" or
+ $thisaddress contains "-request@" or
+ $thisaddress matches "^owner-[^@]+@"
+ )
+.endd
+The variable \$local@_part$\ contains the local part of the mail address of
+the user whose filter file is being run -- it is normally your login id. The
+\$domain$\ variable contains the mail domain. As explained above, if aliases
+or rewriting are defined, or if prefixes or suffixes are in use, the tests for
+the current user are also done with alternative addresses.
+.nem
+
+
+.section Testing delivery status
+There are two conditions that are intended mainly for use in system filter
+files, but which are available in users' filter files as well. The condition
+\"first@_delivery"\ is true if this is the first process that is attempting to
+deliver the message, and false otherwise. This indicator is not reset until the
+first delivery process successfully terminates; if there is a crash or a power
+failure (for example), the next delivery attempt is also a `first delivery'.
+
+In a user filter file \"first@_delivery"\ will be false only if
+there was previously an error in the filter, or if a delivery for the user
+failed owing to, for example, a quota error, or if forwarding to a remote
+address was deferred for some reason.
+
+The condition \"manually@_thawed"\ is true only if the message was `frozen' for
+some reason, and was subsequently released by the system administrator. It is
+unlikely to be of use in users' filter files.
+