Your original e-smithForward20 file should look like this {
$OUT = '';
use esmith::config;
use esmith::db;
my %accounts;
tie %accounts, 'esmith::config', '/home/e-smith/accounts';
# get $USERNAME from esmith::config - put there by the
# email-update-user action as a temporary variable
die "Username argument missing." unless defined ($USERNAME);
my $type = db_get_type(\%accounts, $USERNAME);
die
"Account $USERNAME is not a user account; "
. "update email forwarding failed.\n"
unless $type eq 'user';
my $EmailForward = db_get_prop(\%accounts, $USERNAME, "EmailForward");
my $ForwardAddress = db_get_prop(\%accounts, $USERNAME, "ForwardAddress");
if ($EmailForward eq "local")
{
$OUT = "./Maildir/\n";
}
elsif ($EmailForward eq 'forward')
{
$OUT = "&" . $ForwardAddress . "\n";
}
elsif ($EmailForward eq 'both')
{
$OUT = "&" . $ForwardAddress . "\n";
$OUT .= "./Maildir/\n";
}
elsif ($EmailForward eq 'procmail')
{
$OUT .= "\n";
$OUT .= "| /usr/bin/procmail ~/.procmailrc \n";
}
else
{
# this shouldn't happen - if it does, deliver locally
$OUT = "./Maildir/\n";
}
}
You might want to save this file for later reference so you can revert back to it if need be.