#!/usr/local/bin/perl exit 0 unless $ENV{'SENDER'} eq shift; # deliver normally if not the master my $dot = $ENV{'LOCAL'}; exit 0 if $dot =~ m#[^\w\-\.]#; # give up if strange characters here exit 0 unless $dot =~ s#^$ENV{'USER'}-##; # drop user, fail if fails $dot = ".qmail-$dot"; foreach ('','-default') { # bare + extra garbage in names next if -e ".qmail-$dot$_"; # we don't want to overwrite open OUT,">$dot$_" or die "Could not open '$dot$_': $!\n"; print OUT "#\n"; # enough for qmail to waste close OUT; } exit 0; # deliver this one normally