Re: [Exim] TURN support

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Arne Georg Gleditsch
CC: exim-users
Tárgy: Re: [Exim] TURN support
On Mon, 11 Aug 2003, Arne Georg Gleditsch wrote:

> I think it is, yes. However, after succesfully TURNing, the entire
> SMTP session needs to be renegotiated from start, which I don't think
> -MC will do. So this either has to happen in the script that launches
> the Exim delivery processes, or (as I'd prefer) there needs to be some
> way to trigger the relevant code in Exim when doing -MC (for the first
> time).


Indeed. That might not be too hard, but I can't look at the code just
now.

> > (1) Either leave the messages on Exim's normal queue (if there are not
> > too many of them), or arrange for them to be sent to a different
> > instance of Exim, with a different spool directory. (That achieves your
> > first object without modifying the code.)
>
> I'd like the second alternative, since the enqueued messages then
> would be guaranteed to contain only recipient addresses in the TURN
> domain. However, since I can envisage scenarios with arbitrary many
> TURN domains, I'd like to keep things more dynamic than having to
> maintain a separate Exim instance seems to imply.


Agreed.

> Perhaps applying the pipe transport with the use_bsmtp option to pipe
> to "exim -bs" with an appropriate -DMYQUEUE option and a configuration
> file that would set the queue dir from that would give the desired
> dynamic behaviour?


If you use -bs you are running an Exim *reception* process. That means
you can't use -MC, which runs an Exim *delivery* process.

> > (2) Write a script that is run by TURN. The script can use -bp to scan
> > the waiting messages and find one that is waiting for the connected host
> > or domain.
> >
> > (3) The script then runs 'exim -MC <options>' for one waiting message.
> > Exim should automatically pass the stdin/stdout to further processes to
> > deliver any other messages that are waiting for the same host.
>
> With a seperate queue directory, you could skip step 2 and just set
> the -DMYQUEUE-macro, could you not?


With the files not in the "real" queue of an Exim instance, the trick of
using -MC is not going to work. You would have to call Exim twice, once
to put the message on its queue, using "-bs -odq", and then again to get
it to deliver the message. Problem: how to stop it accidentally trying
to deliver the message "normally".

I'll think more about this stuff in due course. Now that I've realized
that a lot of the apparatus is actually there in the form of the code
for -MC, I might find an easy way to do it.

However, this will not now be for several weeks. I am currently trying
to pull together the 4.21 release.

Philip

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book