postfix-cookbook/kitchen.yml
Lance Albertson 1cd55ab40d
Correctly fix aliases quoting logic (#206)
We were previously incorrectly adding double quotes for the alias values.
According to the man page it's not required. However, there is a requirement if
its a command being pipe.

In addition, the man page mentions this for the alias name:

  The  name  is  a  local  address (no domain part).  Use double quotes when the
  name contains any special characters such as whitespace, `#', `:', or `@'. The
  name is folded to lowercase, in order to make database lookups case
  insensitive.

This includes logic to support this automatically.

- Add new tests for aliases testing all types
- Convert all serverspec tests to inspec
- Add Github actions
- Update platforms to test

Signed-off-by: Lance Albertson <lance@osuosl.org>
2025-01-29 14:51:57 -08:00

104 lines
2.1 KiB
YAML

---
driver:
name: vagrant
provisioner:
name: chef_infra
product_name: chef
enforce_idempotency: true
multiple_converge: 2
deprecations_as_errors: true
verifier:
name: inspec
platforms:
- name: almalinux-8
- name: almalinux-9
- name: amazonlinux-2023
- name: centos-stream-9
- name: debian-11
- name: debian-12
- name: fedora-latest
- name: opensuse-leap-15
- name: rockylinux-8
- name: rockylinux-9
- name: ubuntu-20.04
- name: ubuntu-22.04
- name: ubuntu-24.04
suites:
- name: default
run_list:
- recipe[postfix]
- name: aliases
run_list:
- recipe[postfix::aliases]
attributes:
postfix:
aliases:
foo1: bar
foo@bar: foo
foo2: "|/usr/bin/bar"
foo3: foo,bar
foo4: foo@example.com
foo5:
- foo
- bar
- name: client
run_list:
- recipe[postfix::client]
- name: server
run_list:
- recipe[postfix::server]
- name: canonical
run_list:
- recipe[test::net_setup]
- recipe[postfix]
attributes:
postfix:
recipient_canonical_map_entries:
john: john@doe.com
- name: sasl_auth_none
run_list:
- recipe[postfix::sasl_auth]
attributes:
postfix:
main:
relayhost: "localhost"
smtp_sasl_auth_enable: "yes"
- name: sasl_auth_multiple
run_list:
- recipe[postfix::sasl_auth]
attributes:
postfix:
main:
relayhost: "localhost"
smtp_sasl_auth_enable: "yes"
sasl:
relayhost1:
username: "kitchenuser"
password: "not-a-real-thing"
relayhost2:
username: "anotherkitchenuser"
password: "yet-not-a-real-thing"
- name: sasl_auth_one
run_list:
- recipe[postfix::sasl_auth]
attributes:
postfix:
main:
relayhost: "localhost"
smtp_sasl_auth_enable: "yes"
sasl:
relayhost:
username: "kitchenuser"
password: "not-a-real-thing"