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

Allow own certificates #15

Merged
merged 3 commits into from
Oct 30, 2016
Merged

Allow own certificates #15

merged 3 commits into from
Oct 30, 2016

Conversation

nelfer
Copy link
Contributor

@nelfer nelfer commented Oct 28, 2016

Skip generation of certificates if one already exists. This will allow the use of your own certificates via volume mounting

Skip generation of certificates if one already exists. This will allow the use of your own certificates via volume mounting
Setting activates TLS from SMF to destination server
@huan
Copy link
Owner

huan commented Oct 28, 2016

It looks great!

could you add a brief user document into README? for example:

  1. how to generate SSL cert through letsencrypt(you had already written in the issue)
  2. how to start SMF with using an existing SSL cert by --volume .

that would be sweet for new users.

thanks for the contribution! 👍

@nelfer
Copy link
Contributor Author

nelfer commented Oct 29, 2016

OK I will do that (probably tomorrow)
I'm running it now to test it, and everything seems to work.
And I agree, that is better if the pull request includes the documentation of how to use the new feature.

@huan huan merged commit adff02b into huan:master Oct 30, 2016
@huan
Copy link
Owner

huan commented Oct 30, 2016

great document!
merged.

@bcardiff
Copy link
Contributor

I want to say thanks again :-)
We are using this PR with letsencrypt certificates.

I took me a little while to notice that:

  1. letsencrypt generated privkey.pem is smtp.key and letsencrypt generated fullchain.pem is smtp.cert (newbie with certificates)
  2. when mounting the symlinked files, these are not readable in the container. And letsencrypt suggest not to copy files around.

So we are now doing:

# in host
ln -s /data/cert/etc/letsencrypt/live/__DOMAIN__/privkey.pem /data/mail/certs/smtp.key
ln -s /data/cert/etc/letsencrypt/live/__DOMAIN__/fullchain.pem /data/mail/certs/smtp.cert

(where /data/cert/etc/letsencrypt is the mounted /etc/letsencrypt in certbot container. )

And this image is mounted with the following volumes so the symlinks are accessible and we don't need to copy cert around.

...
volumes:
    - '/data/mail/certs:/etc/postfix/cert'
    - '/data/cert/etc/letsencrypt:/data/cert/etc/letsencrypt:ro'

@huan
Copy link
Owner

huan commented Feb 20, 2017

Thanks to point this out!

Could you please make a PR to document it in the readme so it can help others in the future ?

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