I just posted this to a thread and thought I'd make it available to anyone who wants to run it on their servers. It changes all Default Addresses (i.e. catchall aliases) for all domains on the server to :fail:
Use at your own risk. That means, backup /etc/valiases before running itCode:#!/usr/bin/perl print "Converting all domain Default Accounts to :fail: ..."; opendir (DIR, "/etc/valiases/") or die; while (my $file = readdir (DIR)) { if ($file =~ /^\./) {next} open (IN, "</etc/valiases/$file") or die; my @data = <IN>; close (IN); open (OUT, ">/etc/valiases/$file") or die; foreach my $line (@data) { if ($line =~ /^\*\:/) { print OUT "*: :fail:\n"; } else { print OUT $line; } } close (OUT); } print "Done!\n";![]()



LinkBack URL
About LinkBacks
Reply With Quote





