Compare commits

...

2 Commits
sme9 ... master

Author SHA1 Message Date
Daniel Berteaud dabbce84ca Spec file update 11 years ago
Daniel Berteaud ef53acbdd2 Add support for pseudonyms on minilists 11 years ago
  1. 52
      root/etc/e-smith/templates/var/qmail/users/assign/71MinilistPseudo
  2. 5
      smeserver-minilist.spec

@ -0,0 +1,52 @@
{
$OUT = '';
my (undef, undef, $uid, $gid, undef, undef, undef, $dir, undef)
= getpwnam("alias");
unless (defined $uid && defined $gid && defined $dir)
{
my $msg =
"Failed to obtain user details for \'alias\' "
. "while processing pseudonym assignments.";
warn "$msg\n";
$OUT = $msg;
return;
}
my $alias_assign = "alias:${uid}:${gid}:${dir}";
undef $uid;
undef $gid;
undef $dir;
use esmith::AccountsDB;
my $adb = esmith::AccountsDB->open_ro();
foreach $pseudonym ( $adb->pseudonyms )
{
next if ( $pseudonym->key =~ /@/ ); # user@domain goes in virtualdomains
my $account = $pseudonym->prop('Account');
unless ($account)
{
my $key = $pseudonym->key;
warn "pseudonym $key has no account property";
next;
}
$account = $adb->get($pseudonym->prop('Account'));
unless ($account)
{
my $key = $pseudonym->key;
warn "pseudonym $key points to account which does not exist";
next;
}
if ($account->prop('type') eq "minilist")
{
$OUT .= "=" . $pseudonym->key . ":${alias_assign}:-:" . $account->key . ":\n";
$OUT .= "+" . $pseudonym->key . "-:${alias_assign}:-:" . $account->key . ":\n";
next;
}
}
chomp($OUT);
$OUT = "=alias:${alias_assign}:::" unless $OUT;
}

@ -1,4 +1,4 @@
%define version 0.1.1 %define version 0.1.2
%define release 1 %define release 1
%define name smeserver-minilist %define name smeserver-minilist
@ -21,6 +21,9 @@ Requires: e-smith-base >= 5.2.0
Provides group like mail fonctionnality, but lets you enter arbitrary email addresses Provides group like mail fonctionnality, but lets you enter arbitrary email addresses
%changelog %changelog
* Wed Jan 8 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.1.2-1
- Add support for pseudonyms
* Thu Nov 22 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.1.1-1 * Thu Nov 22 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.1.1-1
- Add template for qpsmtpd goodrcptto - Add template for qpsmtpd goodrcptto

Loading…
Cancel
Save