Koozali.org: home of the SME Server

[MAIL] Failure Notice from Mailer-Daemon

G2LOQ

[MAIL] Failure Notice from Mailer-Daemon
« 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
Code: [Select]
/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 ??

bobk

[MAIL] Failure Notice from Mailer-Daemon
« Reply #1 on: May 22, 2004, 03:06:23 AM »
Your original e-smithForward20 file should look like this
Code: [Select]
{
    $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.

Anonymous

[MAIL] Failure Notice from Mailer-Daemon
« Reply #2 on: May 22, 2004, 11:34:35 AM »
:-D Thanks a lot, I check it ASAP.