master.cf: added dovecot

This commit is contained in:
Alexander Weidinger 2017-12-08 14:04:35 +01:00
parent 4c7c2a269d
commit caee184158
4 changed files with 18 additions and 1 deletions

View File

@ -1,6 +1,14 @@
postfix:
manage_master_config: True
master_config:
enable_dovecot: False
# The following are the default values:
dovecot:
user: vmail
group: vmail
flags: DRhu
argv: "/usr/lib/dovecot/deliver -d ${recipient}"
enable_submission: False
# To replace the defaults use this:
submission:

View File

@ -10,3 +10,4 @@ postfix:
root_grp: root
service: postfix
xbin_prefix: /usr
dovecot_deliver: /usr/lib/dovecot/deliver

View File

@ -1,3 +1,5 @@
{%- from "postfix/map.jinja" import postfix with context -%}
{%- macro set_option(parameter, value) -%}
{%- if value is number or value is string -%}
-o {{ parameter }}={{ value }}
@ -146,7 +148,12 @@ scache unix - - n - 1 scache
#mailman unix - n n - - pipe
# flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
# ${nexthop} ${user}
{% if salt['pillar.get']('postfix:policyd-spf:enabled', False) %}
{%- if salt['pillar.get']('postfix:policyd-spf:enabled', False) %}
policy-spf unix - n n - - spawn
user=nobody argv={{ xbin_prefix }}/bin/policyd-spf
{%- endif %}
{%- if master_config.get('enable_dovecot', False) -%}
{%- set dovecot = master_config.get('dovecot', {} )%}
dovecot unix - n n - - pipe
flags={{ dovecot.get('flags', 'DRhu') }} user={{ dovecot.get('user', 'vmail') }}:{{ dovecot.get('group', 'vmail') }} argv={{ dovecot.get('argv', postfix.dovecot_deliver) ~ ' -d ${recipient}' }}
{% endif -%}

View File

@ -12,6 +12,7 @@ FreeBSD:
xbin_prefix: /usr/local
config_path: /usr/local/etc/postfix
root_grp: wheel
dovecot_deliver: /usr/local/libexec/dovecot/deliver
Gentoo:
package: mail-mta/postfix