{"id":13581696,"url":"https://github.com/YoRyan/smtp-translator","last_synced_at":"2025-04-06T10:32:44.941Z","repository":{"id":70878480,"uuid":"228134852","full_name":"YoRyan/smtp-translator","owner":"YoRyan","description":"An SMTP server that converts emails into Pushover notifications.","archived":true,"fork":false,"pushed_at":"2022-08-09T16:48:22.000Z","size":93,"stargazers_count":33,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-04T02:36:35.813Z","etag":null,"topics":["email","pushover","pushover-notifications","smtp-server"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YoRyan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-12-15T05:43:04.000Z","updated_at":"2025-03-05T01:55:27.000Z","dependencies_parsed_at":"2023-02-23T19:30:43.964Z","dependency_job_id":null,"html_url":"https://github.com/YoRyan/smtp-translator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoRyan%2Fsmtp-translator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoRyan%2Fsmtp-translator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoRyan%2Fsmtp-translator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YoRyan%2Fsmtp-translator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YoRyan","download_url":"https://codeload.github.com/YoRyan/smtp-translator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247470437,"owners_count":20944146,"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":["email","pushover","pushover-notifications","smtp-server"],"created_at":"2024-08-01T15:02:11.171Z","updated_at":"2025-04-06T10:32:43.294Z","avatar_url":"https://github.com/YoRyan.png","language":"Go","funding_links":[],"categories":["Go","others"],"sub_categories":[],"readme":"![SMTP Translator icon](https://raw.githubusercontent.com/wiki/YoRyan/smtp-translator/header_icon.png)\n\n# SMTP Translator\n\nSMTP Translator is a custom SMTP server that converts all emails it receives\ninto [Pushover](https://pushover.net) notifications - a faster, simpler, and\nmore contemporary alternative to email messages. No more replicating your Gmail\npassword to the email daemons on all of your Linux boxes!\n\nSMTP Translator has been succeeded by my [Mailrise](https://mailrise.xyz)\nproject, which can push to practically any service - not just Pushover - using\nthe [Apprise](https://github.com/caronc/apprise) library.\n\n![Android notification](https://raw.githubusercontent.com/wiki/YoRyan/smtp-translator/android_notify.jpg)\n\n## How to use\n\nWith an SMTP Translator instance set as your SMTP relay, send an email to `(your\nuser key here)@pushover.net`. Then, instead of routing the email to Pushover via\nthe conventional email network, SMTP Translator submits it directly to the\nPushover API. You can make up any sender addresses you want, since they never\ntouch the public email system.\n\nPlease note that with SMTP Translator as your sole smarthost, your system will\nnot be able to send email to non-Pushover destinations.\n\nAs of June 6, 2021, the demo server formerly available at smtpt.youngryan.com\nhas been discontinued.\n\n## Run your own instance\n\nFirst, install SMTP Translator into your `GOPATH`:\n\n```\n$ go get -u github.com/YoRyan/smtp-translator\n```\n\nTo start the server, you need to specify the Pushover app token it will use. You\ndo this by setting the `PUSHOVER_TOKEN` environment variable:\n\n```\n$ export PUSHOVER_TOKEN=xxx\n$ sudo smtp-translator\n```\n\nOptionally, you can specify your own listening address and advertised hostname.\n\n```\n$ smtp-translator -addr 127.0.0.1:2525 -hostname My-Host-Not-Root\n```\n\n### Pushover flags\n\nYou may also insert the following flags directly after your user token to\nfurther customize the notification:\n\n* `\u003edevice` to send the notification to a particular\n  [device](https://pushover.net/api#identifiers) (or, by inserting comma\n  separators, multiple devices)\n* `#priority` to set the notification\n  [priority](https://pushover.net/api#priority) (from -2 to 2)\n* `%retry` to set the retry interval for emergency priority notifications\n* `$expire` to set the expiration time for emergency priority notifications\n* `!sound` to set the notification [tone](https://pushover.net/api#sounds)\n\nFor example, sending an email to\n`uQiRzpo4DXghDmr9QzzfQu27cmVRsG\u003ephone!incoming@pushover.net` will route the\nnotification to your `phone` device and play the `incoming` sound.\n\n### Image attachments\n\nIf the email contains an image attachment that is within Pushover's 2.5 MB\n[limit](https://pushover.net/api#attachments), SMTP Translator will attach it\nto the Pushover notification.\n\n## FAQ\n\n##### Q: What's the catch?\n\nNo catch. I promise that the code on this repository is what I run on my\nserver, and that I do not log messages or metadata. But if you would prefer some\nmore privacy, you are of course free to acquire your own app token and host your\nown instance.\n\n##### Q: Does `smtpt.youngryan.com` support encryption?\n\nYes. To use TLS encryption, make note of the following table:\n\n| Port | Encryption |\n| --- | --- |\n| 25 | STARTTLS (optional) |\n| 465 | TLS-on-connect |\n| 587 | STARTTLS (mandatory) |\n\nIn theory, I could still read your messages. Email, by its nature, cannot be\nend-to-end encrypted.\n\n##### Q: Help! My message didn't go through!\n\nDouble-check the token in your recipient address - it is easy to confuse an app\ntoken for a user or group token.\n\n## Configuration examples\n\n### Synology NAS\n\n![Synology configuration screen](https://raw.githubusercontent.com/wiki/YoRyan/smtp-translator/synology_config.jpg)\n\n### exim4 (Debian/Ubuntu)\n\nRun `dpkg-reconfigure exim4-config` and answer the following:\n\n- General type of mail configuration: \"mail sent by smarthost; no local mail\"\n- IP address or host name of the outgoing smarthost: \"smtpt.youngryan.com::587\"\n\n```\n$ mailx -s 'Test Email' 'your.user.key.here@pushover.net'\nHello, World!\n```\n\n### postfix\n\n```\n# cat \u003e\u003e/etc/postfix/main.cf\nrelayhost = [smtpt.youngryan.com:587]\nsmtp_tls_security_level = verify\nsmtp_tls_mandatory_ciphers = high\nsmtp_tls_verify_cert_match = hostname\n```\n\n```\n$ mailx -s 'Test Email' 'your.user.key.here@pushover.net'\nHello, World!\n```\n\n### sendmail\n\n```\n# cat \u003e\u003e/etc/mail/sendmail.mc; /etc/mail/make\ndefine(`SMART_HOST', `smtpt.youngryan.com')dnl\ndefine(`RELAY_MAILER', `esmtp')dnl\ndefine(`RELAY_MAILER_ARGS', `TCP $h 587')dnl\ndefine(`confAUTH_MECHANISMS', `CRAM-MD5')dnl\n```\n\n```\n$ mailx -s 'Test Email' 'your.user.key.here@pushover.net'\nHello, World!\n```\n\n### Docker support\n\nSMTP Translator can be run inside Docker, and an official image is [available](https://hub.docker.com/r/yoryan/smtp-translator) from Docker Hub. This image listens on port 25. It will not run out of the box; you need to supply the `PUSHOVER_TOKEN` environment variable to get the daemon to start:\n\n```\n# docker pull yoryan/smtp-translator\n# docker run -e PUSHOVER_TOKEN=xxx -t yoryan/smtp-translator\n```\n\nTo pass additional command-line arguments, use `/app/smtp-translator` as the binary path:\n\n```\n# docker run -it yoryan/smtp-translator /app/smtp-translator -help\n```\n\nIf you want to enable TLS when running SMTP Translator inside a Docker container, you will need to use [bind mounts](https://docs.docker.com/storage/bind-mounts/) to supply the certificate files.\n\n### Multiple app token mode\n\nPassing the `-multi` flag will instruct SMTP Translator to read the app token\nfrom the sender's email address instead of the environment variable. In this\nmode, all sender addresses must be in the form of `(app token)@pushover.net`.\n\nYou do not need to set `PUSHOVER_TOKEN` in this mode.\n\n### Enabling TLS\n\nTo quickly generate your own cert:\n\n```\n$ openssl req -newkey rsa:4096 -nodes -sha512 -x509 -days 3650 -nodes -out mycert.pem -keyout mycert.key\n```\n\n(This is self-signed, so production email clients will reject it by default.\nFor an authentic certificate, request one from a service like\n[Let's Encrypt](https://letsencrypt.org).)\n\nThere are three possible operating modes depending on whether you want to\nencrypt the entire session or kickstart unencrypted connections with STARTTLS -\nand if you use STARTTLS, whether or not to mandate encryption. For a historical\ndiscussion of the differing standards, see this [overview by\nFastmail](https://www.fastmail.com/help/technical/ssltlsstarttls.html).\n\n| Arguments | Mode |\n| --- | --- |\n| `-tls-cert mycert.pem -tls-key mycert.key` | Immediate TLS encryption |\n| `-tls-cert mycert.pem -tls-key mycert.key -starttls` | Initial connection unencrypted, optional upgrade to TLS |\n| `-tls-cert mycert.pem -tls-key mycert.key -starttls-always` | Initial connection unencrypted, mandatory upgrade to TLS |\n\n### Enabling authentication\n\nTo password-protect your server, use the `-auth` switch to provide a path to a\ncredentials file, where each line represents an authorized login in the form of\n`username:password`.\n\n```\n$ cat \u003emycreds.txt \u003c\u003cEOF\nryan:hunter2\neinstein:letmein\nEOF\n$ chmod 600 mycreds.txt\n$ smtp-translator -addr :2525 -auth mycreds.txt\n```\n\nA valid login will then be required to submit any messages. Provide usernames\nand passwords to your SMTP clients as you would for any SMTP server that\nrequires authentication. If not using TLS, clients must support the CRAM-MD5\nauthentication method so that they do not reveal passwords in transit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYoRyan%2Fsmtp-translator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FYoRyan%2Fsmtp-translator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYoRyan%2Fsmtp-translator/lists"}