Skip to content

Commit 526b997

Browse files
committed
Merged revisions 3803-3844 from stable branch.
1 parent 72695f0 commit 526b997

File tree

465 files changed

+4278
-872
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

465 files changed

+4278
-872
lines changed

install/dist/conf/centos52.conf.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
//* Fastcgi
100100
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/';
101101
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
102+
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
102103

103104
//* Postfix
104105
$conf['postfix']['installed'] = false; // will be detected automatically during installation

install/dist/conf/centos53.conf.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
//* Fastcgi
100100
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/';
101101
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
102+
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
102103

103104
//* Postfix
104105
$conf['postfix']['installed'] = false; // will be detected automatically during installation

install/dist/conf/debian40.conf.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
//* Fastcgi
102102
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php5/cgi/';
103103
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
104+
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
104105

105106
//* Postfix
106107
$conf['postfix']['installed'] = false; // will be detected automatically during installation

install/dist/conf/debian60.conf.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
//* Fastcgi
102102
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php5/cgi/';
103103
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
104+
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
104105

105106
//* Postfix
106107
$conf['postfix']['installed'] = false; // will be detected automatically during installation

install/dist/conf/fedora9.conf.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
//* Fastcgi
100100
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/';
101101
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
102+
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
102103

103104
//* Postfix
104105
$conf['postfix']['installed'] = false; // will be detected automatically during installation

install/dist/conf/gentoo.conf.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
//* Fastcgi
113113
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/cgi-php5';
114114
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
115+
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
115116

116117
//* Postfix
117118
$conf['postfix']['installed'] = false; // will be detected automatically during installation

install/dist/conf/opensuse110.conf.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
//* Fastcgi
100100
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php5/fastcgi/';
101101
$conf['fastcgi']['fastcgi_starter_path'] = '/srv/www/php-fcgi-scripts/[system_user]/';
102+
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
102103

103104
//* Postfix
104105
$conf['postfix']['installed'] = false; // will be detected automatically during installation

install/dist/conf/opensuse112.conf.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
//* Fastcgi
100100
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php5/fastcgi/';
101101
$conf['fastcgi']['fastcgi_starter_path'] = '/srv/www/php-fcgi-scripts/[system_user]/';
102+
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
102103

103104
//* Postfix
104105
$conf['postfix']['installed'] = false; // will be detected automatically during installation

install/dist/lib/centos52.lib.php

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,79 @@
3030

3131
class installer extends installer_dist {
3232

33+
public function configure_mailman($status = 'insert') {
34+
global $conf;
35+
36+
$config_dir = $conf['mailman']['config_dir'].'/';
37+
$full_file_name = $config_dir.'mm_cfg.py';
38+
//* Backup exiting file
39+
if(is_file($full_file_name)) {
40+
copy($full_file_name, $config_dir.'mm_cfg.py~');
41+
}
42+
43+
// load files
44+
$content = rf('tpl/mm_cfg.py.master');
45+
$old_file = rf($full_file_name);
46+
47+
$old_options = array();
48+
$lines = explode("\n", $old_file);
49+
foreach ($lines as $line)
50+
{
51+
if (trim($line) != '' && substr($line, 0, 1) != '#')
52+
{
53+
@list($key, $value) = @explode("=", $line);
54+
if (!empty($value))
55+
{
56+
$key = rtrim($key);
57+
$old_options[$key] = trim($value);
58+
}
59+
}
60+
}
61+
62+
$config_dir = $conf['mailman']['config_dir'].'/';
63+
$full_file_name = $config_dir.'virtual_to_transport.sh';
64+
65+
//* Backup exiting virtual_to_transport.sh script
66+
if(is_file($full_file_name)) {
67+
copy($full_file_name, $config_dir.'virtual_to_transport.sh~');
68+
}
69+
70+
copy('tpl/mailman-virtual_to_transport.sh',$full_file_name);
71+
chgrp($full_file_name,'mailman');
72+
chmod($full_file_name,0750);
73+
74+
if(!is_file('/var/lib/mailman/data/transport-mailman')) touch('/var/lib/mailman/data/transport-mailman');
75+
exec('/usr/sbin/postmap /var/lib/mailman/data/transport-mailman');
76+
77+
exec('/usr/lib/mailman/bin/genaliases 2>/dev/null');
78+
79+
$virtual_domains = '';
80+
if($status == 'update')
81+
{
82+
// create virtual_domains list
83+
$domainAll = $this->db->queryAllRecords("SELECT domain FROM mail_mailinglist GROUP BY domain");
84+
85+
if(is_array($domainAll)) {
86+
foreach($domainAll as $domain)
87+
{
88+
if ($domainAll[0]['domain'] == $domain['domain'])
89+
$virtual_domains .= "'".$domain['domain']."'";
90+
else
91+
$virtual_domains .= ", '".$domain['domain']."'";
92+
}
93+
}
94+
}
95+
else
96+
$virtual_domains = "' '";
97+
98+
$content = str_replace('{hostname}', $conf['hostname'], $content);
99+
if(!isset($old_options['DEFAULT_SERVER_LANGUAGE'])) $old_options['DEFAULT_SERVER_LANGUAGE'] = '';
100+
$content = str_replace('{default_language}', $old_options['DEFAULT_SERVER_LANGUAGE'], $content);
101+
$content = str_replace('{virtual_domains}', $virtual_domains, $content);
102+
103+
wf($full_file_name, $content);
104+
}
105+
33106
public function configure_amavis() {
34107
global $conf;
35108

install/dist/lib/centos53.lib.php

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,79 @@
3030

3131
class installer extends installer_dist {
3232

33+
public function configure_mailman($status = 'insert') {
34+
global $conf;
35+
36+
$config_dir = $conf['mailman']['config_dir'].'/';
37+
$full_file_name = $config_dir.'mm_cfg.py';
38+
//* Backup exiting file
39+
if(is_file($full_file_name)) {
40+
copy($full_file_name, $config_dir.'mm_cfg.py~');
41+
}
42+
43+
// load files
44+
$content = rf('tpl/mm_cfg.py.master');
45+
$old_file = rf($full_file_name);
46+
47+
$old_options = array();
48+
$lines = explode("\n", $old_file);
49+
foreach ($lines as $line)
50+
{
51+
if (trim($line) != '' && substr($line, 0, 1) != '#')
52+
{
53+
@list($key, $value) = @explode("=", $line);
54+
if (!empty($value))
55+
{
56+
$key = rtrim($key);
57+
$old_options[$key] = trim($value);
58+
}
59+
}
60+
}
61+
62+
$config_dir = $conf['mailman']['config_dir'].'/';
63+
$full_file_name = $config_dir.'virtual_to_transport.sh';
64+
65+
//* Backup exiting virtual_to_transport.sh script
66+
if(is_file($full_file_name)) {
67+
copy($full_file_name, $config_dir.'virtual_to_transport.sh~');
68+
}
69+
70+
copy('tpl/mailman-virtual_to_transport.sh',$full_file_name);
71+
chgrp($full_file_name,'mailman');
72+
chmod($full_file_name,0750);
73+
74+
if(!is_file('/var/lib/mailman/data/transport-mailman')) touch('/var/lib/mailman/data/transport-mailman');
75+
exec('/usr/sbin/postmap /var/lib/mailman/data/transport-mailman');
76+
77+
exec('/usr/lib/mailman/bin/genaliases 2>/dev/null');
78+
79+
$virtual_domains = '';
80+
if($status == 'update')
81+
{
82+
// create virtual_domains list
83+
$domainAll = $this->db->queryAllRecords("SELECT domain FROM mail_mailinglist GROUP BY domain");
84+
85+
if(is_array($domainAll)) {
86+
foreach($domainAll as $domain)
87+
{
88+
if ($domainAll[0]['domain'] == $domain['domain'])
89+
$virtual_domains .= "'".$domain['domain']."'";
90+
else
91+
$virtual_domains .= ", '".$domain['domain']."'";
92+
}
93+
}
94+
}
95+
else
96+
$virtual_domains = "' '";
97+
98+
$content = str_replace('{hostname}', $conf['hostname'], $content);
99+
if(!isset($old_options['DEFAULT_SERVER_LANGUAGE'])) $old_options['DEFAULT_SERVER_LANGUAGE'] = '';
100+
$content = str_replace('{default_language}', $old_options['DEFAULT_SERVER_LANGUAGE'], $content);
101+
$content = str_replace('{virtual_domains}', $virtual_domains, $content);
102+
103+
wf($full_file_name, $content);
104+
}
105+
33106
public function configure_amavis() {
34107
global $conf;
35108

0 commit comments

Comments
 (0)