/[smeserver]/rpms/e-smith-qmail/sme10/e-smith-qmail-2.6.0-exclude_from_group_email.patch
ViewVC logotype

Contents of /rpms/e-smith-qmail/sme10/e-smith-qmail-2.6.0-exclude_from_group_email.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Tue May 31 11:01:12 2016 UTC (8 years, 5 months ago) by vip-ire
Branch: MAIN
CVS Tags: e-smith-qmail-2_6_0-6_el7_sme, e-smith-qmail-2_6_0-13_el7_sme, e-smith-qmail-2_6_0-10_el7_sme, e-smith-qmail-2_6_0-5_el7_sme, e-smith-qmail-2_6_0-12_el7_sme, e-smith-qmail-2_6_0-7_el7_sme, e-smith-qmail-2_6_0-14_el7_sme, e-smith-qmail-2_6_0-3_el7_sme, e-smith-qmail-2_6_0-8_el7_sme, e-smith-qmail-2_6_0-9_el7_sme, e-smith-qmail-2_6_0-4_el7_sme, e-smith-qmail-2_6_0-11_el7_sme, HEAD
Error occurred while calculating annotation data.
* Tue May 31 2016 Daniel Berteaud <daniel@firewall-services.com> 2.6.0-3.sme
- Add possibility to exclude users or members of other groups from group
  email address [SME: 9523]

1 diff -Nur e-smith-qmail-2.6.0/root/etc/e-smith/events/actions/qmail-update-group e-smith-qmail-2.6.0_bz9523/root/etc/e-smith/events/actions/qmail-update-group
2 --- e-smith-qmail-2.6.0/root/etc/e-smith/events/actions/qmail-update-group 2016-02-05 22:46:06.000000000 +0100
3 +++ e-smith-qmail-2.6.0_bz9523/root/etc/e-smith/events/actions/qmail-update-group 2016-05-24 10:13:07.105336565 +0200
4 @@ -75,7 +75,23 @@
5 my %properties = $group->props;
6 $groupName =~ s/\./:/g;
7 my $group = "/var/qmail/alias/.qmail-$groupName";
8 - my $members = $properties{Members};
9 + my @group_members = split(/,/, $properties{Members});
10 + # Check if we should exclude members from this group email address
11 + my @exclude_users = split(/,/, ($properties{EmailExcludeUsers} || ''));
12 + my @exclude_groups = split(/,/, ($properties{EmailExcludeGroups} || ''));
13 + foreach my $exclude_group (@exclude_groups){
14 + my $g = $a->get($exclude_group);
15 + next unless $g;
16 + push @exclude_users, split(/,/, ($g->prop('Members') || ''));
17 + }
18 + my %exclude = map { $_, 1 } @exclude_users;
19 + @exclude_users = keys %exclude;
20 + my @members = ();
21 + foreach my $user (@group_members){
22 + next if grep { $_ eq $user } @exclude_users;
23 + push @members, $user;
24 + }
25 + my $members = join(',', @members);
26
27 esmith::util::processTemplate(
28 {

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed