[Support] devzwf - Postfix-Relay


Recommended Posts

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.

  • Like 1
Link to comment
  • 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.

Link to comment
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.

 

Link to comment
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 ?

Link to comment
  • 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.

Link to comment
  • 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.

Link to comment
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

Link to comment
  • 4 months later...

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.