Skip to content

Latest commit

 

History

History
66 lines (46 loc) · 2.82 KB

README.md

File metadata and controls

66 lines (46 loc) · 2.82 KB

mailbox-browser

Web Interface for Mailbox.

Usage

Docker

docker run --env AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> \
           --env AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> \
           --env AWS_REGION=<AWS_REGION> \
           --env AWS_API_GATEWAY_ENDPOINT=<AWS_API_GATEWAY_ENDPOINT> \
           harryzcy/mailbox-browser

Cloudflare Pages & Pages Functions

  1. Clone the repository
  2. Create Cloudflare project
  3. Configure correct environment variables according to this section
  4. Run make cloudflare

Replace the environment variables with respective values.

Two forms of authentication is supported when using Cloudflare for deployments:

  • Basic Auth: Providing AUTH_BASIC_USER and AUTH_BASIC_PASS environmental variable will enabled HTTP basic auth for all routes.

  • Forward Auth: This method delegates authentication to an external service, whose URL address is defined by AUTH_FORWARD_ADDRESS.

    For every request received, the middleware will send a request with the same header to the external service. If the response has a 2XX code, then the access is granted and the original request is performed. Otherwise, the response from the external service is returned.

    Forward Auth will take precedence over basic auth. So if AUTH_FORWARD_ADDRESS is defined, Basic Auth won't be performed.

Environment Variables

During runtime:

  • AWS_ACCESS_KEY_ID: AWS access key id
  • AWS_SECRET_ACCESS_KEY: AWS secret access key
  • AWS_REGION: AWS region code
  • AWS_API_GATEWAY_ENDPOINT: AWS API Gateway endpoint
  • EMAIL_ADDRESSES: a comma-separated list of email addresses/domains to send email from (required for replying emails)
  • PROXY_ENABLE (optional): whether to proxy email images, must be true (default) or false
  • IMAGES_AUTO_LOAD (optional): whether to automatically load images, must be true (default) or false
  • AUTH_BASIC_USER: Basic Auth username (only available using Cloudflare Pages)
  • AUTH_BASIC_PASS: Basic Auth password (only available using Cloudflare Pages)
  • AUTH_FORWARD_ADDRESS: Forward Auth address (only available using Cloudflare Pages)

During deployment:

  • CF_PROJECT_NAME: The project name for Cloudflare Pages deployment. When this is set, wrangler won't prompt to select project every time.

Components

Directory Description
bff Backend for frontend
cloudflare Cloudflare Pages deployment
web Web frontend

Screenshots

Dark mode Light mode
Screenshot Dark Mode Screenshot Light Mode