Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] devzwf - Postfix-Relay

Featured Replies

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.

  • 4 weeks later...

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.

  • Author

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.

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.

 

  • Author

@ksarnelli template updated to match the new Env variable added in v 1.3.0

Let me know

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!

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.

  • Author
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 ?

  • 6 months later...

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.

  • Author

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

 

  • 2 months later...

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.

  • Author
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

  • 4 months later...

Hi,

 

I'm not sure if it's something I've done, but the docker container is always showing as 'unhealthy'?

  • Author

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 ?

  • 7 months later...
On 2/17/2024 at 11:36 AM, ZappyZap said:

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 ?

 

Definitely seems to be updated often.  What is changing with each update as the changelog isn't being updated?

  • Author
37 minutes ago, kyw.wong said:

 

Definitely seems to be updated often.  What is changing with each update as the changelog isn't being updated?

i think it is his CI/CD
check https://github.com/loganmarchione/docker-postfixrelay

i do not change anything on my end

  • 3 months later...

I love this container, I just wish it didn't update so often for no reason. I checked the github and it generates a new docker image on schedule every week, no matter if there was a change or not. I have quite the custom config and don't want to update unless absolutely necessary. Do you think it would be better to create my own custom image? Mine is customized to work as a universal relay for forwardemail.net, using their catch-all alias to attach the original sender as the from address, skipping the whole "relay address" thing altogether.

  • Author
On 1/6/2025 at 10:22 AM, pacnpal said:

I love this container, I just wish it didn't update so often for no reason. I checked the github and it generates a new docker image on schedule every week, no matter if there was a change or not. I have quite the custom config and don't want to update unless absolutely necessary. Do you think it would be better to create my own custom image? Mine is customized to work as a universal relay for forwardemail.net, using their catch-all alias to attach the original sender as the from address, skipping the whole "relay address" thing altogether.

I am agree  , this is just insane ....
You can totally fork or create your own custom image and replace the Repository in unraid.
 

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.