summaryrefslogtreecommitdiffstats
path: root/roles/lists/files/usr/local/bin/sympa-queue
blob: 85001bbdcfa9a3a4f0af5a339447deb43856b7d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

PATH=/bin:/usr/bin
set -ue

[ $# -eq 1 ] || exit 1

username="${1#*/}"
domainname="${1%%/*}"

if [ "$username" = 'abuse-feedback-report' ] || [ "$username" = bounce ]; then
    exec /usr/lib/sympa/lib/sympa/bouncequeue "sympa@$domainname"
elif [ "${username%-owner}" != "$username" ]; then
    exec /usr/lib/sympa/lib/sympa/bouncequeue "${username%-owner}@$domainname"
else
    exec /usr/lib/sympa/lib/sympa/queue "$username@$domainname"
fi