Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: G2LOQ on May 22, 2004, 12:48:29 AM
-
Hi,
I'm using SME 6.0.0. When I configure an user with an email forward and when I try to send an email to this user I always get back a failure notice from the Mailer-Daemon, even if this user succefully received my email...
I suspect that my modification of /etc/e-smith/templates-user-custom/.qmail/e-smithForward20
was a big mistake but ... :-? like a newbie ... I forgot to make a backup of this file before my changes.
It is possible that the change proposed on this page (http://vanhees.homeip.net/modules/indexer//5.6//HowTo//HowtoMultiForward.html) corruped my configuration ??
-
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.
-
:-D Thanks a lot, I check it ASAP.