Commit graph

51 commits

Author SHA1 Message Date
Andreas Thienemann
b6b7ab4cca Allow for full managed master.cf services
Currently master.cf only allows for _very_ limited configuration
options mainly focussed on SMTP submission settings.

This is rather limited and does not scale very well for managing
the other services defined in master.cf.

This patch has moved all the service definitions into a jinja file
and generates the master.cf service definition on the fly based on
these defaults.

Defaults can be overridden in a pillar to customize the rendered
master.cf file accordingly to local needs.
Undefined values will be filled with the postfix defaults.

Care has been taken that the previous ways of managing the submission
configuration options are still supported for backwards compatibility
to prevent breakage for existing users of the formula.
2018-03-11 19:22:12 +01:00
N
5579ebcef6
Merge branch 'master' into add_mysql_query_to_virtual 2018-03-08 09:40:09 +00:00
Niels Abspoel
f30071afd2 replace iteritems with items 2018-03-07 21:17:57 +01:00
Alexander Weidinger
014c5227bc Let the user handle mappings manually 2017-12-08 14:53:58 +01:00
Alexander Weidinger
caee184158 master.cf: added dovecot 2017-12-08 14:04:35 +01:00
Alexander Weidinger
4c7c2a269d master.cf: made submission configurable 2017-12-08 13:20:01 +01:00
Florian Ermisch
9ed99927c2 explain what the colon in mapping.j2 is for 2017-08-25 14:54:20 +02:00
Florian Ermisch
f514881e5a explain the difference between alias_maps and alias_database 2017-08-24 13:35:24 +02:00
Florian Ermisch
c60c3bab6f adjust processed_parameters to match pillar.example 2017-08-24 13:25:38 +02:00
Florian Ermisch
8eed254773 one for-loop for all of the mappings 2017-08-24 13:10:54 +02:00
Florian Ermisch
d51f60647a add optional context variable "colon" to mapping.j2 for aliases file 2017-08-24 13:03:10 +02:00
Florian Ermisch
099d84ab73 Template paths and groups to make them work on FreeBSD, too. 2017-08-24 13:02:46 +02:00
Vitali Quiering
f8514b3629 Add a mysql query to virtual_mailbox_domains, virtual_alias_maps virtual_mailbox_maps if mysql is declared in main.cf within these options 2017-04-12 17:06:16 +02:00
Javier Bértoli
026dd44dde Minor formatting change 2017-03-29 08:19:33 -03:00
Javier Bértoli
b0aa531297 Use join() for iterable values in main.cf 2017-03-28 11:57:34 -03:00
Imran Haider
65f86e621d Added config files for virtual users 2016-11-20 11:01:34 -05:00
Gilles Dartiguelongue
e10ad0e745 Make prope use of jinja templating features
join is available in jinja-2.6, released in 2011.
2016-06-20 19:02:41 +02:00
Gilles Dartiguelongue
573211150f Actually print multiple value as described in man 5 virtual 2016-06-20 18:43:18 +02:00
Gilles Dartiguelongue
80645badee Handle mappings passed as dict or OrderedDict 2016-06-20 18:41:59 +02:00
Gilles Dartiguelongue
62ab827c34 Replace postmap_macro by generic handling of map files
Merge existing handling of postfix lookup table/map files into a single
template. Mappings are read from pillar in `postfix:mapping`.
Configuration is written to the file pointed to by the relevant
directive in `postfix:config`. A single target file is supported at the
moment. The file is postmap'ed if needed.

The pillar accepts a dict or an OrderedDict.
2016-06-20 18:41:43 +02:00
Niels Abspoel
b632899833 fix missing bracket 2016-01-02 20:20:54 +01:00
david
bcf0ec995f add config parameter smtp_tls_CApath to validate peers 2015-12-31 16:00:43 +01:00
Gilles Dartiguelongue
e20aeb5d89 Fix handling of smtpd_sasl_auth_enable
Defaults to yes but will not write yes unless a default is provided to
set_parameter.
2015-10-02 23:11:50 +02:00
Gilles Dartiguelongue
51d2e5936d Fix excessive whitespace stripping 2015-10-02 23:11:27 +02:00
Scott Reid
9326095571 enable creation of smtp_sasl_password_maps file from pillar 2015-09-02 11:59:57 -07:00
Richard Clark
83c0a448fe - Fix virtual handling - can't just dump json to virtual
- Add in handling for sender_canonical
- Add examples to pillar
2015-08-31 16:34:51 -04:00
Gilles Dartiguelongue
6bec84cc23 Remove extra whitespaces in generated file 2015-08-30 18:52:25 +02:00
Gilles Dartiguelongue
609737b0cc Enhance default TLS configuration
Increase default security settings according to upstream documentation
tough it is by no mean perfect.
2015-08-30 18:51:42 +02:00
Gilles Dartiguelongue
2e0e9cdd27 Add SASL handling
Still requires some manual actions like installing SASL provider and
configuring it but this is a first step.
2015-08-30 18:51:42 +02:00
Gilles Dartiguelongue
da1995119a Rework restrictions parameter building
It still included SASL configuration that is nowhere to be found in
current main.cf template.
2015-08-30 18:51:42 +02:00
Gilles Dartiguelongue
542be4f5bb Wrap TLS and relay options in conditional blocks
Basic setting enabling such feature enable the rest of the default statements.
2015-08-30 18:51:42 +02:00
Dominik Schleich
ae7ada3bb8 changed the default aliases variable name to match the one checked in init.sls / one overseen use 2015-08-27 16:16:54 +02:00
Dominik Schleich
04f365170d changed the default aliases variable name to match the one checked in init.sls this times also in the template 2015-08-27 16:14:57 +02:00
Gilles Dartiguelongue
cbd9aeebe9 Restore policyd-spf support 2015-08-22 14:01:29 +02:00
Gilles Dartiguelongue
04f97681eb Handle postgrey setup in main.cf 2015-08-22 13:36:18 +02:00
Gilles Dartiguelongue
9219b5e608 Add support for parameters as lists
As found in postfix documentation.
2015-08-22 13:26:46 +02:00
Gilles Dartiguelongue
723456f758 Reset master.cf to upstream default
From 3.0.2 source tarball.
2015-08-22 13:26:46 +02:00
Gilles Dartiguelongue
a5ddb403c8 Remove policyd SPF management until it is better managed 2015-08-22 13:26:46 +02:00
Gilles Dartiguelongue
36f627aad8 Add support for using distribution's aliases 2015-08-22 12:14:21 +02:00
Nitin Madhok
c594c1df41 Merge pull request #21 from imran1008/submission
Enable submission service by default
2015-08-09 08:04:35 -04:00
Imran Haider
d150baea1d Conditionally enable submission service 2015-07-11 05:58:29 -04:00
Imran Haider
b29a2e4180 Use new default settings 2015-06-20 19:23:12 -04:00
Imran Haider
7f55f43b21 Enable submission service by default 2015-06-20 17:01:00 -04:00
jeroen92
493298fff1 Add option to let the module (not) manage the master.cf 2015-03-25 12:49:57 +01:00
david
5c6b07869f add spf handling 2015-02-05 09:57:18 +01:00
david
2faeb5ea5f should accept localhost as well as localhost.localdomain 2015-02-04 13:07:35 +01:00
david
81c97bdc63 fix todo and use similar pattern as for the rest of the parameters 2015-02-04 12:16:36 +01:00
Raphaël Hertzog
d61167dcb7 Special case the 'aliases' and 'virtual' pillar entries
They must not be added as non-standard parameters, they constitute
data for other files.

Fixes #6.
2015-01-09 18:05:14 +01:00
Skyler Berg
78f3a47bec Refactor postfix formula to work with arbitrary parameters 2014-11-21 11:16:17 -08:00
skyler
755c7b64ba Make postfix.config state work with latest changes 2014-08-19 18:42:08 -07:00