Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not work the config SMTP to send email #160

Open
superbully opened this issue Jan 31, 2024 · 1 comment
Open

Not work the config SMTP to send email #160

superbully opened this issue Jan 31, 2024 · 1 comment

Comments

@superbully
Copy link

First of all, I would like to thank you for your contribution to this project.
I have deployed your project perfectly, it work fine. When i pass the enverionment for smtp in the docker-compose, it work, i can see inside the container, in the configuration postfix, the variable "relayhost", "inet_protocols", ... . apparently everything is fine.
I have tried to send a email from container console, with the command mail, but not work and obviously, nagios notifications do not work.
Also, i don´t find the log mail from postfix container .....
Any ideas ? What I might be doing wrong ?
Thank you so much.

@wolframroesler
Copy link

Not sure what your problem is but in order to send e-mails I had to add the following to my Dockerfile:

RUN echo "my_smtp_password" >/etc/postfix/sasl_passwd && \
    chmod 600 /etc/postfix/sasl_passwd && \
    postmap /etc/postfix/sasl_passwd && \
    rm /etc/postfix/sasl_passwd && \
    postconf -e 'myhostname = my_host_name.example.com' && \
    postconf -e 'relayhost = my_smtp_server.example.com:587' && \
    postconf -e 'smtp_sasl_auth_enable = yes' && \
    postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd' && \
    postconf -e 'smtp_sasl_security_options =' && \
    /etc/init.d/postfix restart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants