blob: 4ad5ab328a82f1c2ab8347a4f57b9f0835029a1e [file] [log] [blame]
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01001#!/bin/bash
2
3while read QUERY; do
4 QUERY=($QUERY)
5 if [ "${QUERY[0]}" != "get" ]; then
6 echo "500 dunno"
7 continue
8 fi
9 result=$(curl -s http://nginx:8081/forwardinghosts.php?host=${QUERY[1]})
10 logger -t whitelist_forwardinghosts -p mail.info "Look up ${QUERY[1]} on whitelist, result $result"
11 echo ${result}
12done