[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: postfix relay
On Tue, Jul 16, 2002 at 11:45:07AM +0100, Brian Candler wrote:
> Or I think you could do something like this:
>
> require condition = ${lookup{$sender_address}lsearch* at {/etc/senders}{1}{0}}
> message = "Unauthorised envelope sender"
>
> In which case /etc/senders can contain:
>
> * at myisp.net
> fred at hotmail.com
> jim at hotmail.com
>
> which is easier to read. Note that I have not actually tested any of these
> examples :-)
P.S. Exim's expression testing mode (-be) is very useful.
$ cat <<END >/tmp/test
* at myisp.net
fred at hotmail.com
jim at hotmail.com
END
$ exim -be '${lookup{noah at myisp.net}lsearch* at {/tmp/test}{1}{0}}'
1
$ exim -be '${lookup{fred at hotmail.com}lsearch* at {/tmp/test}{1}{0}}'
1
$ exim -be '${lookup{bob at hotmail.com}lsearch* at {/tmp/test}{1}{0}}'
0
Brian.
-----
This is the afnog mailing list, managed by Majordomo 1.94.5
To send a message to this list, e-mail afnog at afnog.org
To send a request to majordomo, e-mail majordomo at afnog.org and put
your request in the body of the message (i.e use "help" for help)
This list is maintained by owner-afnog at afnog.org