Gazette is a lightweight Gmail-to-RSS bridge designed specifically for reading newsletters in standard RSS readers (like NetNewsWire, Reeder, or FreshRSS). It polls your Gmail for newsletters, strips out the tracking scripts and complex CSS, and serves them as a clean, readable feed.
- RSS & GReader API Support: Compatible with both standard RSS readers and apps that support the Google Reader API (like NetNewsWire).
- Clean Content: Uses a semantic HTML parser to strip layouts, styles, and scripts while preserving text and images.
- Gmail Sync: Marking an item as read in your RSS reader removes the
UNREADlabel from the original message in Gmail. - Efficient Polling: Background worker with configurable intervals and rate-limit handling.
- Docker Ready: Simple deployment with Docker and Docker Compose.
- A publicly resolvable domain (e.g.,
gazette.yourdomain.com). - An SSL certificate (Gazette is intended to run behind a reverse proxy like Nginx, Caddy, or Traefik that handles HTTPS). Google OAuth will not work without a public HTTPS endpoint.
- Go to the Google Cloud Console.
- Create a new project and enable the Gmail API.
- Configure the OAuth Consent Screen (Internal or External).
- Add the following scopes:
https://www.googleapis.com/auth/gmail.readonlyhttps://www.googleapis.com/auth/gmail.modify
- Add the following scopes:
- Create OAuth 2.0 Client IDs (Web application).
- Add
https://gazette.yourdomain.com/auth/callbackto the Authorized redirect URIs.
- Add
- Download your Client ID and Client Secret.
Create a config.yaml in the project root:
gmail:
client_id: "YOUR_CLIENT_ID"
client_secret: "YOUR_CLIENT_SECRET"
public_url: "https://gazette.yourdomain.com" # Must be HTTPS and publicly accessible
label: "Newsletters" # Optional: Filter by a specific Gmail label
polling_interval: 300 # 5 minutes
token_file: "/app/data/token.json"
server:
port: 8080
user: "admin" # For GReader ClientLogin
pass: "password"docker-compose up -dOnce running, visit your configured public_url (e.g., https://gazette.yourdomain.com) to authorize the app with your Gmail account.
Individual feeds are available at https://gazette.yourdomain.com/feed?id=sender@example.com.
Gazette implements a subset of the GReader API, making it a "source" for modern RSS clients. Point your reader's GReader/FreshRSS account to https://gazette.yourdomain.com/api/greader.php/ and use the credentials defined in your config.yaml.
Gazette doesn't just pass through the email HTML. It:
- Strips CSS/JS: Removes
<style>,<script>, and<head>tags. - Whitelists Tags: Only allows semantic tags like
<p>,<h1>-<h6>,<blockquote>,<code>, and<img>. - Filters Noise: Automatically removes common newsletter boilerplate like "Unsubscribe" or "View in Browser" links.
- Preserves Full Content: You can always click the article link in your reader to see the original, un-sanitized HTML via the
/viewendpoint.
- Language: Go 1.25
- Storage: Local JSON file (
/app/data/cache.json) for persistence. - Concurrency: Thread-safe cache with
sync.RWMutexand non-blocking Gmail polling.
Note: Gazette is intended for personal use and is not a public multi-user service.
