forums.huyett.us

something different
It is currently Thu Jun 22, 2017 3:42 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: imail alias printer
PostPosted: Wed Nov 30, 2005 1:09 pm 
Offline
Admin
Admin
User avatar

Joined: Mon Jan 20, 2003 5:37 pm
Posts: 58
# We needed a way to allow those within our organization view which email addresses were attached to certain aliases. This is for iMail and mounts a storage cluster with the domains directories.

use Win32::FileOp qw(Map);

# Using the same format as below, add additional Domain Names:
@directories = ("test1.com", "test2.net", "test3.net", "test4.net");

print "
<html>
<head>
<title>Group Aliases</title>
</head>

<body>";

Map 'Z:' => '\\\\10.0.0.10\\imaildata', {
user => 'domain\\administrator',
passwd => '********'
} or die "Can't connect to the server: $^E";

print "<p><b><font size=\"5\"><a name=\"Top\">Group Aliases:</a></font></b></p>";
foreach $directory (@directories) {
print "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><a href=\"#$directory\">$directory</a></b><br>";
}

foreach $directory (@directories) {
print "<H2><a name=\"$directory\">$directory</a></H2>";
$directory = "Z:\\IMail\\" .$directory;
opendir(DIR, "$directory" );
@files = grep(/\.*lst/,readdir(DIR));
closedir(DIR);

foreach $file (@files) {
print "<b>" .substr($file, 0, -4) ."</b><br>";
open (aliases, "$directory\\$file");
$alias = <aliases>;
chomp($alias);
while ($alias) {
if ( ($alias ne "root") ) {
print "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"mailto:$alias\">$alias</a><br>";
}
$alias = <aliases>;
} # end displaying file contents
close (aliases);
} # end displaying fime names.

print "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b><a href=\"#Top\">top</a>";
} # end displaying directory contents.
print "</body>
</html>";

system("net use Z: /DELETE");


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group