SMTP server for forwarding mail to Matrix? reddit / selfhosted ---------------------------------------------------------------------- incoggnito2 · 2023-10-28 11:38 So I am hosting multiple services in my homelab. I search for a secure way to send the mails via smtp in my local network to a selfhosted matrix and then via https to my phone. Any interesting projects or simalar self controlled ways?Hello! I'm running multiple services in my home lab and I'm looking for a secure method to send emails via SMTP within my local network to a self-hosted Matrix server, and then securely access those messages via HTTPS on my phone. Are there any interesting projects or self-controlled solutions you can recommend for this setup? ---------------------------------------------------------------------- heydroid · 2023-10-28 11:53 you can set up postfix to pipe the email to a script of your choice. From there you can write a script to forward the message to Matrix. your transport map file you will add a like [matrix.server.](https://matrix.server.com)local emailtomatirx: Them in [Master.cf](https://Master.cf) you will add two lines at the bottom using the emailtomatirx name to pipe it to a script. THen when you send an email to user@matrix.server.local it will pipe it to your script, and you can do whatever from there. ---------------------------------------------------------------------- incoggnito2 · 2023-10-28 11:58 Thank you, do run this yourself? ---------------------------------------------------------------------- heydroid · 2023-10-28 12:31 I do, still working out some kinks in the script side, but postfix is solid. You can still have postfix forward out all other email to a relay or however you want. If you go this route, I can get you more detailed config files. ---------------------------------------------------------------------- Old-Satisfaction-564 · 2023-10-28 16:25 https://github.com/devture/email2matrix ---------------------------------------------------------------------- incoggnito2 · 2023-10-28 17:18 I am currently going this route with a fresh Alpine 3.18, currently I am still setting up a new Matrix Synapse instance. I am not that familiar with postfix yet. If you can share any links or pointers to your configuration that would be very helpful. ---------------------------------------------------------------------- p_ng · 2023-10-28 18:39 Thumbs up for postmoogle! ---------------------------------------------------------------------- incoggnito2 · 2023-10-28 18:46 I would like to know how to install postmoogle without docker. :) ---------------------------------------------------------------------- pewpewdev · 2023-10-28 19:21 You should get a look at mailrise. Its apprise with email support. I have been using it for awhile now and it works perfectly ---------------------------------------------------------------------- incoggnito2 · 2023-10-28 19:25 >mailrise That looks very nice. I will devinitly give it a try! ---------------------------------------------------------------------- heydroid · 2023-10-28 19:32 [https://www.thejml.info/devops/passing-email-to-scripts-with- postfix](https://www.thejml.info/devops/passing-email-to-scripts-with- postfix) I used python not php, but you can pick the language of your choice. ---------------------------------------------------------------------- Old-Satisfaction-564 · 2023-10-28 22:15 It was mentioned in the official matrix newsletter, kind of official recognition ... [https://matrix.org/blog/2023/09/22/this-week-in- matrix-2023-09-22/](https://matrix.org/blog/2023/09/22/this-week-in- matrix-2023-09-22/) ​ apparently it is go application so it will compile to a single file, read the Dockerfile, the script that builds the docker image, and do the same.