GithubHelp home page GithubHelp logo

tecnativa / docker-postfix-relay Goto Github PK

View Code? Open in Web Editor NEW
19.0 7.0 25.0 39 KB

SMTP server and SMTP relay host

License: Apache License 2.0

Shell 64.62% Dockerfile 35.38%
smtp-relay docker-image postfix

docker-postfix-relay's Issues

allow postfix "mynetworks" editing

Hi,

Thanks for the easy postfix installation.

Is there an easy way to extend the "mynetworks" postfix config please?
For example I'd like to allow several local subnets.. or even (10.0.0.0/8).

Regards,
Andrea

How is rejection of target smtp server handled?

Hello,

How is the situation handled when the target smtp server rejects a request for example because of a rate limit? Will the relay buffer the mail and try again later, or is the mail lost?
Thanks!

Feedback & suggested improvements

Was looking for an SMTP agent to combine with a Docker instance. Found this, but it seems to hiccup in my test environment at least.

  1. Suggested docker-compose.yaml ; based in part on other SMTP docker stuff I found. This also documents the fact that postfix fires up as port 25.
smtp:
  restart: always
  build: .
  ports:
   - "25:25"
  environment:
    MAIL_RELAY_PORT: '587'
    MAIL_RELAY_HOST: 'smtp-relay.gmail.com'
    MAIL_RELAY_USER: '[email protected]'
    MAIL_RELAY_PASS: 'Password'
    RELAYHOST: 'smtp-relay.gmail.com'
  1. The content in the Dockerfile for building up the Postfix configuration: it may need adjustment to allow Docker networks from 172.17.0.1/12 and/or 172.18.0.1/12 to connect (saw that come up in the logs at least once).

  2. I tried to munge in additional environment values into the Postfix config. Not sure that's being successful. May have more luck using the docker-compose to import a customized main.cf ?

docker smtp relay to enable scanner to send mail

Hopefully, you can help me getting the smtp-relay configured right. I have a HP Color LaserJet CM6040 MFP that is able to scan documents and send them to an smtp gateway. Since this machine is somewhat older it does not support TLS. I like to solve this by using a plain (unsafe) smtp relay in my local network an then have that foreward it using my google account with TLS. Somehow, I could not get this working. This is what I have set up:

On my server in the local network I have started the docker image for postfix-relay:

sudo docker --name smtp -d --restart=always -p 25:25 -e MAIL_RELAY_HOST='smtp.gmail.com' -e MAIL_RELAY_PORT='587' -e MAIL_RELAY_USER='[email protected]' -e MAIL_RELAY_PASS='supersecretpassword' tecnativa/postfix-relay

My printer points to this local server on port 25 with no SSL and no authentication.
I scan a page and tell the printer to send it to [email protected]
The printer recognises the smtp gateway and send its data, but a few seconds later it says something like "could not send data because mail gateway rejected"

Waht am I doing wrong?

Container won't start if multiple routes are present

Hi,

when multiple routes are present the container won't start:

postconf: fatal: -e, -X, or -# accepts no multi-line input

The problematic line in entrypoint is:

routes=$(ip route | grep -v default | cut -d' ' -f1)

When you have more than one route, routes will be a multi line array:

ip route | grep -v default | cut -d ' ' -f1
10.0.0.0/24
10.0.1.0/24
172.18.0.0/16

When you change the line to

routes=$(ip route | grep -v default | cut -d' ' -f1 | tr '\n' ' ')

All routes are poperly set in main.cf.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.