bitnami / containers

Bitnami container images
https://bitnami.com
Other
3.43k stars 4.89k forks source link

[bitnami/moodle] sendmail: not found #63311

Closed curiousgeorgios closed 8 months ago

curiousgeorgios commented 8 months ago

Name and Version

bitnami/moodle:latest

What architecture are you using?

amd64

What steps will reproduce the bug?

have set up SMTP in .env file as:

MOODLE_SMTP_HOST=email-smtp.ap-southeast-2.amazonaws.com
MOODLE_SMTP_PORT=587
MOODLE_SMTP_USER= (bunch of capital letters as per AWS IAM SMTP user name)
MOODLE_SMTP_PASSWORD=(SMTP password from AWS IAM for amazon SES)
MOODLE_SMTP_PROTOCOL=(have tried both "tls and "STARTTLS")

Looking at the logs I see:

moodle-1 | sh: 1: /usr/sbin/sendmail: not found

I have also tried to install sendmail and ssmtp by connecting into the docker container but I was getting "domain is not verified" issues, even though my domain is verified and can send a test email from Amazon SES

What is the expected behavior?

Email should be sent successfully.

What do you see instead?

moodle-1 | sh: 1: /usr/sbin/sendmail: not found

Additional information

No response

if0else9 commented 8 months ago

Get the same problem! Is it possible to solve this?

curiousgeorgios commented 8 months ago

@if0else9 finally got it working by connecting to docker container and installing sendmail + setting up the config:

  1. sudo docker exec -it moodle /bin/bash
  2. apt install sendmail
  3. update ssmtp.conf and then try to send a test e-mail using sendmail - my example below is for Amazon SES
cat > /etc/ssmtp/ssmtp.conf <<EOL
root=<from email address>
mailhub=email-smtp.ap-southeast-2.amazonaws.com:465
AuthUser=<amazon ses user >
AuthPass=<amazon ses pass>
UseTLS=YES
AuthMethod=LOGIN
FromLineOverride=YES
EOL
if0else9 commented 8 months ago

@thedigitalnachos Thank you for your idea. You save nonprofit organisation. :-)

curiousgeorgios commented 8 months ago

@thedigitalnachos Thank you for your idea. You save nonprofit organisation. :-)

hahah no worries, if you need any other help feel free to reach out to me through digitalnachos.com.au - always happy to have a chat :)

kodpssgovua commented 8 months ago

Same with email. Nothing works.

dgomezleon commented 8 months ago

Thank you @thedigitalnachos for sharing your solution.

In order to create an extended image with sendmail, you can add the following line to Dockerfile:

RUN install_packages sendmail
github-actions[bot] commented 8 months ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 8 months ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.