+Mailpipe details
+~~~~~~~~~~~~~~~~
+
+Mailpipe is the most complicated part of ``pygrader``, and the place
+where things are most likely to get sticky. Since there are several
+
+If you get tired of filtering your inbox by hand using ``pg.py
+mailpipe``, you can (depending on how your mail delivery is setup) use
+procmail_ to automatically run ``mailpipe`` automatically on incoming
+email. There is an example ``.procmailrc`` in the
+``pygrader.mailpipe.mailpipe`` docstring that runs ``mailpipe``
+whenever incoming emails have ``[phys160:submit]`` in their subject
+somewhere.
+
+The use of ``[TARGET]`` tags in the email subject allows users to
+unambiguously specify the purpose of their email. Currently supported
+targets include (see the ``handlers`` argument to
+``pygrader.mailpipe``):
+
+``submit``
+ student assignment submission. The remainder of the email subject
+ should include the case insensitive name of the assignment being
+ submitted (see ``pygrader.handler.submission._match_assignment``).
+ An example subject would be::
+
+ [submit] assignment 1
+
+``get``
+ request information from the grade database. For students, the
+ remainder of the email subject is irrelevant. Grades and comments
+ for all graded assignments are returned in a single email. An
+ example subject would be::
+
+ [get] my grades
+
+ Professors and TAs may request either a table of all grades for the
+ course (à la ``tabulate``), the full grades for a particular
+ student, or a particular student's submission for a particular
+ assignment. Example subjects are (respectively):
+
+ [get] don't match any student names
+ [get] Bilbo Baggins
+ [get] Bilbo Baggins Assignment 1
+
+To allow you to easily sort the email, you can also prefix the target
+with additional information (see
+``pygrader.mailpipe._get_message_target``). For example, if you were
+running several courses from the same email account, you'd want a way
+for users to specify which course they were interacting with so you
+could filter appropriately in your procmail rules. Everything in the
+subject tag before an optional semicolon is ignored by ``mailpipe``,
+so the following subjects will be handled identically::
+
+ [submit] assignment 1
+ [phys101:submit] assignment 1
+ [phys101:section2:submit] assignment 1
+