ZappyZap Posted November 14, 2022 Share Posted November 14, 2022 Application Name: Postfix-Relay Application: https://github.com/loganmarchione/docker-postfixrelay Description : This runs Postfix (as a relay) in Docker. Most home ISPs block port 25, so outbound emails must be relayed through an external SMTP server (e.g., Gmail). This container acts as a single collections point for devices needing to send email. ⚠️ Postfix acts as an open relay. As such, this is not meant to be run on the internet, only on a trusted internal network! You must already have a account on an external SMTP server (e.g., Gmail, AWS SES, etc...). Your external SMTP server must be using encryption (i.e., plaintext is not allowed) Make sure to look at the complete documentation Please post any questions/issues relating to this docker template you have in this thread. 1 Quote Link to comment
ksarnelli Posted December 10, 2022 Share Posted December 10, 2022 Thanks for packaging this up - I currently have my postfix relay running on a raspberry pi but now I'm setting up this container as a backup. One small ask - can you make the 'mynetworks' setting (in /etc/postfix/main.cnf) configurable as an environment variable? Right now it defaults to 0.0.0.0/0 but I'd like to lock it down to particular hosts. Quote Link to comment
ZappyZap Posted December 11, 2022 Author Share Posted December 11, 2022 I am using https://github.com/loganmarchione/docker-postfixrelay i could probably do that , but it would require me to build the conatiner myself. I always priviledge the official container when it exist you could ask on the project see if he is willing to do so. 1 Quote Link to comment
ksarnelli Posted December 12, 2022 Share Posted December 12, 2022 19 hours ago, ZappyZap said: I am using https://github.com/loganmarchione/docker-postfixrelay i could probably do that , but it would require me to build the conatiner myself. I always priviledge the official container when it exist you could ask on the project see if he is willing to do so. Thanks, will do. Quote Link to comment
ZappyZap Posted December 12, 2022 Author Share Posted December 12, 2022 @ksarnelli Nice i saw you raise an issue and the developer said he will take it... https://github.com/loganmarchione/docker-postfixrelay/issues/8 as soon as he modify it i will update the template. remind me if i forgot. thanks 1 Quote Link to comment
ZappyZap Posted December 13, 2022 Author Share Posted December 13, 2022 @ksarnelli template updated to match the new Env variable added in v 1.3.0 Let me know 1 Quote Link to comment
ksarnelli Posted December 13, 2022 Share Posted December 13, 2022 32 minutes ago, ZappyZap said: @ksarnelli template updated to match the new Env variable added in v 1.3.0 Let me know Thanks @ZappyZap - everything checks out! Quote Link to comment
flinte Posted December 18, 2022 Share Posted December 18, 2022 Can this be utilized with Office365 instead of Gmail? I find that its quite finicky and a lot of my other self hosted applications SMTP notification settings cant use it. I would love to have a local postfix relay that I could point those applications to. Quote Link to comment
ZappyZap Posted December 18, 2022 Author Share Posted December 18, 2022 1 hour ago, flinte said: Can this be utilized with Office365 instead of Gmail? I find that its quite finicky and a lot of my other self hosted applications SMTP notification settings cant use it. I would love to have a local postfix relay that I could point those applications to. i dont really get you quetsion. you can use that with what ever you want as you configure your relay. and what is quite finicky ? Quote Link to comment
ThrashMan Posted June 27, 2023 Share Posted June 27, 2023 Good evening, this is a gr8 little container. I've had to hack the postfix configs as I'm relaying through my email address' SMTP server and so emails have to come from my address. I used this: (taken from: https://serverfault.com/questions/147921/forcing-the-from-address-when-postfix-relays-over-smtp) This is how to really do it in postfix. This config changes sender addresses from both local originated, and relayed SMTP mail traffic: /etc/postfix/main.cf: sender_canonical_classes = envelope_sender, header_sender sender_canonical_maps = regexp:/etc/postfix/sender_canonical_maps smtp_header_checks = regexp:/etc/postfix/header_check Rewrite envelope address from email originating from the server itself /etc/postfix/sender_canonical_maps: /.+/ [email protected] Rewrite from address in SMTP relayed e-mail /etc/postfix/header_check: /From:.*/ REPLACE From: [email protected] Would it be possible to build this into the template, please? The current MYORIGIN is expecting a domain......if the user enters an email address then apply the above? thanks, Andy. Quote Link to comment
ZappyZap Posted June 27, 2023 Author Share Posted June 27, 2023 Great info there, but i am not the maintainer of the docker image , i just implement the unraid template using https://github.com/loganmarchione/docker-postfixrelay i am not changng anything in the conf file Quote Link to comment
lmm7425 Posted September 20, 2023 Share Posted September 20, 2023 Hello there 👋 I'm the container author and just updated it to fix the issue above. Version `1.4.1` contains a new variable called `FROMADDRESS` that you can set to fix the issue. I was unable to replicate it (I don't use Unraid and I'm using AWS SES, which doesn't seem to need that variable), but a user on GitHub tested and confirmed that it fixed their issue. Quote Link to comment
ZappyZap Posted September 20, 2023 Author Share Posted September 20, 2023 5 hours ago, lmm7425 said: Hello there 👋 I'm the container author and just updated it to fix the issue above. Version `1.4.1` contains a new variable called `FROMADDRESS` that you can set to fix the issue. I was unable to replicate it (I don't use Unraid and I'm using AWS SES, which doesn't seem to need that variable), but a user on GitHub tested and confirmed that it fixed their issue. Thanks the container should get updated next round i will give it a test Quote Link to comment
James Miller Posted February 17 Share Posted February 17 Hi, I'm not sure if it's something I've done, but the docker container is always showing as 'unhealthy'? Quote Link to comment
ZappyZap Posted February 17 Author Share Posted February 17 weird i am running this one personnaly for many month with no issue, it is getting updated often tho (some would say too much ) but is it working still ? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.