* Tue Sep 30 2025 Brian Read <brianr@koozali.org> 11.1-12.sme
- Fix httpd conf fragment and add in ValidFrom Ips [SME: 13204]
This commit is contained in:
@@ -10,36 +10,39 @@
|
|||||||
$OUT .="\n";
|
$OUT .="\n";
|
||||||
$OUT .= qq(
|
$OUT .= qq(
|
||||||
# Alias for mailstats
|
# Alias for mailstats
|
||||||
Alias "/mailstats/js" "/opt/mailstats/js"
|
Alias "/mailstats/js" "/opt/mailstats/js/"
|
||||||
Alias "/mailstats/css" "/opt/mailstats/css"
|
Alias "/mailstats/css" "/opt/mailstats/css/"
|
||||||
Alias "/mailstats" "/opt/mailstats/html"
|
Alias "/mailstats" "/opt/mailstats/html/"
|
||||||
|
);
|
||||||
|
# $httpd_admin{ValidFrom} contains space-separated IPs or CIDRs
|
||||||
|
my $valid_from = ${'httpd-admin'}{ValidFrom} // "";
|
||||||
|
my $require_ip = $localAccess." ".join(" ", split(/[,\s]+/, $valid_from));
|
||||||
|
# Remove any /255.255.255.255 substrings
|
||||||
|
$require_ip =~ s{/255\.255\.255\.255}{}g;
|
||||||
|
|
||||||
|
$OUT .= qq(
|
||||||
<Directory "/opt/mailstats/html">
|
<Directory "/opt/mailstats/html">
|
||||||
Options Indexes FollowSymLinks
|
Options Indexes FollowSymLinks
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Require all granted
|
Require ip $require_ip
|
||||||
);
|
|
||||||
$OUT .= (($mailstats{access} || 'private' ) eq "public" ) ? " Require all granted": " Require ip $localAccess $externalSSLAccess";
|
|
||||||
$OUT .= qq(
|
|
||||||
<FilesMatch .php\$\>
|
<FilesMatch .php\$\>
|
||||||
SetHandler "proxy:unix:/var/run/php-fpm/php74.sock|fcgi://localhost"
|
SetHandler "proxy:unix:/var/run/php-fpm/php74.sock|fcgi://localhost"
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
|
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<Directory "/opt/mailstats/css">
|
<Directory "/opt/mailstats/css">
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Require all granted
|
Require ip $require_ip
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<Directory "/opt/mailstats/js">
|
<Directory "/opt/mailstats/js">
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Require all granted
|
Require ip $require_ip
|
||||||
</Directory>
|
</Directory>
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$OUT .= "# mailstats is disabled";
|
$OUT .= "# mailstats is disabled";
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -6,7 +6,7 @@ Summary: Daily mail statistics for SME Server
|
|||||||
%define name smeserver-mailstats
|
%define name smeserver-mailstats
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
%define version 11.1
|
%define version 11.1
|
||||||
%define release 11
|
%define release 12
|
||||||
%define full_version %{version}.%{release})
|
%define full_version %{version}.%{release})
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
Release: %{release}%{?dist}
|
Release: %{release}%{?dist}
|
||||||
@@ -88,6 +88,9 @@ chmod u+s /usr/bin/journalwrap
|
|||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 30 2025 Brian Read <brianr@koozali.org> 11.1-12.sme
|
||||||
|
- Fix httpd conf fragment and add in ValidFrom Ips [SME: 13204]
|
||||||
|
|
||||||
* Fri Sep 26 2025 Brian Read <brianr@koozali.org> 11.1-11.sme
|
* Fri Sep 26 2025 Brian Read <brianr@koozali.org> 11.1-11.sme
|
||||||
- Fix version number extraction fro supplied string [SME: 13121]
|
- Fix version number extraction fro supplied string [SME: 13121]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user