https://github.com/remko/smtp-http-proxy
Tiny SMTP to HTTP bridge
https://github.com/remko/smtp-http-proxy
Last synced: 8 months ago
JSON representation
Tiny SMTP to HTTP bridge
- Host: GitHub
- URL: https://github.com/remko/smtp-http-proxy
- Owner: remko
- Created: 2016-06-10T15:54:09.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2019-10-06T15:59:59.000Z (over 6 years ago)
- Last Synced: 2025-09-03T23:43:08.181Z (10 months ago)
- Language: C++
- Homepage: https://el-tramo.be/smtp-http-proxy
- Size: 125 KB
- Stars: 27
- Watchers: 2
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [smtp-http-proxy: Tiny SMTP to HTTP bridge](https://el-tramo.be/smtp-http-proxy)
`smtp-http-proxy` is a lightweight daemon that posts incoming SMTP requests
to an HTTP URL as JSON.
This is useful for services that use SMTP for things like reporting,
such as [HAProxy](http://haproxy.org)'s `email-alert`.
## Installing
### Alpine
echo http://cdn.el-tramo.be/alpine/smtp-http-proxy >> /etc/apk/repositories
apk --allow-untrusted --no-cache add smtp-http-proxy
### Debian Stable (Jessie)
echo 'deb http://cdn.el-tramo.be debian/smtp-http-proxy/' >> /etc/apt/sources.list
apt-get update
apt-get install smtp-http-proxy
## Building
scons
## Usage
The following will start listening for SMTP connections on port 25 of all interfaces,
and send incoming messages to `https://example.com/receive-mail`
smtp-http-proxy --bind 0.0.0.0 --port 25 --url https://example.com/receive-mail
The given URL will get a HTTP `POST` request with an `application/json` body,
of the following form:
{
"envelope": {
"from": "",
"to": [
"",
""
]
},
"data": "From: sender@example.com\nDate: Sun, 12 Jun 2016 18:03:51 +0200\nSubject: Message\n\nThis is a message"
}