| | |
| | | if(is_installed('mailman')) $conf['mailman']['installed'] = true;
|
| | | if(is_installed('apache') || is_installed('apache2') || is_installed('httpd')) $conf['apache']['installed'] = true;
|
| | | if(is_installed('getmail')) $conf['getmail']['installed'] = true;
|
| | | if(is_installed('courierlogger')) $conf['courier']['installed'] = true;
|
| | | if(is_installed('courierlogger')) $conf['courier']['installed'] = true; |
| | | if(is_installed('dovecot')) $conf['dovecot']['installed'] = true;
|
| | | if(is_installed('saslsauthd')) $conf['saslauthd']['installed'] = true;
|
| | | if(is_installed('amavisd-new')) $conf['amavis']['installed'] = true;
|
| | |
| | | 'transport_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_transports.cf',
|
| | | 'relay_domains = mysql:'.$config_dir.'/mysql-virtual_relaydomains.cf',
|
| | | 'relay_recipient_maps = mysql:'.$config_dir.'/mysql-virtual_relayrecipientmaps.cf',
|
| | | 'virtual_create_maildirsize = yes',
|
| | | 'virtual_maildir_extended = yes',
|
| | | 'virtual_mailbox_limit_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_mailbox_limit_maps.cf',
|
| | | 'virtual_mailbox_limit_override = yes',
|
| | | 'virtual_maildir_limit_message = "The user you are trying to reach is over quota."',
|
| | | 'virtual_overquota_bounce = yes',
|
| | | 'proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps',
|
| | | 'smtpd_sender_restrictions = check_sender_access mysql:'.$config_dir.'/mysql-virtual_sender.cf',
|
| | | 'smtpd_client_restrictions = check_client_access mysql:'.$config_dir.'/mysql-virtual_client.cf',
|
| | |
| | | if(!stristr($options,'dont-create-certs')) {
|
| | | //* Create the SSL certificate
|
| | | $command = 'cd '.$config_dir.'; '
|
| | | .'openssl req -new -outform PEM -out smtpd.cert -newkey rsa:2048 -nodes -keyout smtpd.key -keyform PEM -days 365 -x509';
|
| | | .'openssl req -new -outform PEM -out smtpd.cert -newkey rsa:2048 -nodes -keyout smtpd.key -keyform PEM -days 3650 -x509'; |
| | | exec($command);
|
| | |
|
| | | $command = 'chmod o= '.$config_dir.'/smtpd.key';
|
| | |
| | | // Check the awsatst script
|
| | | if(!is_dir('/usr/share/awstats/tools')) exec('mkdir -p /usr/share/awstats/tools');
|
| | | if(!file_exists('/usr/share/awstats/tools/awstats_buildstaticpages.pl') && file_exists('/usr/share/doc/awstats/examples/awstats_buildstaticpages.pl')) symlink('/usr/share/doc/awstats/examples/awstats_buildstaticpages.pl','/usr/share/awstats/tools/awstats_buildstaticpages.pl');
|
| | |
|
| | | if(file_exists('/etc/awstats/awstats.conf.local')) replaceLine('/etc/awstats/awstats.conf.local','LogFormat=4','LogFormat=1',0,1); |
| | | |
| | | //* add a sshusers group
|
| | | $command = 'groupadd sshusers';
|
| | | if(!is_group('sshusers')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
|