20
submitted 11 months ago* (last edited 11 months ago) by tofubl@discuss.tchncs.de to c/selfhosted@lemmy.world

Hi fellow self-hosting lemmings,

In an SME setting, I'm looking for a service to regularly fetch mails from an IMAP server and print incoming mails and attachments on a local network printer based on rules (e.g., only print mails where the subject contains a specific word.)

Does a solution like that exist, ideally with a browser frontend to set it up?

Thank you!

you are viewing a single comment's thread
view the rest of the comments
[-] ikidd@lemmy.world 2 points 10 months ago* (last edited 10 months ago)

Nicely done, for not a JS guy. I'd have be a while longer figuring out that process.

Not sure what to suggest on the scaling, that might be happening in your conversion to PCL, you might be able to execute that as a ghostscript process on the host and then just stream the resulting file out of the filesystem to the print node, or even just drop it to a queue folder and cut the IPP node out entirely to eliminate it as a source of the scaling.

Edit: https://github.com/NickNaso/ghostscript4js

[-] tofubl@discuss.tchncs.de 2 points 10 months ago* (last edited 10 months ago)

A very welcome compliment after this ordeal. Thank you! :)

The cleanest way to solve the scaling issue would probably be to go into the pdf2pic module and hack it open to accept the "pcl:fit-to-page" option that GraphicsMagick (the underlying software package doing the actual conversion from PDF to PCL) supports. (Supposing it actually does what it says. I'm not so sure about anything in printer land anymore.)

But since this whole thing is for internal documents only and the scaling can probably be estimated by choosing better values for width/height to account for printer margins I most likely won't bother.

Thanks again for suggesting Node-RED. I'm very happy with the result.

this post was submitted on 19 Dec 2023
20 points (91.7% liked)

Selfhosted

40198 readers
703 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS