Implement ListMailFilter with black and whitelist functionality

This filter enables to perform either black or whitelisting for email
addresses and patterns. While this could be implemented as a plugin, we
expect that this will find use in nearly all Gerrit installations to
respond to spam reports and block users and decided to implement it in
core.

Change-Id: Ie29a456feba5d658b5c49792634e8942e133ad0b
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt
index f82566b..1c00bbe 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -3538,6 +3538,27 @@
 +
 Defaults to false.
 
+[[receiveemail.filter.mode]]receiveemail.filter.mode::
++
+A black- and whitelist filter to filter incoming emails.
++
+If `OFF`, emails are not filtered by the list filter.
++
+If `WHITELIST`, only emails where a pattern from
+<<receiveemail.filter.patterns,receiveemail.filter.patterns>>
+matches 'From' will be processed.
++
+If `BLACKLIST`, only emails where no pattern from
+<<receiveemail.filter.patterns,receiveemail.filter.patterns>>
+matches 'From' will be processed.
++
+Defaults to `OFF`.
+
+[[receiveemail.filter.patterns]]receiveemail.filter.patterns::
++
+A list of regular expressions to match the email sender against. This can also
+be a list of addresses when regular expression characters are escaped.
+
 [[sendemail]]
 === Section sendemail