https://github.com/postalserver/blackhole
⚫️ A simple server to accept HTTP and SMTP requests and discard them
https://github.com/postalserver/blackhole
Last synced: 11 months ago
JSON representation
⚫️ A simple server to accept HTTP and SMTP requests and discard them
- Host: GitHub
- URL: https://github.com/postalserver/blackhole
- Owner: postalserver
- License: cc0-1.0
- Created: 2024-03-17T17:05:12.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-17T18:10:27.000Z (almost 2 years ago)
- Last Synced: 2025-01-12T19:15:54.407Z (about 1 year ago)
- Language: Go
- Size: 34.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Blackhole
This is a very simple web & SMTP server which will respond to all requests sent to it and log the output to stdout. This is designed for testing some Postal interactions with live SMTP and HTTP servers.
## Usage
Start the server with the following:
```
docker run --pull always \
-p 80:8080 \
-p 25:2525 \
ghcr.io/postalserver/blackhole:latest
```
### SMTP
You can send email to various addresses to illicit different responses:
* `accept@` - message will be accepted with a 250
* `softfail@` - message will be rejected with a 450 ("Mailbox unavailable at the moment")
* `later@` - message will be rejected with a 450 ("Try again in 250 seconds")
* `hardfail@` - message will be rejected with a 550 ("Invalid recipient address") after receiving data
* `anything-else@` - message will be rejected with a 550 ("Invalid recipient address") afer `RCPT TO`
### HTTP
The following URLs are available.
* `/200` or `/ok` - returns a 200 OK
* `/403` or `/forbidden` - returns a 403 Forbidden
* `/500` or `/internal-server-error` - returns a 500 Internal Server Error
* All other URLs will return a 404 Not Found