Is there a way to determine which aliases are linked to which Users??
_______________________________________________
Japie Niemand
I have done this before but can't remember how, so I cobbled
together this script - if you don't have perl I'd recommend that you get it.
#--------------------------------------------------------------------
#al.pl
# list users along with their aliases
# crudely done - make up list of users and a list of aliases
# search user list for each alias in alias list
# run makelist utility to generate users list
system ("d:/imail/makelist.exe > u.tmp");
# run addalias utility with -l switch to generate aliases list
system ("d:/imail/addalias.exe -l > a.tmp");
#-------------------------------------
# open users list file
open (UH, "u.tmp");
while (<UH>) { push (@u, $_); }
close (UH);
#-------------------------------------
# open aliase list file
open (AH, "a.tmp");
while (<AH>) { push (@a, $_); }
close (AH);
#-------------------------------------
foreach $u (@u) { # for each user $u (mailbox) in user
list @u
@match=(); # set up empty match list
foreach $a (@a) { # for each alias $a in list @a
chomp $u ; # remove newline from user
if (!($a=~m/\|/)){ # these (list/program aliases) foul it up -
so ignore
$a=~m/\=/; # look for equals sign in alias
(e.g.fred=frederick)
$alias = $`; #left bit # e.g. 'fred'
$al = $'; #right bit # 'frederick'
chomp $al ; # remove newline from frederick
if ($u=~/^\<$al\@/){ # look for <frederick@ in username $u (e.g
<[EMAIL PROTECTED]>)
push(@match, $alias ); # add to match list if matched
$ct=1 ; # note that we have found an alias for
this user $u
} #if matched
} #if not nasties
} #next alias
if ($ct==1) { # if some aliases to show
print "$u : "; # user (mailbox) name
foreach $m (@match)
print $m," "; # print each alias
}
print "\n";
$ct=0; # set match counter back to 0
}
}
#-------------------------------------
Please visit http://www.ipswitch.com/support/mailing-lists.html
to be removed from this list.