* Mon Dec 30 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-7.sme
- fix CGI::param called in list context [SME: 12789] - update webmail settings for roundcube [SME: 12743] - remove requires runit [SME: 12566] - move action pseudonym-cleanup and migrate 10AdminEmail from smeserver-mini-qmail [SME: 12808]
This commit is contained in:
parent
f4311551ca
commit
6dd24d9479
17
createlinks
17
createlinks
@ -52,6 +52,14 @@ $event = "console-save";
|
|||||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smtp-auth-proxy");
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smtp-auth-proxy");
|
||||||
event_link('fetchmail-migrate-fetchids', $event, '91');
|
event_link('fetchmail-migrate-fetchids', $event, '91');
|
||||||
|
|
||||||
|
#--------------------------------------------------
|
||||||
|
# actions for bootstrap-console-save event:
|
||||||
|
# write config files and create startup link
|
||||||
|
#--------------------------------------------------
|
||||||
|
$event = "bootstrap-console-save";
|
||||||
|
|
||||||
|
event_link("pseudonym-cleanup", $event, "03");
|
||||||
|
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
# actions for domain-create event:
|
# actions for domain-create event:
|
||||||
# rewrite config files and restart server
|
# rewrite config files and restart server
|
||||||
@ -75,22 +83,29 @@ $event = "email-update";
|
|||||||
|
|
||||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smtp-auth-proxy");
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smtp-auth-proxy");
|
||||||
event_link('fetchmail-migrate-fetchids', $event, '91');
|
event_link('fetchmail-migrate-fetchids', $event, '91');
|
||||||
|
event_link("pseudonym-cleanup", $event, "30");
|
||||||
|
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
# actions for group-create event:
|
# actions for group-create event:
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
$event = "group-create";
|
$event = "group-create";
|
||||||
|
|
||||||
|
event_link("pseudonym-cleanup", $event, "03");
|
||||||
|
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
# actions for group-delete event:
|
# actions for group-delete event:
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
$event = "group-delete";
|
$event = "group-delete";
|
||||||
|
|
||||||
|
event_link("pseudonym-cleanup", $event, "03");
|
||||||
|
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
# actions for group-modify event:
|
# actions for group-modify event:
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
$event = "group-modify";
|
$event = "group-modify";
|
||||||
|
|
||||||
|
event_link("pseudonym-cleanup", $event, "03");
|
||||||
|
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
# actions for user-create event:
|
# actions for user-create event:
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
@ -127,12 +142,14 @@ event_link("systemd-reload", $event, "89");
|
|||||||
event_link("systemd-default", $event, "88");
|
event_link("systemd-default", $event, "88");
|
||||||
event_link('fetchmail-migrate-fetchids', $event, '91');
|
event_link('fetchmail-migrate-fetchids', $event, '91');
|
||||||
safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/smtp-auth-proxy");
|
safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/smtp-auth-proxy");
|
||||||
|
event_link("pseudonym-cleanup", $event, "03");
|
||||||
|
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
# actions for pseudonym-{create,delete,modify}
|
# actions for pseudonym-{create,delete,modify}
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
foreach $event ( qw(pseudonym-create pseudonym-modify pseudonym-delete) )
|
foreach $event ( qw(pseudonym-create pseudonym-modify pseudonym-delete) )
|
||||||
{
|
{
|
||||||
|
event_link("pseudonym-cleanup", $event, "03");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
24
root/etc/e-smith/db/accounts/migrate/10AdminEmail
Normal file
24
root/etc/e-smith/db/accounts/migrate/10AdminEmail
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
my $conf = esmith::ConfigDB->open;
|
||||||
|
return unless $conf;
|
||||||
|
|
||||||
|
my $admin_email = $conf->get_value_and_delete('AdminEmail');
|
||||||
|
return unless defined $admin_email;
|
||||||
|
|
||||||
|
my $admin = $DB->get('admin') ||
|
||||||
|
$DB->new_record('admin', {type => 'system'});
|
||||||
|
if ($admin_email)
|
||||||
|
{
|
||||||
|
$admin->merge_props(
|
||||||
|
EmailForward => 'forward',
|
||||||
|
ForwardAddress => $admin_email,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$admin->merge_props(
|
||||||
|
EmailForward => 'local',
|
||||||
|
ForwardAddress => '',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
22
root/etc/e-smith/events/actions/pseudonym-cleanup
Normal file
22
root/etc/e-smith/events/actions/pseudonym-cleanup
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use esmith::AccountsDB;
|
||||||
|
use esmith::event;
|
||||||
|
|
||||||
|
my $accounts = esmith::AccountsDB->open() or
|
||||||
|
die "Unable to open accounts db: $!";
|
||||||
|
|
||||||
|
my ($self, $account) = @ARGV;
|
||||||
|
|
||||||
|
# Find all "pseudonyms" entries in the e-smith accounts database and
|
||||||
|
# if the pseudonyms has an unexisting Account associated we change
|
||||||
|
# it to user "admin".
|
||||||
|
|
||||||
|
foreach my $pseudo ( $accounts->pseudonyms ) {
|
||||||
|
unless ( $accounts->get($pseudo->prop('Account')) ) {
|
||||||
|
$pseudo->set_prop( 'Account', 'admin' );
|
||||||
|
print "orphaned pseudonym " . $pseudo->key. " has been associated to admin account"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -336,23 +336,20 @@ sub change_settings_access
|
|||||||
$db->set_prop('php',"status", "enabled" );
|
$db->set_prop('php',"status", "enabled" );
|
||||||
$db->set_prop('mariadb',"status", "enabled" );
|
$db->set_prop('mariadb',"status", "enabled" );
|
||||||
$db->set_prop('imp',"status", 'enabled' );
|
$db->set_prop('imp',"status", 'enabled' );
|
||||||
$db->set_prop('horde',"status", 'enabled' );
|
$cdb->set_prop('roundcube',"status", 'enabled' );
|
||||||
$db->set_prop('horde',"access", "public" );
|
$cdb->set_prop('roundcube',"access", "public" );
|
||||||
$db->set_prop('horde',"HttpsOnly", "yes" );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
elsif ( $webmail eq "localnetworkSSL" || $webmail eq "localnetwork" ) {
|
elsif ( $webmail eq "localnetworkSSL" || $webmail eq "localnetwork" ) {
|
||||||
$db->set_prop('php',"status", "enabled" );
|
$db->set_prop('php',"status", "enabled" );
|
||||||
$db->set_prop('mariadb',"status", "enabled" );
|
$db->set_prop('mariadb',"status", "enabled" );
|
||||||
$db->set_prop('imp',"status", 'enabled' );
|
$db->set_prop('imp',"status", 'enabled' );
|
||||||
$db->set_prop('horde',"status", 'enabled' );
|
$cdb->set_prop('roundcube',"status", 'enabled' );
|
||||||
$db->set_prop('horde',"access", "private" );
|
$cdb->set_prop('roundcube',"access", "private" );
|
||||||
$db->set_prop('horde',"HttpsOnly", "yes" );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
$db->set_prop('imp',"status", 'disabled' );
|
$cdb->set_prop('roundcube',"status", 'disabled' );
|
||||||
$db->set_prop('horde',"status", 'disabled' );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unless ( system( "/sbin/e-smith/signal-event", "email-update" ) == 0 )
|
unless ( system( "/sbin/e-smith/signal-event", "email-update" ) == 0 )
|
||||||
@ -558,19 +555,16 @@ sub get_current_webmail_status {
|
|||||||
# determine status of webmail
|
# determine status of webmail
|
||||||
my $WebmailStatus = "disabled";
|
my $WebmailStatus = "disabled";
|
||||||
|
|
||||||
my $IMPStatus = $db->get_prop('imp', 'status') || 'disabled';
|
my $RoundcubeStatus = $cdb->get_prop('roundcube', 'status') || 'disabled';
|
||||||
|
|
||||||
my $HordeStatus = $db->get_prop('horde', 'status') || 'disabled';
|
|
||||||
|
|
||||||
my $MysqlStatus = $db->get_prop('mariadb', 'status') || 'disabled';
|
my $MysqlStatus = $db->get_prop('mariadb', 'status') || 'disabled';
|
||||||
|
|
||||||
my $PHPStatus = $db->get_prop('php', 'status') || 'disabled';
|
my $PHPStatus = $db->get_prop('php', 'status') || 'disabled';
|
||||||
|
|
||||||
my $Networkaccess = $db->get_prop('horde','access') || 'disabled';
|
my $Networkaccess = $db->get_prop('roundcube','access') || 'disabled';
|
||||||
|
|
||||||
# all four components must be on for webmail to be working
|
# all four components must be on for webmail to be working
|
||||||
if ( ( $IMPStatus eq "enabled" )
|
if ( ( $RoundcubeStatus eq "enabled" )
|
||||||
&& ( $HordeStatus eq "enabled" )
|
|
||||||
&& ( $MysqlStatus eq "enabled" )
|
&& ( $MysqlStatus eq "enabled" )
|
||||||
&& ( $PHPStatus eq "enabled" )
|
&& ( $PHPStatus eq "enabled" )
|
||||||
&& ( $Networkaccess eq "public"))
|
&& ( $Networkaccess eq "public"))
|
||||||
@ -578,8 +572,7 @@ sub get_current_webmail_status {
|
|||||||
$WebmailStatus = "enabledSSL" ;
|
$WebmailStatus = "enabledSSL" ;
|
||||||
}
|
}
|
||||||
|
|
||||||
elsif ( ( $IMPStatus eq "enabled" )
|
elsif ( ( $RoundcubeStatus eq "enabled" )
|
||||||
&& ( $HordeStatus eq "enabled" )
|
|
||||||
&& ( $MysqlStatus eq "enabled" )
|
&& ( $MysqlStatus eq "enabled" )
|
||||||
&& ( $PHPStatus eq "enabled" )
|
&& ( $PHPStatus eq "enabled" )
|
||||||
&& ( $Networkaccess eq "private" ))
|
&& ( $Networkaccess eq "private" ))
|
||||||
|
@ -364,7 +364,7 @@ sub print_begin_page {
|
|||||||
my $key = $account->key();
|
my $key = $account->key();
|
||||||
push (@emailPseudonyms, $key) if ($type eq 'pseudonym');
|
push (@emailPseudonyms, $key) if ($type eq 'pseudonym');
|
||||||
}
|
}
|
||||||
my $urlprefix = $fm->build_cgi_params(uri_unescape($q->param('pseudonym')));
|
my $urlprefix = $fm->build_cgi_params(uri_unescape(scalar $q->param('pseudonym')));
|
||||||
print " <tr>\n <td colspan='2'>\n";
|
print " <tr>\n <td colspan='2'>\n";
|
||||||
print $q->p($q->a({href => "pseudonyms?$urlprefix&wherenext=Create", -class => "button-like"},
|
print $q->p($q->a({href => "pseudonyms?$urlprefix&wherenext=Create", -class => "button-like"},
|
||||||
$fm->localise("CLICK_TO_CREATE")));
|
$fm->localise("CLICK_TO_CREATE")));
|
||||||
|
@ -4,7 +4,7 @@ Summary: smeserver server and gateway - email module
|
|||||||
%define name smeserver-email
|
%define name smeserver-email
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
%define version 11.0.0
|
%define version 11.0.0
|
||||||
%define release 6
|
%define release 7
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
Release: %{release}%{?dist}
|
Release: %{release}%{?dist}
|
||||||
License: GPL
|
License: GPL
|
||||||
@ -25,7 +25,6 @@ Requires: perl(Net::SMTP)
|
|||||||
Requires: perl(Net::SMTP::SSL)
|
Requires: perl(Net::SMTP::SSL)
|
||||||
Requires: perl(Authen::SASL)
|
Requires: perl(Authen::SASL)
|
||||||
Requires: perl(Net::Server) >= 0.85
|
Requires: perl(Net::Server) >= 0.85
|
||||||
Requires: runit
|
|
||||||
Requires: smeserver-formmagick >= 1.4.0-12
|
Requires: smeserver-formmagick >= 1.4.0-12
|
||||||
Obsoletes: e-smith-smtp-authentication
|
Obsoletes: e-smith-smtp-authentication
|
||||||
Obsoletes: e-smith-securemail
|
Obsoletes: e-smith-securemail
|
||||||
@ -77,6 +76,12 @@ fi
|
|||||||
smeserver server and gateway software - email module.
|
smeserver server and gateway software - email module.
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Dec 30 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-7.sme
|
||||||
|
- fix CGI::param called in list context [SME: 12789]
|
||||||
|
- update webmail settings for roundcube [SME: 12743]
|
||||||
|
- remove requires runit [SME: 12566]
|
||||||
|
- move action pseudonym-cleanup and migrate 10AdminEmail from smeserver-mini-qmail [SME: 12808]
|
||||||
|
|
||||||
* Wed Apr 17 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-6.sme
|
* Wed Apr 17 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-6.sme
|
||||||
- change temp dir from /var/lock to /run/lock [SME: 12620]
|
- change temp dir from /var/lock to /run/lock [SME: 12620]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user