Skip to content

Commit f832384

Browse files
committed
Update to openSUSE 15.6
1 parent 99dab61 commit f832384

16 files changed

+66
-34
lines changed

Diff for: .github/workflows/run-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Run tests against latest openSUSE Leap 15.5
2+
name: Run tests against latest openSUSE Leap 15.6
33

44
on:
55
push:

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Ansible role for an all-in-one mail server based on openSUSE Leap 15.5
1+
# Ansible role for an all-in-one mail server based on openSUSE Leap 15.6
22

3-
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/chkpnt/chkpnt-mailserver/run-tests.yml?branch=main&style=flat-square&logo=github&label=Tests%20against%20latest%20openSUSE%20Leap%2015.5)](https://github.com/chkpnt/chkpnt-mailserver/actions/workflows/run-tests.yml)
3+
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/chkpnt/chkpnt-mailserver/run-tests.yml?branch=main&style=flat-square&logo=github&label=Tests%20against%20latest%20openSUSE%20Leap%2015.6)](https://github.com/chkpnt/chkpnt-mailserver/actions/workflows/run-tests.yml)
44
[![Ansible Role](https://img.shields.io/ansible/role/d/chkpnt/mailserver?style=flat-square&logo=ansible&label=Ansible%20Galaxy%20downloads)](https://galaxy.ansible.com/chkpnt/mailserver)
55

66
The purpose of this Ansible role is to fulfill my demands on my own mail server:
77

8-
- [x] Supports openSUSE Leap 15.5
8+
- [x] Supports openSUSE Leap 15.6
99
- [x] Orchestration of Postfix (MTA), Dovecot (MDA) and Rspamd
1010
- [x] Postfix uses Dovecot for authentication (SMTP AUTH through Dovecot SASL)
1111
- [x] No databases for configuration, just plain files

Diff for: handlers/main.yml

+10
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@
4545
changed_when: true
4646
notify: restart postfix
4747

48+
- name: postmap access # noqa: name[casing]
49+
ansible.builtin.command: postmap lmdb:/etc/postfix/access
50+
changed_when: true
51+
notify: restart postfix
52+
53+
- name: postmap aliases # noqa: name[casing]
54+
ansible.builtin.command: postmap lmdb:/etc/aliases
55+
changed_when: true
56+
notify: restart postfix
57+
4858
- name: print error_messages # noqa: name[casing]
4959
ansible.builtin.debug:
5060
var: error_messages

Diff for: meta/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
galaxy_info:
33
role_name: mailserver
44
namespace: chkpnt
5-
description: Ansible role for an all-in-one mail server based on openSUSE Leap 15.5
5+
description: Ansible role for an all-in-one mail server based on openSUSE Leap 15.6
66
author: Gregor Dschung
77
license: Apache
88
min_ansible_version: "9.0"
99
platforms:
1010
- name: opensuse
1111
versions:
12-
- "15.5"
12+
- "15.6"
1313
galaxy_tags:
1414
- mailserver
1515
- mail

Diff for: tasks/install.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- name: Install repository home:chkpnt:mailserver
44
community.general.zypper_repository:
55
name: home_chkpnt_mailserver
6-
repo: https://download.opensuse.org/repositories/home:/chkpnt:/mailserver/15.5/
6+
repo: https://download.opensuse.org/repositories/home:/chkpnt:/mailserver/15.6/
77
state: present
88
auto_import_keys: true
99

Diff for: tasks/setup-postfix.yml

+26
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,32 @@
9999
notify:
100100
- postmap recipient_restrictions
101101

102+
- name: Check if postfix /etc/postfix/access.lmdb exists
103+
ansible.builtin.stat:
104+
path: /etc/postfix/access.lmdb
105+
register: access_file
106+
107+
- name: Trigger postmap handler for /etc/postfix/access.lmdb
108+
debug:
109+
msg: "Triggering postmap for /etc/postfix/access.lmdb"
110+
changed_when: true
111+
notify:
112+
- postmap access
113+
when: not access_file.stat.exists
114+
115+
- name: Check if postfix /etc/aliases.lmdb exists
116+
ansible.builtin.stat:
117+
path: /etc/aliases.lmdb
118+
register: aliases_file
119+
120+
- name: Trigger postmap handler for /etc/aliases.lmdb
121+
debug:
122+
msg: "Triggering postmap for /etc/aliases.lmdb"
123+
changed_when: true
124+
notify:
125+
- postmap aliases
126+
when: not aliases_file.stat.exists
127+
102128
- name: Configure header checks
103129
ansible.builtin.template:
104130
src: etc/postfix/header_checks.j2

Diff for: tests/Vagrantfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Vagrant.require_version ">= 2.2.6"
66

77
Vagrant.configure("2") do |config|
88

9-
config.vm.box = "Leap-15.5.x86_64"
10-
config.vm.box_url = "https://download.opensuse.org/repositories/Virtualization:/Appliances:/Images:/openSUSE-Leap-15.5/images/boxes/Leap-15.5.x86_64.json"
9+
config.vm.box = "Leap-15.6.x86_64"
10+
config.vm.box_url = "https://download.opensuse.org/repositories/Virtualization:/Appliances:/Images:/openSUSE-Leap-15.6/images/boxes/Leap-15.6.x86_64.json"
1111

1212
config.vm.synced_folder '.', '/vagrant', disabled: true
1313
config.vm.boot_timeout = 600

Diff for: tests/manual/Vagrantfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
Vagrant.configure("2") do |config|
55

6-
hostname = "leap-15.5"
6+
hostname = "leap-15.6"
77

88
# Box
9-
config.vm.box = "Leap-15.5.x86_64"
10-
config.vm.box_url = "https://download.opensuse.org/repositories/Virtualization:/Appliances:/Images:/openSUSE-Leap-15.5/images/boxes/Leap-15.5.x86_64.json"
9+
config.vm.box = "Leap-15.6.x86_64"
10+
config.vm.box_url = "https://download.opensuse.org/repositories/Virtualization:/Appliances:/Images:/openSUSE-Leap-15.6/images/boxes/Leap-15.6.x86_64.json"
1111

1212
config.vm.provision :ansible do |ansible|
1313
ansible.force_remote_user = true

Diff for: tests/tests/incoming/ReceiveMailForOtherVirtualDomainTest.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
compare:
2323
file: "{{ find_result.files[0].path }}"
2424
with_content: |
25-
Return-Path: <vagrant@localhost>
25+
Return-Path: <vagrant@client.localdomain>
2626
Delivered-To: [email protected]
2727
...
2828
2929
Subject: Test
3030
...
31-
From: vagrant@localhost
31+
From: vagrant@client.localdomain
3232
...
3333
3434
Test-Body

Diff for: tests/tests/incoming/ReceiveMailTest.yml

+7-11
Original file line numberDiff line numberDiff line change
@@ -22,44 +22,40 @@
2222
compare:
2323
file: "{{ find_result.files[0].path }}"
2424
with_content: |
25-
Return-Path: <vagrant@localhost>
25+
Return-Path: <vagrant@client.localdomain>
2626
Delivered-To: [email protected]
2727
Received: from sut.mydomain.test
2828
$$ \t $$by sut.mydomain.test with LMTP
2929
$$ \t $$id $$ .* $$
30-
$$ \t $$(envelope-from <vagrant@localhost>)
30+
$$ \t $$(envelope-from <vagrant@client.localdomain>)
3131
$$ \t $$for <[email protected]>; $$ .* $$
32-
Received: from localhost (ip-192.168.56.201.someisp.test [192.168.56.201])
32+
Received: from client.localdomain (ip-192.168.56.201.someisp.test [192.168.56.201])
3333
$$ \t $$by sut.mydomain.test (Postfix) with ESMTP id $$ .* $$
3434
$$ \t $$for <[email protected]>; $$ .* $$
3535
...
36-
Received: by localhost (Postfix, from userid 1000)
36+
Received: by client.localdomain (Postfix, from userid 1000)
3737
...
3838
Date: $$ .* $$
3939
4040
Subject: Test
4141
...
42-
From: vagrant@localhost
42+
From: vagrant@client.localdomain
4343
...
4444
4545
Test-Body
4646
become: true
4747
become_user: vmail
4848

49-
- name: Assert the received mail is tagged as Spam due to sending from client with hostname localhost (ip-192.168.56.201.someisp.test)
49+
- name: Assert the received mail is greylisted due to sending from client with hostname client.localdomain (ip-192.168.56.201.someisp.test)
5050
compare:
5151
file: "{{ find_result.files[0].path }}"
5252
with_content: |
5353
...
5454
5555
Subject: Test
5656
...
57-
X-Spamd-Result: default: False [7.70 / 15.00];
58-
$$ \t $$HFILTER_FROMHOST_NOT_FQDN(3.00)[localhost];
59-
$$ \t $$HFILTER_HELO_5(3.00)[localhost];
57+
X-Rspamd-Action: greylist
6058
...
61-
X-Spam: Yes
62-
6359
Test-Body
6460
become: true
6561
become_user: vmail

Diff for: tests/tests/incoming/ReceiveMailWithCatchAllTest.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
compare:
2323
file: "{{ find_result.files[0].path }}"
2424
with_content: |
25-
Return-Path: <vagrant@localhost>
25+
Return-Path: <vagrant@client.localdomain>
2626
Delivered-To: [email protected]
2727
...
2828
2929
Subject: Test
3030
...
31-
From: vagrant@localhost
31+
From: vagrant@client.localdomain
3232
...
3333
3434
Test-Body

Diff for: tests/tests/incoming/SieveCanDeliverToFolderTest.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
4949
Subject: SPAM
5050
...
51-
From: vagrant@localhost
51+
From: vagrant@client.localdomain
5252
...
5353
5454
Test-Body

Diff for: tests/tests/outgoing/RelayToNextSmtpHopTest.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
...
2121
Received: from sut.mydomain.test ([192.168.56.10])
2222
...
23-
Received: from localhost (ip-192.168.56.201.someisp.test [192.168.56.201])
23+
Received: from client.localdomain (ip-192.168.56.201.someisp.test [192.168.56.201])
2424
...
2525
2626
Subject: Test
2727
...
28-
From: vagrant@localhost
28+
From: vagrant@client.localdomain
2929
...
3030
3131
Test-Body

Diff for: tests/tests/outgoing/RelayedMailsAreArcSignedTest.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
3232
Subject: Test
3333
...
34-
From: vagrant@localhost
34+
From: vagrant@client.localdomain
3535
...

Diff for: tests/tests/spam-handling/GreylistingTest.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
with_content: |
3232
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
3333
...
34-
$$ .* $$ vagrant@localhost
34+
$$ .* $$ vagrant@client.localdomain
3535
(host sut.mydomain.test[192.168.56.10] said: 451 4.7.1 Try again later (in reply to end of DATA command))
3636
3737
...

Diff for: tests/tests/spam-handling/RejectBecauseOfVirusTest.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
be delivered to one or more recipients. It's attached below.
2424
...
2525
<[email protected]>: host sut.mydomain.test[192.168.56.10] said: 554 5.7.1
26-
clamav: virus found: "Eicar-Test-Signature" (in reply to end of DATA
27-
command)
26+
clamav: virus found: "winnow.malware.test.eicar.com.UNOFFICIAL" (in reply
27+
to end of DATA command)
2828
...

0 commit comments

Comments
 (0)