SF.net SVN: postfixadmin:[1198] trunk/list-virtual.php
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2011-10-07 22:57:49
|
Revision: 1198 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=1198&view=rev Author: christian_boltz Date: 2011-10-07 22:57:43 +0000 (Fri, 07 Oct 2011) Log Message: ----------- list-virtual.php: - delivery to mailbox with a recipient delimiter (mailbox+foo@domain) was marked as "forward only" This fixes https://sourceforge.net/tracker/?func=detail&aid=3420440&group_id=191583&atid=937964 reported by <stderr1> on #postfixadmin Modified Paths: -------------- trunk/list-virtual.php Modified: trunk/list-virtual.php =================================================================== --- trunk/list-virtual.php 2011-09-29 22:39:44 UTC (rev 1197) +++ trunk/list-virtual.php 2011-10-07 22:57:43 UTC (rev 1198) @@ -216,6 +216,9 @@ $result = db_query ($query); if ($result['rows'] > 0) { + $delimiter = preg_quote($CONF['recipient_delimiter'], "/"); + $goto_single_rec_del = ""; + while ($row = db_array ($result['result'])) { if ($display_mailbox_aliases) { $goto_split = explode(",", $row['goto']); @@ -223,7 +226,11 @@ $row['goto_other'] = array(); foreach ($goto_split as $goto_single) { - if ($goto_single == $row['username']) { # delivers to mailbox + if (!empty($CONF['recipient_delimiter'])) { + $goto_single_rec_del = preg_replace('/' .$delimiter. '[^' .$delimiter. '@]*@/', "@", $goto_single); + } + + if ($goto_single == $row['username'] || $goto_single_rec_del == $row['username']) { # delivers to mailbox $row['goto_mailbox'] = 1; } elseif (boolconf('vacation') && strstr($goto_single, '@' . $CONF['vacation_domain']) ) { # vacation alias - TODO: check for full vacation alias # skip the vacation alias, vacation status is detected otherwise This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |