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

Feat: Add support for host.docker.internal for SSMTP. #1073

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

steveworley
Copy link
Contributor

The generated ssmtp.conf file from the entrypoint can now determine if host.docker.internal has a valid mailhog instance running.

php:/app$ cat /etc/ssmtp/ssmtp.conf
# ssmtp config (will be filled during entrypoint 50-ssmtp.sh)

# Email 'From header's can override the default domain
FromLineOverride=yes

mailhub=host.docker.internal:1025

php:/app$ nc -zv host.docker.internal 1025
host.docker.internal (192.168.65.254:1025) open

php:/app$ sendmail -v  [email protected] < /tmp/mail.txt
[<-] 220 mailhog.example ESMTP MailHog
[->] HELO 7ab411118f33
[<-] 250 Hello 7ab411118f33
[->] MAIL FROM:<user@7ab411118f33>
[<-] 250 Sender user@7ab411118f33 ok
[->] RCPT TO:<[email protected]>
[<-] 250 Recipient [email protected] ok
[->] DATA
[<-] 354 End data with <CR><LF>.<CR><LF>
[->] Received: by 7ab411118f33 (sSMTP sendmail emulation); Wed, 07 Aug 2024 02:46:20 +0000
[->] From: "user" <user@7ab411118f33>
[->] Date: Wed, 07 Aug 2024 02:46:20 +0000
[->] Subject: Test mail
[->]
[->] This is a test email.
[->] .
[<-] 250 Ok: queued as [email protected]
[->] QUIT
[<-] 221 Bye

image

@steveworley
Copy link
Contributor Author

Fixes #1072

steveworley added a commit to govCMS/scaffold that referenced this pull request Aug 8, 2024
The following pull request will add support for pygmy mailhog particularly on mac:

uselagoon/lagoon-images#1073

This revert will allow multiple local sites to be run.

Fixes #94
Copy link
Member

@tobybellwood tobybellwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from me too - thanks @steveworley and @stooit (and @silverham for the digging)

@tobybellwood tobybellwood merged commit d9edc75 into uselagoon:main Aug 8, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants