SMTP2Paperless
NOTE: when I refer to "paperless" I always mean paperless-ngx, since that is the only relevant version of paperless today.
What?
A "SMTP to Paperless API" proxy.
You configure your document scanner to send scans as emails via SMTP to this software with a recipient of <paperless-token>@<paperless-domain>
and the proxy will forward the attached scans to the Paperless API's document post endpoint of the chosen paperless instance.
The proxy is stateless, it simply looks at the recipient of the received message to determine where to post the document to. The paperless domain must be in a whitelist to be the target of the proxy (this is to stop anyone from abusing the proxy to send post requests to arbitrary domains, since there is no additional authentication happening).
The proxy must be hosted with TLS to avoid leaking the Paperless API tokens send in the recipient fields.
Why?
I wanted a document scanner that could scan directly to the Paperless API's document post endpoint, but apparently there is none (some Doxie scanner can allegedly do this, but as far as I know it is not officially supported). Since many scanners can send scans by email SMTP sounded like the next best thing. I didn't want to add a mailbox as a "man-in-the-middle" though (and use paperless' IMAP feature), since I would either have to self-host that or be fine with a third-party receiving all of my physical mail and other scans on top of my normal email. That seemed a bit unnecessary. So I built a simple "SMTP to Paperless API" proxy instead.
How?
smtp2paperless --host <host> --port <port> --cert <cert-file> --key <key-file> --allowed_domains <paperless-domain>
Make it a systemd service or do whatever else you do to run your services.
Then configure your scanner to send mails via the SMTP proxy at your IP and chosen port. No authentication required.
Last,
add a recipient address in the format <paperless-token>@<paperless-domain> to your scanners address book
and send a scan to that address.
It should now show up on your paperless instance.
Metadata
Release files for smtp2paperless 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smtp2paperless-0.0.3.tar.gz | 23.4 kB | Without provenance | Details for smtp2paperless-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| smtp2paperless-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for smtp2paperless-0.0.3-py3-none-any.whl |
Total release size: 31.4 kB
Release files / smtp2paperless-0.0.3.tar.gz
| Download URL | smtp2paperless-0.0.3.tar.gz |
|---|---|
| Size | 23.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61f9f4f2a82b81b422c5314d1aaa2d418b24531ca346b1861f0c8b993bb09d84
|
|
BLAKE2b-256 checksum How to use checksums |
c9baaeead8ab0d7ec1725a2ed46a0b1e5760443fd770d25affc1ef5898f12fd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / smtp2paperless-0.0.3-py3-none-any.whl
| Download URL | smtp2paperless-0.0.3-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
767fe4ea6f2e946727ad7ca352e8a23278bb83f973bbdf537988be93f4aa7e05
|
|
BLAKE2b-256 checksum How to use checksums |
8a9d342b07c19dfa50f50666df92b3bff9d08c96f3c75d1aa08d9971c99bfab7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for smtp2paperless 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.