Hello,
Am Dienstag, 4. März 2008 schrieb agr...@us...:
> Revision: 308
> fixed an error that would not identify POP/IMAP accounts when a
> mailbox forwards to other destinations as well.
> +++ trunk/functions.inc.php 2008-03-04 22:02:20 UTC (rev 308)
> @@ -1985,7 +1985,7 @@
I'm afraid that this code section is still buggy :-(
Let me use "ta...@do...d" as mailbox name in the examples below.
We now have:
if (preg_match ('/^' . $show_alias . '$/', $stat_goto) ||
Matches aliases that only forward to the mailbox.
Example: "ta...@do...d"
OK.
preg_match ('/' . $show_alias . ',/', $stat_goto) ||
Matches if goto contains the target and another address.
Example: "target@domain,tld, fo...@do...d"
BUT: it also matches "oth...@do...d,fo...@do...d" :-(
Be warned that there will be nothing that matches
"fo...@do...d,ta...@do...d,ba...@do...d" if you change the
regex to '/^' . $show_alias . ',/'
preg_match ('/,' . $show_alias . '$/', $stat_goto) )
Matches if goto contains the mailbox as last entry.
Example: "fo...@do...d,ta...@do...d"
OK.
Proposal: Simplify the code by adding commas to $stat_goto ;-)
preg_match( '/,' . $show_alias . ',/' , ',' . $stat_goto . ',' )
^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^
regex string to check
should catch everything ;-)
Regards,
Christian Boltz
--
BUGS My programs never have bugs. They just develop random
features. If you discover such a feature and you want it to
be removed: please send me an email.
|