Patrick Berry <[EMAIL PROTECTED]> wrote:
>I've set up an alias to allow mail to be sent to all the people in our
>office. I would like to protect this alias from the 'outside'...
>
>Would there be any problems with just doing a simple check ala
>if [ $HOST != freestyleinteractive.com ]
> go away
>else
> everything is cool and go ahead and deliver
>fi
>
>Is there something bad that could happen that I might be over looking in my
>approach? Would it be best to execute an external shell script from the
>dot-qmail file and check the return value of that script and then decide
>what to do?
Use something like the following as the first line in the list file:
|if [ "$HOST" == "freestyleinteractive.com" ; then exit 0; else \
echo "you're not authorized to send to this address"; exit 100; fi
[lines broken for readability]
If the host is OK, qmail will deliver to the rest of the lines in the
file. If it's not, it bounces with the "not authorized" message.
-Dave