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

After setting values for CERTIFICATE_PATH and KEY_PATH, still can send emails without certs #68

Open
ericqqqqq opened this issue May 14, 2020 · 1 comment

Comments

@ericqqqqq
Copy link

Problem
Hi, I am using namshi/smtp to be my smarthost SMTP relay for SendGrid. I need to enable TLS so that the SMTP replay only handles requests with certs. Therefore, I set the values for CERTIFICATE_PATH and KEY_PATH to enable TLS.

Performed
I ran the following command to initialize the container:

docker run -p 25:25 -v $(pwd)/:/etc/ssl/certs \
    -e "KEY_PATH=/etc/ssl/certs/MyKey.key" \
    -e "CERTIFICATE_PATH=/etc/ssl/certs/MyCertificate.crt" \
    -e "SMARTHOST_ADDRESS=smtp.sendgrid.net" \
    -e "SMARTHOST_USER=apikey" \
    -e "SMARTHOST_ALIASES=*" \
    -e "SMARTHOST_PORT=587" \
    -e "SMARTHOST_PASSWORD=MY_API_KEY" \
    namshi/smtp

Then I sent a testing email with this code

Expected Result
The email is supposed to be blocked because no cert is provided.

Actual Result
The email is sent.

Any suggestions?

@ericqqqqq
Copy link
Author

ericqqqqq commented Jun 22, 2020

Hey, @oba11

I added a feature to allow TLS for a smart host, SendGrid in my case. Check here for my implementation.

My implementation works perfectly for my needs. It would be cool if we try to merge it to your master. I am here for your feedbacks.

Here are some example codes to test the feature I added.

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

1 participant