Does anyone know in terms of execution speed whether it's better to '||' all the
addresses together as one big "if" statement, or to list each address as its own
"if"?
if (("$SENDER" eq "a...@a.com") || ("$SENDER" eq "b...@b.com") || ... )
...
verses
if ("$SENDER" eq "a...@a.com")
...
if ("$SENDER" eq "b...@b.com")
...
TIA
Jeff Jansen
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
courier-users mailing list
courie...@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
> I have a user who wants to block *a lot* of addresses. I was going to put them
> all into a rcptfilter.
>
> Does anyone know in terms of execution speed whether it's better to '||' all the
> addresses together as one big "if" statement, or to list each address as its own
> "if"?
>
> if (("$SENDER" eq "a...@a.com") || ("$SENDER" eq "b...@b.com") || ... )
> ...
>
> verses
>
> if ("$SENDER" eq "a...@a.com")
> ...
> if ("$SENDER" eq "b...@b.com")
> ...
There would be no measurable difference to logically-equivalent code. Also,
the lookup() function will be logically equivalent. Using lookup() may be
marginally faster if there are common addresses that are frequently blocked,
and they are listed first.