Skip to content

Optional generation of Diffie-Hellman Parameters #25

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,8 @@ Available states
------------

Installs and configures the dovecot package, and ensures that the associated dovecot service is running.

``dovecot.dh``
--------------

Creates Diffie-Hellman Parameters at the path defined in Pillar `dovecot:ssl:dhparam:path`.
8 changes: 8 additions & 0 deletions dovecot/dh.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{%- from "dovecot/map.jinja" import dovecot with context %}

dovecot-dh-create-dhparam-file:
cmd.run:
- name: "openssl dhparam {{ dovecot.ssl.dhparam.numbits }} > {{ dovecot.ssl.dhparam.path }}"
- creates: {{ dovecot.ssl.dhparam.path }}
- watch_in:
- service: dovecot_service
12 changes: 12 additions & 0 deletions dovecot/map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@
'ssl_certs_dir': '/usr/local/etc/ssl/certs',
'ssl_keys_dir': '/usr/local/etc/ssl/private',
},
'ssl': {
'dhparam': {
'path': '/usr/local/etc/dovecot/dh.pem',
'numbits': 2048
}
},
'packages': ['dovecot'],
'root_group': 'wheel',
},
Expand All @@ -93,6 +99,12 @@
'ssl_certs_dir': '/etc/ssl/private',
'ssl_keys_dir': '/etc/ssl/private',
},
'ssl': {
'dhparam': {
'path': '/etc/dovecot/dh.pem',
'numbits': 2048
}
},
'packages': ['dovecot-core','dovecot-imapd'],
'root_group': 'root',
},
Expand Down
4 changes: 4 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ dovecot:
lookup:
enable_service_control: True
service_persistent: True
ssl:
dhparam:
path: /etc/dovecot/dh.pem
numbits: 2048
config:
local: |
# main
Expand Down