Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moarc/smtp2xmpp
A primitive SMTP to XMPP gateway
https://github.com/moarc/smtp2xmpp
xmpp xmpp-component
Last synced: 3 months ago
JSON representation
A primitive SMTP to XMPP gateway
- Host: GitHub
- URL: https://github.com/moarc/smtp2xmpp
- Owner: Moarc
- License: other
- Created: 2022-04-03T16:30:52.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-09-18T10:59:32.000Z (over 1 year ago)
- Last Synced: 2024-10-14T04:21:10.442Z (3 months ago)
- Topics: xmpp, xmpp-component
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.SleekXMPP
Awesome Lists containing this project
README
## Prelude
I wanted to pass messages from [lilac](https://github.com/archlinuxcn/lilac) to Jabber, since I don't run a mail server. There was one archived project like that on GitHub, written in Go using an XMPP library that was wiped off the face of the internet a long time ago. I didn't want to bother the author of the library (who may or may not still have the code that he deleted from GitHub), and not knowing Go, I turned to Python. 'This can't be all that hard', I thought to myself. The result is this mess.## What is it?
An extremely crude XMPP component that receives mail as a SMTP server and relays it to a specified set of XMPP users. Put together in a single morning and polished (yeah, right) in the afternoon.Initially copied verbatim from ["XMPP ToDo List Example"](https://github.com/ntoll/xmppComponent), which seems to be a modified example from the SleekXMPP project. Supplemented with [usage examples](https://aiosmtpd.readthedocs.io/en/latest/controller.html) from aiosmtpd docs. Modified to accept a socket passed by systemd, since that allows us to listen on port 25 as an unpriviledged user.
## Licensing
Since the component example originally came from SleekXMPP, it's [MIT-licensed](LICENSE.SleekXMPP), I guess? The `receive_systemd_socket` function is a modification of `aiosmtpd.controller.InetMixin._create_server` from aiosmtpd, and the `MailHandler` class was copied directly from their docs, their code is under [Apache 2.0](LICENSE.aiosmtpd). I haven't published much code before, so if anyone gets outraged about the licensing - don't beat me too hard, contact me, and we'll clarify the situation.