[ingo] Selecting backends based on current Imp mail server
Chris Hastie
lists at oak-wood.co.uk
Tue Mar 30 04:18:25 PST 2004
On Tue, 30 Mar 2004, Jan Schneider <jan at horde.org> wrote:
> Zitat von Chris Hastie <lists at oak-wood.co.uk>:
>
> > On Mon, 29 Mar 2004, Jan Schneider <jan at horde.org> wrote
> >> Zitat von Chris Hastie <lists at oak-wood.co.uk>:
> >>
> >>> On Mon, 29 Mar 2004, Jan Schneider <jan at horde.org> wrote:
> >>>
> >>>> Zitat von Chris Hastie <lists at oak-wood.co.uk>:
> >>>> >
> >>>> > Is it possible to select backend based on the current mailserver that
> >>>> > Imp is connected to?
> >>>>
> >>>> Not currently. But a patch would be great.
>
> Try to KISS.
>
> Add a mail/getPreferredServer or mail/getCurrentServer method to IMP's api
> and you're done.
> All that's left is to add an example how to use that method to the comments
> of Ingo's backends.php, because you can now do something like:
>
> [...]
> 'preferred' => $GLOBALS['registry']->call('mail/getCurrentServer'),
> [...]
>
> Jan.
>
You've lost me here. This will, as far as I can see, set the value of
'preferred' for a given backend to Imp's current mail server. This will then be
checked against the current http host name to see if it matches. I don't see
how this helps.
On the other hand
'params' => array(
// Hostname of the timsieved server
'hostspec' => $GLOBALS['registry']->call('mail/getCurrentServer'),
...
),
might do the trick, at least for multiple Cyrus servers using sieve. And taking
this KISS thing a bit further, wouldn't
'params' => array(
'hostspec' => $GLOBALS[_SESSION]['imp']['server'];
...
),
achieve my aim with out any patching at all?
It would not be perfect, as I also have a none Cyrus box that my Imp
installation points at, which will probably throw some interesting errors if I
try to use Ingo and a sieve backend for. But only I ever use that server, so I
can live with it.
--
Chris Hastie
More information about the ingo
mailing list