containers icon indicating copy to clipboard operation
containers copied to clipboard

[bitnami/moodle] sendmail: not found

Open curiousgeorgios opened this issue 1 year ago • 6 comments

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

curiousgeorgios avatar Feb 22 '24 11:02 curiousgeorgios

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

if0else9 avatar Feb 24 '24 23:02 if0else9

@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

curiousgeorgios avatar Feb 24 '24 23:02 curiousgeorgios

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

if0else9 avatar Feb 24 '24 23:02 if0else9

@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 :)

curiousgeorgios avatar Feb 25 '24 00:02 curiousgeorgios

Same with email. Nothing works.

kodpssgovua avatar Feb 25 '24 11:02 kodpssgovua

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

dgomezleon avatar Feb 26 '24 10:02 dgomezleon

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] avatar Mar 13 '24 01:03 github-actions[bot]

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.

github-actions[bot] avatar Mar 19 '24 01:03 github-actions[bot]