{"id":15356866,"url":"https://github.com/linyows/warp","last_synced_at":"2026-02-23T08:18:18.247Z","repository":{"id":40458802,"uuid":"326142195","full_name":"linyows/warp","owner":"linyows","description":"WARP is an outbound transparent SMTP proxy. ","archived":false,"fork":false,"pushed_at":"2025-03-06T02:30:24.000Z","size":689,"stargazers_count":14,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T14:14:31.219Z","etag":null,"topics":["hacktoberfest","outbound","proxy","smtp","transparent"],"latest_commit_sha":null,"homepage":"https://warp.linyo.ws","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linyows.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-02T08:40:50.000Z","updated_at":"2025-03-06T02:30:28.000Z","dependencies_parsed_at":"2024-06-19T16:23:38.120Z","dependency_job_id":"7018d7d5-361f-4ede-90a5-3f3917cea8b5","html_url":"https://github.com/linyows/warp","commit_stats":{"total_commits":251,"total_committers":2,"mean_commits":125.5,"dds":0.003984063745019917,"last_synced_commit":"dafc88362a65879eb5a45f93a8c5b8bf6f8ace47"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linyows%2Fwarp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linyows%2Fwarp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linyows%2Fwarp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linyows%2Fwarp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linyows","download_url":"https://codeload.github.com/linyows/warp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248983051,"owners_count":21193510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","outbound","proxy","smtp","transparent"],"created_at":"2024-10-01T12:30:24.706Z","updated_at":"2026-02-23T08:18:18.239Z","avatar_url":"https://github.com/linyows.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"right\"\u003eEnglish | \u003ca href=\"https://github.com/linyows/warp/blob/main/README.ja.md\"\u003e日本語\u003c/a\u003e\u003c/p\u003e\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://warp.linyo.ws\"\u003e\n    \u003cimg alt=\"WARP\" src=\"https://github.com/linyows/warp/blob/main/misc/warp.svg\" width=\"200\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n\u003cstrong\u003eWarp\u003c/strong\u003e is an outbound transparent SMTP proxy.\nSMTP level logging is possible, and throttling is detected from MX response time and other comprehensive response status.\nAdditionally, it is possible to use different IP addresses for outgoing communications based on internal reputation.\nhttps://warp.linyo.ws\n\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/linyows/warp/actions\" title=\"actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/linyows/warp/build.yml?branch=main\u0026style=for-the-badge\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/linyows/warp/releases\"\u003e\u003cimg src=\"http://img.shields.io/github/release/linyows/warp.svg?style=for-the-badge\" alt=\"GitHub Release\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## The Problem\n\nOperating email infrastructure at scale comes with significant challenges:\n\n- **No visibility** — You can't see what's being sent, to whom, or how the remote server responds\n- **Deliverability issues** — Throttling and blocklisting happen silently; you only find out when users complain\n- **No filtering layer** — Compromised accounts or misconfigured applications send spam or phishing emails before anyone notices\n- **IP reputation management** — A single bad sender can damage the reputation of your entire IP range\n- **Compliance gaps** — Auditing outbound email requires bolting on external tools that don't integrate cleanly\n\n## How Warp Solves It\n\nWarp deploys as a transparent proxy using Linux's `SO_ORIGINAL_DST` — it intercepts SMTP connections at the network level, meaning **zero changes to your existing mail clients or applications**. Once in place, Warp provides:\n\n### Observability\n\nEvery SMTP command and response is captured in real time. You can log to files, MySQL, SQLite, or send notifications to Slack — all through a simple plugin system. Connection metadata (sender, recipient, HELO hostname, elapsed time) is automatically extracted and structured for analysis.\n\n### Filtering\n\nWarp can buffer the entire message during the DATA phase and pass it to a **filter hook** before relaying. Your filter logic decides what happens next:\n\n| Action | Behavior |\n|---|---|\n| **Relay** | Pass the message through to the destination server as-is |\n| **Reject** | Return an SMTP error to the sender — the message never reaches the destination |\n| **Add Header** | Modify the message (e.g., add `X-Spam-Score` headers) and then relay |\n\n### Deliverability Intelligence\n\nBy measuring the time between connection and the server's `354` response, Warp detects **MX throttling patterns**. Combined with SMTP response codes, you get a comprehensive view of how remote servers are treating your mail.\n\n### IP Routing\n\nWarp supports configurable **outbound IP addresses**, enabling you to route mail through different IPs based on sender reputation, recipient domain, or any custom logic.\n\n## Architecture\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/linyows/warp/blob/main/misc/architecture.png\" alt=\"Warp Architecture\"\u003e\n\u003c/p\u003e\n\n```\n                    Transparent Proxy (iptables REDIRECT)\n                    ┌─────────────────────────────┐\n  SMTP Client ────▶ │           Warp              │ ────▶ Destination MX\n                    │                             │\n                    │  ┌─────────┐  ┌──────────┐  │\n                    │  │Upstream │  │Downstream│  │\n                    │  │Mediator │  │Mediator  │  │\n                    │  └────┬────┘  └────┬─────┘  │\n                    │       │            │        │\n                    │  ┌────▼────────────▼─────┐  │\n                    │  │    Hook System         │  │\n                    │  │  ┌──────┐ ┌────────┐  │  │\n                    │  │  │ Log  │ │ Filter │  │  │\n                    │  │  └──────┘ └────────┘  │  │\n                    │  └───────────────────────┘  │\n                    └─────────────────────────────┘\n```\n\n**Key components:**\n\n- **Server** — Listens for incoming TCP connections and extracts the original destination using `SO_ORIGINAL_DST`\n- **Pipe** — Manages bidirectional data flow between client and server with upstream/downstream mediators\n- **Mediators** — Inspect and transform SMTP traffic in each direction, extracting metadata (MAIL FROM, RCPT TO, HELO) and handling STARTTLS negotiation\n- **Hook System** — Extensible plugin architecture for logging (`AfterComm`, `AfterConn`) and filtering (`BeforeRelay`)\n\n### STARTTLS Handling\n\nWarp transparently handles TLS negotiation: it strips `STARTTLS` from the server's EHLO response to the client, then initiates its own TLS connection to the destination server. This allows Warp to inspect SMTP traffic while maintaining encrypted delivery.\n\n## Getting Started\n\n### Installation\n\n```bash\ngo install github.com/linyows/warp/cmd/warp@latest\n```\n\nOr download a pre-built binary from [Releases](https://github.com/linyows/warp/releases).\n\n### Basic Usage\n\n```bash\nwarp -ip 0.0.0.0 -port 10025 -verbose\n```\n\n### iptables Setup (Transparent Proxy)\n\nRedirect outgoing SMTP traffic to Warp:\n\n```bash\niptables -t nat -A OUTPUT -p tcp --dport 25 -j REDIRECT --to-port 10025\n```\n\n### Command Line Options\n\n| Flag | Default | Description |\n|---|---|---|\n| `-ip` | `127.0.0.1` | Listen IP address |\n| `-port` | *(required)* | Listen port |\n| `-outbound-ip` | `0.0.0.0` | Source IP for outgoing connections |\n| `-plugins` | | Comma-separated plugin names: `mysql`, `sqlite`, `file`, `slack` |\n| `-message-size-limit` | `10240000` | Maximum message size in bytes (~10MB) |\n| `-verbose` | `false` | Enable detailed logging |\n| `-version` | `false` | Show version information |\n\n### Example: Full Setup\n\n```bash\n# Start Warp with MySQL logging and Slack notifications\nwarp -ip 0.0.0.0 -port 10025 \\\n     -outbound-ip 203.0.113.10 \\\n     -plugins mysql,slack \\\n     -message-size-limit 20480000 \\\n     -verbose\n```\n\n## Plugin System\n\nWarp uses Go's plugin system to load `.so` files from `/opt/warp/plugins/` (or the path specified by `PLUGIN_PATH` environment variable). Each plugin implements the `Hook` interface:\n\n```go\ntype Hook interface {\n    Name() string\n    AfterInit()\n    AfterComm(*AfterCommData)  // Called after each SMTP command/response\n    AfterConn(*AfterConnData)  // Called when a connection closes\n}\n```\n\nFor message filtering, implement the `FilterHook` interface:\n\n```go\ntype FilterHook interface {\n    Hook\n    BeforeRelay(*BeforeRelayData) *FilterResult\n}\n```\n\n### Built-in Plugins\n\n| Plugin | Description | Environment Variables |\n|---|---|---|\n| **file** | Logs all SMTP communications to a JSON file | `FILE_PATH` |\n| **mysql** | Stores communications and connections in MySQL | `DSN` |\n| **sqlite** | Stores communications and connections in SQLite | `DSN` |\n| **slack** | Sends connection notifications to a Slack channel | `SLACK_TOKEN`, `SLACK_CHANNEL` |\n\n### Building Plugins\n\n```bash\ncd plugins/file\ngo build -buildmode=plugin -o /opt/warp/plugins/file.so\n```\n\n### MySQL Setup\n\nUse the provided schema to set up the database:\n\n```bash\nmysql \u003c misc/setup.sql\n```\n\n## Use Cases\n\n- **Email Gateway** — Centralized SMTP inspection point for your organization\n- **Spam \u0026 Phishing Prevention** — Filter outbound messages before they damage your reputation\n- **Compliance \u0026 Auditing** — Log every outbound email with full SMTP-level detail\n- **Data Loss Prevention (DLP)** — Inspect message content for sensitive data before delivery\n- **Deliverability Monitoring** — Track MX response times and detect throttling in real time\n- **IP Reputation Management** — Route mail through different IPs based on sender behavior\n- **Development \u0026 Debugging** — Capture and inspect SMTP traffic during development\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Author\n\n[linyows](https://github.com/linyows)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinyows%2Fwarp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinyows%2Fwarp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinyows%2Fwarp/lists"}