Re: qmail-qfilter script

Gerrit Pape <[email protected]>
Newsgroups gmane.comp.sysutils.bgware
Message-ID <[email protected]>
On Fri, Jul 01, 2005 at 11:17:09AM +0800, Adrian Ho wrote:
> #!/bin/bash
> # WARNING - UNTESTED!
> for RCPT in $QMAILRCPTS; do
>   grep -q "$RCPT" /etc/blocked && exit 31
> done
> exit 0

This is without grep, and /etc/blocked always only read once per run ;-)

#!/bin/sh
# WARNING - UNTESTED!
while read i; do
  for j in $QMAILRCPTS; do
    test "$j" != "$i" || exit 31
  done
done </etc/blocked
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.