diff -up smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-dump.patch0 smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-dump --- smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-dump.patch0 2013-06-26 18:05:29.000000000 -0400 +++ smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-dump 2014-07-28 15:12:03.000000000 -0400 @@ -63,7 +63,6 @@ if ($Dump) { print REST "read c\n"; print REST 'if [ $c = "y" ] || [ $c = "Y" ]; then'."\n"; print REST " /usr/sbin/lat-users -a -i=$HostName.Users\n"; - print REST " /usr/sbin/lat-pseudonyms -a -i=$HostName.Pseudonyms\n"; print REST " /usr/sbin/lat-procmail -i=$HostName.Procmail\n"; print REST " /usr/sbin/lat-quota -i=$HostName.Quota\n"; print REST " /usr/sbin/lat-groups -a -i=$HostName.Groups\n"; @@ -71,6 +70,7 @@ if ($Dump) { print REST " /usr/sbin/lat-ibays -a -i=$HostName.Ibays\n"; print REST " /usr/sbin/lat-domains -a -i=$HostName.Domains\n"; print REST " /usr/sbin/lat-hosts -a -i=$HostName.Hosts\n"; + print REST " /usr/sbin/lat-pseudonyms -a -i=$HostName.Pseudonyms\n"; print REST " /usr/sbin/lat-shadow -a -i=$HostName.shadow\n"; print REST "else\n"; print REST " echo 'Action cancelled!'\n"; diff -up smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-pseudonyms.patch0 smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-pseudonyms --- smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-pseudonyms.patch0 2006-02-09 23:19:25.000000000 -0500 +++ smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-pseudonyms 2014-07-28 15:10:48.000000000 -0400 @@ -15,6 +15,8 @@ my %conf; tie %conf, 'esmith::config'; my %accounts; tie %accounts, 'esmith::config', '/home/e-smith/db/accounts'; +my %domains; +tie %domains, 'esmith::config', '/home/e-smith/db/domains'; my ($Hlp, $Cml, $Frc, $Inp); my $Add =0; my $Del =0; @@ -101,6 +103,13 @@ sub TestName { if ( $_[0] =~ /^[a-z][a-z\-\_\d\.]*$/ ) { return -1; } + elsif ( $_[0] =~ /^[a-z][a-z\-\_\d\.]*\@([a-z\-\_\d\.]*)$/ ) { + print "Trying to create a pseudonym specific for $1 domain,\n"; + print "checking if domain is configured for this server... \n"; + if (((db_get(\%domains, $1)) && (db_get_type(\%domains, $1) eq "domain" )) ){ + print "yes, it exists, go on!!\n"; + return -1 + } else { print "The pseudonym '$_[0]' contains illegal characters. The name should "; print "contain only\nlower-case letters, numbers, hyphens, periods "; @@ -178,16 +187,16 @@ Use the information from FILE to create user* : Must be a valid user or group on the server. pseudonym* : Must contain only lower-case letters, numbers, - hyphens, periods and underscores, and should + hyphens, arobase, periods and underscores, and should start with a lower-case letter. * mandatory field =head1 EXAMPLES -B +B -Creates the pseudonyms 'wizard' and 'seeker' for user 'harry'. +Creates the pseudonyms 'wizard', 'seeker' and 'potter@existinglocaldomain.com' for user 'harry'. B diff -up smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-shadow.patch0 smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-shadow --- smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-shadow.patch0 2013-06-26 18:05:29.000000000 -0400 +++ smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-shadow 2014-07-28 14:39:48.000000000 -0400 @@ -85,7 +85,7 @@ if ($Add) { s/^$username:(!!):(.*):(.*):(.*):(.*):(.*):(.*):$/$username:$password:$2:$3:$4:$5:$6:$7:/i; #print $_ ; (print SHADOWNEW $_) or die "can not write $newshadow: $!"; - $PasswordSet="yes"; + $PasswordSet="no"; print "password set.\n"; } elsif (m/^$username:/ ) { # one of our users if there is already a pass set diff -up smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-users.patch0 smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-users --- smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-users.patch0 2013-06-26 18:05:29.000000000 -0400 +++ smeserver-lazy_admin_tools-1.1/root/usr/sbin/lat-users 2014-07-28 14:37:01.000000000 -0400 @@ -146,8 +146,8 @@ if ($Del) { if ((db_get(\%accounts, $username)) && (db_get_type(\%accounts, $username) eq "user")) { my $yn = 'yes'; - my $userdir = `cat /etc/passwd|grep "^$username:"|cut -d":" -f6`; - print "$userdir\n"; + my $userdir = `cat /etc/passwd|grep "^$username:"|cut -d":" -f6|tr -d '\n'`; + print "user folder: '$userdir'\n"; if ( $userdir eq "/home/e-smith/files/users/$username" ) { if (! $Frc) {