SF.net SVN: postfixadmin:[1199] branches/postfixadmin-2.3
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2011-10-07 22:58:44
|
Revision: 1199 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=1199&view=rev Author: christian_boltz Date: 2011-10-07 22:58:38 +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 (backport of trunk r1198) Revision Links: -------------- http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=1198&view=rev Modified Paths: -------------- branches/postfixadmin-2.3/CHANGELOG.TXT branches/postfixadmin-2.3/list-virtual.php Modified: branches/postfixadmin-2.3/CHANGELOG.TXT =================================================================== --- branches/postfixadmin-2.3/CHANGELOG.TXT 2011-10-07 22:57:43 UTC (rev 1198) +++ branches/postfixadmin-2.3/CHANGELOG.TXT 2011-10-07 22:58:38 UTC (rev 1199) @@ -15,6 +15,7 @@ - create-domain: fix SQL injection (only exploitable by superadmins) - add missing $LANG['pAdminDelete_admin_error'] + - don't mark mailbox targets with recipient delimiter as "forward only" Version 2.3.4 - 2011/09/16 - SVN r1180 (postfixadmin-2.3 branch) ---------------------------------------------------------------- Modified: branches/postfixadmin-2.3/list-virtual.php =================================================================== --- branches/postfixadmin-2.3/list-virtual.php 2011-10-07 22:57:43 UTC (rev 1198) +++ branches/postfixadmin-2.3/list-virtual.php 2011-10-07 22:58:38 UTC (rev 1199) @@ -243,6 +243,9 @@ if ($result['rows'] > 0) { + $delimiter = preg_quote($CONF['recipient_delimiter'], "/"); + $goto_single_rec_del = ""; + while ($row = db_array ($result['result'])) { if ($display_mailbox_aliases) { @@ -251,7 +254,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. |