Re: Exim - send mail queued for host

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Nigel Metheringham
Fecha:  
A: Philip Hazel
Cc: exim-users
Asunto: Re: Exim - send mail queued for host
} On Mon, 3 Jun 1996, Nigel Metheringham wrote:
}
} > Would it be possible to add another -M option where you pass it a
} > hostname, and exim then invokes a queue run on the first (existing)
} > message queued for that hostname (and presumably picking up other
} > messages queued for that host after delivery of the first through the
} > normal mechanism).
}
} Won't the existing -R option do? It's not precisely what you ask for,
} but what you ask for is expensive, as a message has to be routed
} before the hosts it refers to can be discovered.

As ever, there is always an option hiding that you overlooked...

-R would do as a first cut.

I suppose the slightly better alternative is something like this
(using rather free form psuedo perl):-

    #!/usr/bin/perl
    #
    # Called as
    #    prod <hostname>
    #
    $Hostname = shift;
    $Ip = GetHostIpByName(Hostname);
    #
    $Key = "T:$HostName:$Ip";
    open(WAITSMTP, "exim_dumpdb -f wait-smtp|") || die "Ouch! - $!";
    @Lines = grep(/^$Key/, <WAISMTP>);
    close WAITSMTP;
    #
    foreach $Line (@Lines) {
        ($Bit, $Ids) = split(/\s+/, $Line, 2);
        system("exim -q $Ids");
    }


OK, its pretty rough, but what I mean is that hostname is as near
directly as possible looked up in wait-smtp, and any messages
actually waiting on it are pushed.

This helps more than -R because sometimes lots of domains go to one
target!



    Nigel.


-- 
[ Nigel.Metheringham@???   - Unix Applications Engineer ]
[ *Views expressed here are personal and not supported by PLAnet* ]
[ PLAnet Online : The White House          Tel : +44 113 251 6012 ]
[ Melbourne Street, Leeds LS2 7PS UK.      Fax : +44 113 2345656  ]