Here is a link to the privacy policy.
Now to answer your questions:
How much of the information in my messages does Google save? For example, do they scan the entire text of every email I write (to tailor targeted ads)?
As of late 2017, Google no longer scans your email to target ads. While there are still ads in Gmail, Google uses other information that it already has about you.
In what ways can Google use the information they save? For example, are they allowed to publish the emails I wrote on a blog? What about emails I received?
Your emails are yours, they don't use them for funny blog entries. Or
any blog entries for that matter.
Are there any special circumstances (such as a "court order") which can increase the amount of information from emails Google is allowed to make available to the public?
this is a direct quote:
Google only shares personal information with other companies or individuals outside of Google in the following limited circumstances:
- We have your consent. We require opt-in consent for the sharing of any sensitive personal information.
- We provide such information to our subsidiaries, affiliated companies or other trusted businesses or persons for the purpose of
processing personal information on our behalf. We require that these
parties agree to process such information based on our instructions
and in compliance with this Privacy Policy and any other appropriate
confidentiality and security measures.
- We have a good faith belief that access, use, preservation or disclosure of such >information is reasonably necessary to (a) satisfy
any applicable law, regulation, legal process or enforceable
governmental request, (b) enforce applicable Terms of Service,
including investigation of potential violations thereof, (c) detect,
prevent, or otherwise address fraud, security or technical issues, or
(d) protect against harm to the rights, property or safety of Google,
its users or the public as required or permitted by law.