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

Busybox sendmail is not working with mailhog and Drupal 10 #566

Closed
webprogrammierer opened this issue Feb 27, 2024 · 5 comments
Closed

Busybox sendmail is not working with mailhog and Drupal 10 #566

webprogrammierer opened this issue Feb 27, 2024 · 5 comments

Comments

@webprogrammierer
Copy link

webprogrammierer commented Feb 27, 2024

OS type
Linux, Docker Desktop for Windows

Drupal version
10.2

Describe the bug

Mailhog configuration like this

      # For PHP 8.2 use busybox sendmail together with "PHP_MAIL_MIXED_LF_AND_CRLF=On".
#      PHP_MAIL_MIXED_LF_AND_CRLF: On
#      PHP_SENDMAIL_PATH: '/bin/busybox sendmail -t -i -S mailhog:25'
##      PHP_SENDMAIL_PATH: '/bin/busybox sendmail -t -i -S opensmtpd:25'
      # For PHP <8.2 use ssmtp instead of sendmail.
      SSMTP_MAILHUB: mailhog:1025
      # SSMTP_MAILHUB: opensmtpd:25
      PHP_SENDMAIL_PATH: '"/usr/bin/dos2unix -u | /usr/sbin/ssmtp -t -f"'

is working with PHP 8.1 and PHP 8.2

Mailhog configuratin like this

      # For PHP 8.2 use busybox sendmail together with "PHP_MAIL_MIXED_LF_AND_CRLF=On".
      PHP_MAIL_MIXED_LF_AND_CRLF: On
      PHP_SENDMAIL_PATH: '/bin/busybox sendmail -t -i -S mailhog:25'
#      PHP_SENDMAIL_PATH: '/bin/busybox sendmail -t -i -S opensmtpd:25'
      # For PHP <8.2 use ssmtp instead of sendmail.
#      SSMTP_MAILHUB: mailhog:1025
#      # SSMTP_MAILHUB: opensmtpd:25
#      PHP_SENDMAIL_PATH: '"/usr/bin/dos2unix -u | /usr/sbin/ssmtp -t -f"'

is NOT working with PHP 8.2 and Drupal 10.

Therefore I do not understand, what is this section for, if it does not work?

The new configuration

      # For PHP 8.2 use busybox sendmail together with "PHP_MAIL_MIXED_LF_AND_CRLF=On".
      PHP_MAIL_MIXED_LF_AND_CRLF: On
      PHP_SENDMAIL_PATH: '/bin/busybox sendmail -t -i -S mailhog:25'

is not working in Drupal 10.
This is confusing and you have to spend a lot of time to figure it out and adjust default compose.yml file.

How can this be treated in the future?

@webprogrammierer webprogrammierer changed the title Busybox sendmail not working with mailhog and Drupal 10 Busybox sendmail is not working with mailhog and Drupal 10 Feb 27, 2024
@csandanov
Copy link
Member

Hi, could you please try removing -f flag and keep it as:

'"/usr/bin/dos2unix -u | /usr/sbin/ssmtp -t"'

@webprogrammierer
Copy link
Author

I have testet it csandanow:

'"/usr/bin/dos2unix -u | /usr/sbin/ssmtp -t"'
is also working.

But why did you want this to be tested?
Please re-read my initial issue. The problem is located here:

      # For PHP 8.2 use busybox sendmail together with "PHP_MAIL_MIXED_LF_AND_CRLF=On".
      PHP_MAIL_MIXED_LF_AND_CRLF: On
      PHP_SENDMAIL_PATH: '/bin/busybox sendmail -t -i -S mailhog:25'

This is NOT working.
Please help to solve this or this lines should be removed from compser.yml.

@csandanov
Copy link
Member

What your PHP image tag?

@webprogrammierer
Copy link
Author

PHP_TAG=8.2-dev-4.53.2

@csandanov
Copy link
Member

Oh, I see, the port is incorrect for mailhog, it should be 1025. Anyway, we're switching to msmtp for all versions in the upcoming update

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