@@ -39,7 +39,9 @@ A SMTP server that receives emails from any domain without authentication and fo
3939### Webhook Integration
4040- 🔐 ** HTTP Basic Auth** : Secure webhook authentication
4141- 📨 ** Rich Payload** : Complete email data including headers and attachments
42- - 🔁 ** Error Handling** : Robust webhook delivery with retry logic
42+ - 🔁 ** Reliability Features** : Automatic retry with exponential backoff, rate limiting, and circuit breaker
43+ - 🛡️ ** Fault Tolerance** : Circuit breaker pattern prevents cascading failures
44+ - ⚡ ** Rate Limiting** : Configurable requests per second to protect downstream endpoints
4345- ✂️ ** Content Processing** : Parsed text and HTML content extraction
4446
4547## Quick Start
@@ -116,6 +118,12 @@ Usage of ./inboundparse:
116118 -webhook string Webhook URL for email payloads (required)
117119 -webhook-user string Basic auth username for webhook (optional)
118120 -webhook-pass string Basic auth password for webhook (optional)
121+ -webhook-max-retries int Maximum webhook retry attempts (default 3)
122+ -webhook-retry-delay int Initial webhook retry delay in seconds (default 1)
123+ -webhook-max-retry-delay int Maximum webhook retry delay in seconds (default 30)
124+ -webhook-retry-multiplier float Webhook retry delay multiplier (default 2.0)
125+ -webhook-rate-limit int Webhook requests per second rate limit (default 10)
126+ -webhook-rate-burst int Webhook rate limit burst capacity (default 20)
119127 -name string SMTP server name (default " mx.inboundparse.com" )
120128 -max-size int Max message size bytes (default 10485760)
121129 -read-timeout int Read timeout (seconds, default 30)
@@ -143,49 +151,50 @@ Usage of ./inboundparse:
143151
144152You can configure InboundParse using environment variables or command line flags:
145153
146- #### Core Configuration
147- - ` WEBHOOK_URL ` - Webhook URL (required)
148- - ` WEBHOOK_USER ` - Basic auth username for webhook
149- - ` WEBHOOK_PASS ` - Basic auth password for webhook
150- - ` LISTEN_ADDR ` - SMTP server listen address (default: "0.0.0.0:25")
151- - ` LISTEN_ADDR_TLS ` - TLS server listen address (default: "0.0.0.0:587")
152- - ` SERVER_NAME ` - SMTP server name (default: "mx.inboundparse.com")
153-
154- #### TLS Configuration
155- - ` CERT_FILE ` - TLS certificate file path
156- - ` KEY_FILE ` - TLS private key file path
157-
158- #### Feature Toggles
159- - ` ENABLE_SPF ` - Enable SPF validation (default: true)
160- - ` ENABLE_DKIM ` - Enable DKIM validation (default: true)
161- - ` ENABLE_DMARC ` - Enable DMARC validation (default: true)
162- - ` VERBOSE ` - Enable verbose logging (default: false)
163-
164- #### Logging Configuration
165- - ` LOG_LEVEL ` - Log level (debug, info, warn, error) (default: "info")
166- - ` LOG_FORMAT ` - Log format (json, console) (default: "json")
167- - ` LOG_OUTPUT ` - Log output destination (default: "stdout")
168-
169- #### Metrics Configuration
170- - ` ENABLE_METRICS ` - Enable Prometheus metrics collection (default: false)
171- - ` METRICS_ADDR ` - Metrics server listen address (default: "0.0.0.0:9090")
172- - ` METRICS_API_KEY ` - Metrics API key
173- - ` METRICS_USERNAME ` - Metrics username
174- - ` METRICS_PASSWORD ` - Metrics password
175-
176- #### Sentry Configuration
177- - ` ENABLE_SENTRY ` - Enable Sentry error tracking (default: false)
178- - ` SENTRY_DSN ` - Sentry DSN for error tracking
179- - ` SENTRY_ENV ` - Sentry environment (default: "production")
180- - ` SENTRY_RELEASE ` - Sentry release version
181-
182- #### Automatic Certificate Management
183- - ` ACME_SH_EMAIL ` - Email for Let's Encrypt account registration
184- - ` MXDOMAIN ` - Domain for SSL certificate (default: "mx.inboundparse.com")
185- - ` DNS_API ` - DNS API provider (default: "dns_cf")
186- - ` CF_Token ` - Cloudflare API token (required for dns_cf)
187- - ` CF_Zone_ID ` - Cloudflare Zone ID (required for dns_cf)
154+ #### Core Environment Variables
188155
156+ - ` WEBHOOK_URL ` Webhook URL to receive email payloads (** required** )
157+ - ` WEBHOOK_USER ` Basic auth username for the webhook (optional)
158+ - ` WEBHOOK_PASS ` Basic auth password for the webhook (optional)
159+
160+ #### Webhook Reliability Configuration
161+
162+ - ` WEBHOOK_MAX_RETRIES ` Maximum retry attempts (default: ` 3 ` )
163+ - ` WEBHOOK_RETRY_DELAY ` Initial retry delay in seconds (default: ` 1 ` )
164+ - ` WEBHOOK_MAX_RETRY_DELAY ` Maximum retry delay in seconds (default: ` 30 ` )
165+ - ` WEBHOOK_RETRY_MULTIPLIER ` Exponential backoff multiplier (default: ` 2.0 ` )
166+ - ` WEBHOOK_RATE_LIMIT ` Requests per second rate limit (default: ` 10 ` )
167+ - ` WEBHOOK_RATE_BURST ` Rate limit burst capacity (default: ` 20 ` )
168+ - ` LISTEN_ADDR ` SMTP listen address (default: ` 0.0.0.0:25 ` )
169+ - ` LISTEN_ADDR_TLS ` TLS listen address (default: ` 0.0.0.0:587 ` )
170+ - ` SERVER_NAME ` SMTP service name for banner (default: ` mx.inboundparse.com ` )
171+
172+ #### TLS Settings
173+
174+ - ` CERT_FILE ` Path to TLS certificate file (optional)
175+ - ` KEY_FILE ` Path to TLS private key file (optional)
176+
177+ #### Feature Flags
178+
179+ - ` ENABLE_SPF ` Enable SPF checking (` true ` /` false ` , default: ` true ` )
180+ - ` ENABLE_DKIM ` Enable DKIM checking (` true ` /` false ` , default: ` true ` )
181+ - ` ENABLE_DMARC ` Enable DMARC checking (` true ` /` false ` , default: ` true ` )
182+ - ` VERBOSE ` Enable verbose (debug) logging (` true ` /` false ` , default: ` false ` )
183+
184+ #### Metrics (Prometheus)
185+
186+ - ` ENABLE_METRICS ` Enable Prometheus metrics endpoint (` true ` /` false ` , default: ` false ` )
187+ - ` METRICS_ADDR ` Metrics endpoint listen address (default: ` 0.0.0.0:9090 ` )
188+ - ` METRICS_API_KEY ` Bearer token used for metrics endpoint authentication (optional)
189+ - ` METRICS_USERNAME ` Username for metrics endpoint basic auth (optional)
190+ - ` METRICS_PASSWORD ` Password for metrics endpoint basic auth (optional)
191+
192+ #### Sentry Error Tracking
193+
194+ - ` ENABLE_SENTRY ` Enable Sentry error tracking (` true ` /` false ` , default: ` false ` )
195+ - ` SENTRY_DSN ` Sentry DSN (project key, required if Sentry enabled)
196+ - ` SENTRY_ENV ` Sentry environment name (default: ` production ` )
197+ - ` SENTRY_RELEASE ` Sentry release version (optional)
189198
190199## Webhook Payload
191200
@@ -240,7 +249,7 @@ The service sends a JSON payload to your webhook with comprehensive email data:
240249
241250## 🤝 Contributing
242251
243- Contributions of all kinds are welcome! See [ CONTRIBUTING .md] ( ./docs/CONTRIBUTING .md ) for guidelines, and don’t hesitate to open issues, fork, or create PRs.
252+ Contributions of all kinds are welcome! See [ CONTRIBUTE .md] ( ./docs/CONTRIBUTE .md ) for guidelines, and don’t hesitate to open issues, fork, or create PRs.
244253
245254---
246255
0 commit comments