Skip to content

Create sockets unblocked and with close-on-exec #180

Create sockets unblocked and with close-on-exec

Create sockets unblocked and with close-on-exec #180

Workflow file for this run

# Copyright 2022 Timo Röhling <timo@gaussglocke.de>
# SPDX-License-Identifier: FSFAP
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and
# this notice are preserved. This file is offered as-is, without any warranty.
#
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
milter: [OFF, ON]
sqlite: [OFF, ON]
redis: [OFF, ON]
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y cmake postfix redis
- name: Build PostSRSd
run: |
mkdir _build
cd _build
cmake .. -DDEVELOPER_BUILD=ON -DWITH_MILTER=${{ matrix.milter }} -DWITH_SQLITE=${{ matrix.sqlite }} -DWITH_REDIS=${{ matrix.redis }}
make VERBOSE=ON
- name: Run tests
run: |
cd _build
ctest --output-on-failure
- name: Install and start PostSRSd daemon
run: |
cd _build
sudo make install
sed -e 's/^#srs-domain.*/srs-domain = "example.com"/' /usr/local/share/doc/postsrsd/postsrsd.conf | sudo tee /usr/local/etc/postsrsd.conf
sudo systemctl enable postsrsd
sudo systemctl start postsrsd
sudo journalctl --no-pager -u postsrsd
sudo systemctl --no-pager status postsrsd
- name: Test Postfix integration
run: |
postmap -q test@otherdomain.com socketmap:unix:/var/spool/postfix/srs:forward | tee /tmp/srs-alias.txt
postmap -q "$(cat /tmp/srs-alias.txt)" socketmap:unix:/var/spool/postfix/srs:reverse