Web Interface for Mailbox.
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
- Clone the repository
- Create Cloudflare project
- Configure correct environment variables according to this section
- 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
andAUTH_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.
During runtime:
AWS_ACCESS_KEY_ID
: AWS access key idAWS_SECRET_ACCESS_KEY
: AWS secret access keyAWS_REGION
: AWS region codeAWS_API_GATEWAY_ENDPOINT
: AWS API Gateway endpointEMAIL_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 betrue
(default) orfalse
IMAGES_AUTO_LOAD
(optional): whether to automatically load images, must betrue
(default) orfalse
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.
Directory | Description |
---|---|
bff | Backend for frontend |
cloudflare | Cloudflare Pages deployment |
web | Web frontend |
Dark mode | Light mode |
---|---|