alex | 2 Jun 2005 22:11

Choosing backend

According to mail list archives, Ingo doesn't support multiple backends
directly.  What I'd like to do is to choose the backend in config/backends.php
based on the mail server user is authenticated against (I'm using IMP for
authentication).

Basically something like:

switch ($???) {
case 'server1':
   // define backend for server1 here
   break;
case 'server2':
   // define backend for server2 here
   break;
// and so on
default:
   // failsafe backend
}

But, I'm missing the "$???" part.  I guess there should be some global variable
exported by IMP module containing that info (or a function returning it), but I
haven't been able to find it.

BTW, in archives, I found response from Jan suggesting several workarounds to
get multiple backends.  One of them was to install several copies of ingo with
different names.  I also played with that approach (not particulary liked it),
and found out that apart from Horde's config/registry.php I also needed to edit
ingo-*/lib/api.php and ingo-*/lib/base.php files changing references to "ingo"
to the new names.  In case I need to implement something like that in the
future, are those the only changes needed?  Or is it safer not to play with
(Continue reading)

Jan Schneider | 6 Jun 2005 12:43
Favicon
Gravatar

Re: Choosing backend

Zitat von alex@...:

> According to mail list archives, Ingo doesn't support multiple backends
> directly.  What I'd like to do is to choose the backend in 
> config/backends.php
> based on the mail server user is authenticated against (I'm using IMP for
> authentication).
>
> Basically something like:
>
> switch ($???) {
> case 'server1':
>   // define backend for server1 here
>   break;
> case 'server2':
>   // define backend for server2 here
>   break;
> // and so on
> default:
>   // failsafe backend
> }
>
> But, I'm missing the "$???" part.  I guess there should be some 
> global variable
> exported by IMP module containing that info (or a function returning 
> it), but I
> haven't been able to find it.

Try if you find what you need in $_SESSION['imp'], but you must 
authenticate through IMP to have this available directly after logging 
(Continue reading)

alex | 6 Jun 2005 18:38

Re: Choosing backend

Quoting Jan Schneider <jan@...>:

> Zitat von alex@...:
>
>> According to mail list archives, Ingo doesn't support multiple backends
>> directly.  What I'd like to do is to choose the backend in
>> config/backends.php
>> based on the mail server user is authenticated against (I'm using IMP for
>> authentication).
>
> Try if you find what you need in $_SESSION['imp'], but you must
> authenticate through IMP to have this available directly after logging
> in.

Thanks, $_SESSION['imp']['server'] works great.  I'm using IMP for
authentication, so that should work just fine.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Nicolas Schmitz | 8 Jun 2005 17:56
Picon
Favicon

removing the "forward" default rule

Hello,
thanks for this great tool.
I'm wondering if it's possible to remove the default "forward" rule ?

Thanks.

Nicolas Schmitz
Jan Schneider | 8 Jun 2005 18:11
Favicon
Gravatar

Re: removing the "forward" default rule

Zitat von Nicolas Schmitz <Nicolas.Schmitz@...>:

> Hello,
> thanks for this great tool.
> I'm wondering if it's possible to remove the default "forward" rule ?

The default rules are defined in config/prefs.php.

Jan.

--

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/

RISKO Gergely | 9 Jun 2005 04:54
Picon
Picon

[PATCH] ingo's vacation doesn't handle the accents (non-ascii characters) well

Hi,

This patch fixes an ingo problem, and contains a cyrus workaround (it
should be reported to the cyrus team, but now gmail just dismissed my
article about it, I hope this will get the way to the mailing list).

When you put a vacation in a sieve script, you should use UTF-8, as
commanded by the RFCs.  The server however MUST encode it according to
rfc 2047 if the non ascii utf-8 characters are in the subject (or
other header part).  Cyrus doesn't do this, while ingo doesn't put the
sieve script in utf-8 if the current nls charset is not utf-8.

So, here is the propsed patch, which should be extended by code for
the case, when not sieve is the backend:
http://gergo.risko.hu/ingo-utf8-cyrus-sieve.patch     (also attached)

Thanks for your work,
Gergely

Hi,

This patch fixes an ingo problem, and contains a cyrus workaround (it
should be reported to the cyrus team, but now gmail just dismissed my
article about it, I hope this will get the way to the mailing list).

When you put a vacation in a sieve script, you should use UTF-8, as
commanded by the RFCs.  The server however MUST encode it according to
(Continue reading)

Nicolas Schmitz | 9 Jun 2005 09:24
Picon
Favicon

Re: removing the "forward" default rule


>The default rules are defined in config/prefs.php.
>
>Jan.
>
>  
>
Hello,
thanks, but can you tell me exactly where ?
I have tried to remove
i:3;a:2:{s:4:"name";s:7:"Forward";s:6:"action";i:' . 
INGO_STORAGE_ACTION_FORWARD . ';}
in $_prefs['rules']

And also
// forwards
$_prefs['forward'] = array(
    'value' => 'a:2:{s:1:"a";a:0:{}s:1:"k";i:0;}',
    'locked' => false,
    'shared' => false,
    'type' => 'implicit'
);

With no success... and I don't see any other reference to the default rules.
Nicolas Schmitz | 9 Jun 2005 11:46
Picon
Favicon

Re: removing the "forward" default rule


>>>      
>>>
>>Hello,
>>thanks, but can you tell me exactly where ?
>>I have tried to remove
>>i:3;a:2:{s:4:"name";s:7:"Forward";s:6:"action";i:' .
>>INGO_STORAGE_ACTION_FORWARD . ';}
>>in $_prefs['rules']
>>    
>>
>
>That's the correct place. But it only works for new users of course.
>
>Jan.
>  
>
Ok, but I get errors messages when I remove this ...

If I put this in prefs.php :

// filter rules
$_prefs['rules'] = array(
     'value' => 
'a:4:{i:0;a:2:{s:4:"name";s:9:"Whitelist";s:6:"action";i:' . 
INGO_STORAGE_ACTION_WHITELIST . 
';}i:1;a:3:{s:4:"name";s:8:"Vacation";s:6:"action";i:' . 
INGO_STORAGE_ACTION_VACATION . 
';s:7:"disable";b:1;}i:2;a:2:{s:4:"name";s:9:"Blacklist";s:6:"action";i:' 
. INGO_STORAGE_ACTION_BLACKLIST . ';}}',
(Continue reading)

Jan Schneider | 9 Jun 2005 10:32
Favicon
Gravatar

Re: removing the "forward" default rule

Zitat von Nicolas Schmitz <Nicolas.Schmitz@...>:

>
>> The default rules are defined in config/prefs.php.
>>
>> Jan.
>>
>>
>>
> Hello,
> thanks, but can you tell me exactly where ?
> I have tried to remove
> i:3;a:2:{s:4:"name";s:7:"Forward";s:6:"action";i:' .
> INGO_STORAGE_ACTION_FORWARD . ';}
> in $_prefs['rules']

That's the correct place. But it only works for new users of course.

Jan.

--

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/

Jan Schneider | 9 Jun 2005 12:08
Favicon
Gravatar

Re: removing the "forward" default rule

Zitat von Nicolas Schmitz <Nicolas.Schmitz@...>:

>
>>>>
>>>>
>>> Hello,
>>> thanks, but can you tell me exactly where ?
>>> I have tried to remove
>>> i:3;a:2:{s:4:"name";s:7:"Forward";s:6:"action";i:' .
>>> INGO_STORAGE_ACTION_FORWARD . ';}
>>> in $_prefs['rules']
>>>
>>>
>>
>> That's the correct place. But it only works for new users of course.
>>
>> Jan.
>>
>>
> Ok, but I get errors messages when I remove this ...
>
> If I put this in prefs.php :
>
> // filter rules
> $_prefs['rules'] = array(
>     'value' =>
> 'a:4:{i:0;a:2:{s:4:"name";s:9:"Whitelist";s:6:"action";i:' .
> INGO_STORAGE_ACTION_WHITELIST .
> ';}i:1;a:3:{s:4:"name";s:8:"Vacation";s:6:"action";i:' .
> INGO_STORAGE_ACTION_VACATION .
(Continue reading)


Gmane