Re: [exim] Unusual routing question [OT]

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Heiko Schlittermann
Date:  
À: exim-users
Sujet: Re: [exim] Unusual routing question [OT]
Hello,

Marc Perkel <marc@???> (Mo 08 Nov 2010 20:38:00 CET):
> I'm wondering how to do something tricky, it's perhaps slightly off topic.
>
> I'd like to use something sort of like xinetd where it would listed on
> connections on port 25 and route them to exim (or any other MTA someone
> might be using) IF the connection is from certain host names. xinetd
> will do that.
>
> BUT - this is the tricky part.
>
> I want to route the non-matching traffic to a different program. So some
> port 25 connections go to exim, and some don't depending on the RDNS of
> the IP connecting.
>
> I need it to be simple as well so that Linux admins that aren't
> programmers can figure it out using fairly standard tools.


The tcpd (TCP wrapper) should be capable of doing what you want. I do not know how
much of the tcpd (libwrap) is part of the xinetd.

The TCP wrapper opens the connection and has all information about the
peer. It is up to the TCP wrapper to pass the opened connection via
STDIN/STDOUT to *some* program.

Probably twist (from hosts_options(5)) could be of some help.

But - you should consider that Exim (or some other MTA) get's an already
opened connection via STDIN/STDOUT. I'm not sure how much of the peer
information exim can use.

--
Heiko :: dresden : linux : SCHLITTERMAN.de
GPG Key 48D0359B : 3061 CFBF 2D88 F034 E8D2 7E92 EE4E AC98 48D0 359B