+ def find_message_by_filename(self, filename):
+ """Find a message with the given filename
+
+ :returns: If the database contains a message with the given
+ filename, then a class:`Message:` is returned. This
+ function returns None in the following situations:
+
+ * No message is found with the given filename
+ * An out-of-memory situation occurs
+ * A Xapian exception occurs"""
+ self._verify_initialized_db()
+ msg_p = Database._find_message_by_filename(self._db, _str(filename))
+ return msg_p and Message(msg_p, self) or None
+