Commit Graph

45 Commits

Author SHA1 Message Date
Felipe Zipitria
06276fd743
refactor(maps): move tls_policy and transport to mapping section
Signed-off-by: Felipe Zipitria <fzipitria@perceptyx.com>

BREAKING CHANGE: `transport` and `tls_policy` keys in `postfix:config` have been moved to the standard `postfix:mapping`.
2020-06-06 19:17:46 -03:00
Felipe Zipitria
d87da4adc4 feat(maps): adds tls_policy map for smtp delivery
Signed-off-by: Felipe Zipitria <fzipitria@perceptyx.com>
2020-05-12 15:41:02 -03:00
Imran Iqbal
c9a4fc7654
ci(yamllint): add rule empty-values & use new yaml-files setting
* Semi-automated using https://github.com/myii/ssf-formula/pull/27
* Fix errors shown below:

```bash
postfix-formula$ yamllint -s .
./pillar.example
  92:15     error    empty value in block mapping  (empty-values)
```
2019-09-10 22:37:55 +01:00
Imran Iqbal
b4fbac2934
feat(yamllint): include for this repo and apply rules throughout
* Semi-automated using `ssf-formula` (v0.5.0)
* Fix (or ignore) errors shown below:

```bash
postfix-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:")
./postfix/osfamilymap.yaml
  1:1       warning  missing document start "---"  (document-start)

./postfix/services.yaml
  11:1      warning  missing document start "---"  (document-start)
  12:1      warning  comment not indented like content  (comments-indentation)
  221:1     warning  comment not indented like content  (comments-indentation)

./postfix/defaults.yaml
  4:1       warning  missing document start "---"  (document-start)

pillar.example
  1:1       warning  missing document start "---"  (document-start)
  2:25      warning  truthy value should be one of [false, true]  (truthy)
  13:17     warning  truthy value should be one of [false, true]  (truthy)
  16:17     warning  truthy value should be one of [false, true]  (truthy)
  22:17     warning  truthy value should be one of [false, true]  (truthy)
  23:17     warning  truthy value should be one of [false, true]  (truthy)
  25:17     warning  truthy value should be one of [false, true]  (truthy)
  29:17     warning  truthy value should be one of [false, true]  (truthy)
  31:17     warning  truthy value should be one of [false, true]  (truthy)
  35:17     warning  truthy value should be one of [false, true]  (truthy)
  47:15     warning  truthy value should be one of [false, true]  (truthy)
  50:18     warning  truthy value should be one of [false, true]  (truthy)
  53:21     warning  truthy value should be one of [false, true]  (truthy)
  62:24     warning  truthy value should be one of [false, true]  (truthy)
  66:31     warning  truthy value should be one of [false, true]  (truthy)
  69:19     warning  truthy value should be one of [false, true]  (truthy)
  70:19     warning  truthy value should be one of [false, true]  (truthy)
  73:14     warning  truthy value should be one of [false, true]  (truthy)
  74:21     warning  truthy value should be one of [false, true]  (truthy)
  78:14     warning  truthy value should be one of [false, true]  (truthy)
  89:15     error    trailing spaces  (trailing-spaces)
  96:6      warning  missing starting space in comment  (comments)
  130:89    error    line too long (105 > 88 characters)  (line-length)
  131:89    error    line too long (101 > 88 characters)  (line-length)
  152:5     error    duplication of key "sender_canonical_maps" in mapping  (key-duplicates)
  154:5     error    duplication of key "virtual_alias_maps" in mapping  (key-duplicates)
  190:5     error    duplication of key "use_file" in mapping  (key-duplicates)
  235:9     error    wrong indentation: expected 10 but found 8  (indentation)
  248:1     error    duplication of key "postfix" in mapping  (key-duplicates)
  258:85    error    trailing spaces  (trailing-spaces)
```
2019-08-15 00:07:07 +01:00
Alexander Weidinger
bb6746c5b7 Explain multiple entries in virtual_alias_maps via pillar.example 2019-04-24 12:38:55 +02:00
Dimitrij Hilt
7ea197728b
Update pillar.example 2019-01-08 09:36:01 +01:00
Dimitrij Hilt
dada652f3e Add no_args parameter on defined own services to allow create also
internal services without 'user= argv='.
2019-01-08 09:26:27 +01:00
Dimitrij Hilt
097d149322 typo fixed 2019-01-07 17:47:53 +01:00
Andreas Thienemann
6cbc1efc1b Improve pillar example
Add dovecot example using the services dictionary with a note that
LMTP delivery might be better.

Slight improvements about pillar example settings.

Reorder examples, put the services dictionary examples which allow
more control above the previous dovecot and submission examples.
Add a note about backwards compatibility to indicate that these
options are still supported.
2018-10-08 11:35:18 +02:00
Andreas Thienemann
e4b507b0b5 Further improvements on extra services configured in master.cf
As promised in PR #75, here's a further (and hopefully final)
iteration of the master.cf service handling:

- Bring dovecot and policyd-spf configuration in line with the
  extras_services item added in PR #75
- Remove policyd-spf configuration again from services.jinja,
  handle this in master.cf instead, where it was before
- Allow for completely custom services to be added via a pillar
  definition in postfix:master_config:services
- Fix legacy dovecot argv example in pillar.example: The example
  showed the extra_args being defined as part of the argv
  parameter, something that would clash with the actual code and
  result in a duplicate '-d ${recipient}' definition in the config.
2018-10-04 05:02:57 +02:00
Niels Abspoel
ca6b26e3ed
Merge pull request #75 from bawuenet/more_services
More pillar managed services
2018-10-01 22:49:54 +02:00
Andreas Thienemann
1b9ac1eb4e More pillar managed services
Most of the services in master.cf were already configurable through
the formula but specific ones such as cyrus or uucp were not managed
yet.

This commit adds functionality to manage these services as well
through pillar variables, e.g.:

postfix:
  master_config:
    services:
      uucp:
	enable: True
2018-09-26 21:52:02 -07:00
Andreas Thienemann
44210a1fe8 Reload postfix service by default.
The postfix service is currently being restarted whenever a
config item changes.
This is unnecessary as the postfix service can reload a new
config.

Set reload: True to prevent unnecessary restarts of the service.
The old behavior can be restored by setting the pillar key
reload_service to False.
2018-09-26 17:33:14 -07:00
Benjamin DUPUIS
fe261fc635 add inet_protocols 2018-07-09 11:32:16 +02:00
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
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
f514881e5a explain the difference between alias_maps and alias_database 2017-08-24 13:35:24 +02:00
Heinz Wiesinger
e290d36699 Add option to manage mail aliases using alias states. 2017-05-08 16:55:14 +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
david
8929c185fc add support for postsrsd 2017-01-09 22:01:55 +01:00
Imran Haider
65f86e621d Added config files for virtual users 2016-11-20 11:01:34 -05: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
Forrest
d167e4fb13 Merge pull request #38 from danoe/relay_domains
manage relay_domains file from pillar
2016-05-19 11:42:37 -07:00
Daniel Oetken
88fb050109 option to make postgrey service enabled or disabled 2016-05-19 13:55:15 +02:00
Daniel Oetken
ac7b5e1a8d option to make postfix service enabled or disabled 2016-05-18 19:29:37 +02:00
Daniel Oetken
8c4c5e7a0a manage relay_domains file from pillar 2016-05-18 18:38:46 +02:00
Campbell
32f1a4387a Update pillar.example 2016-03-14 21:43:30 +00:00
david
bcf0ec995f add config parameter smtp_tls_CApath to validate peers 2015-12-31 16:00:43 +01:00
Gilles Dartiguelongue
159c9e81ac Switch to SSL management method used in nginx.ng formula
Also change path to certificates since previous ones are distribution
specific. They look like Debian path, Gentoo uses different ones.

New path uses same logic as nginx's formula, use known to exist folder
which server most likely has permission to read too since it is its
configuration folder.
2015-09-03 11:01:51 +02:00
Imran Haider
06ae3b5315 Allow certs and keys to be specified in the pillar 2015-09-03 11:01:51 +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
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
Imran Haider
d150baea1d Conditionally enable submission service 2015-07-11 05:58:29 -04:00
jeroen92
493298fff1 Add option to let the module (not) manage the master.cf 2015-03-25 12:49:57 +01:00
Ivan Vari
689f32184c reverted commit 6286442 to avoid promoting grain lookup in pillars 2015-03-18 07:03:35 +13:00
Skyler Berg
082757e97c Remove nested quotes around 'yes' and 'no' in pillar.example 2014-11-21 11:22:22 -08:00
skyler
6286442d75 Use grains in pillar.example 2014-08-19 19:14:45 -07:00
skyler
844de7cf57 Remove Ubuntu specific defaults 2014-08-19 19:12:20 -07:00
skyler
4237556a6f Add extra quotes to prevent 'yes' and 'no' from becoming 'True' and 'False' 2014-08-19 19:11:20 -07:00
skyler
46bd93f91f Update pillar.example to have settings for config file 2014-08-19 17:33:16 -07:00
Michael Grosser
1296dc3b71 Add pillar.example 2013-07-27 22:23:42 +02:00