SF.net SVN: postfixadmin:[1690] trunk
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2014-09-28 10:39:51
|
Revision: 1690 http://sourceforge.net/p/postfixadmin/code/1690 Author: christian_boltz Date: 2014-09-28 10:39:42 +0000 (Sun, 28 Sep 2014) Log Message: ----------- DomainHandler: - $CONF[default_aliases] can now use the new domain as alias target http://sourceforge.net/p/postfixadmin/patches/124/ config.inc.php: - update comment for $CONF[default_aliases] Modified Paths: -------------- trunk/CHANGELOG.TXT trunk/config.inc.php trunk/model/DomainHandler.php Modified: trunk/CHANGELOG.TXT =================================================================== --- trunk/CHANGELOG.TXT 2014-09-12 11:19:09 UTC (rev 1689) +++ trunk/CHANGELOG.TXT 2014-09-28 10:39:42 UTC (rev 1690) @@ -21,6 +21,7 @@ - fix logging (run setup.php to fix old log entries) (bug#317) - fetchmail.php: change error_reporting() to exclude E_NOTICE (bug#322) - fr.lang translation update (patch#123) +- $CONF[default_aliases] can now use the new domain as alias target (patch#124) Version 3.0 beta1 (2.91) - 2014/05/06 - SVN r1670 ------------------------------------------------- Modified: trunk/config.inc.php =================================================================== --- trunk/config.inc.php 2014-09-12 11:19:09 UTC (rev 1689) +++ trunk/config.inc.php 2014-09-28 10:39:42 UTC (rev 1690) @@ -180,6 +180,9 @@ // Default Aliases // The default aliases that need to be created for all domains. +// You can specify the target address in two ways: +// a) a full mail address +// b) only a localpart ('postmaster' => 'admin') - the alias target will point to the same domain $CONF['default_aliases'] = array ( 'abuse' => 'ab...@ch...d', 'hostmaster' => 'hos...@ch...d', Modified: trunk/model/DomainHandler.php =================================================================== --- trunk/model/DomainHandler.php 2014-09-12 11:19:09 UTC (rev 1689) +++ trunk/model/DomainHandler.php 2014-09-28 10:39:42 UTC (rev 1690) @@ -104,6 +104,10 @@ if ($this->new && $this->values['default_aliases']) { foreach (Config::read('default_aliases') as $address=>$goto) { $address = $address . "@" . $this->id; + # if $goto doesn't contain @, let the alias point to the same domain + if(!strstr($goto, '@')) { + $goto = $goto . "@" . $this->id; + } # TODO: use AliasHandler->add instead of writing directly to the alias table $arr = array( 'address' => $address, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |