[sork] Vacation and Forwards Configuration

Simon Brereton simon.brereton at dada.net
Fri Apr 30 19:34:04 UTC 2010


> -----Original Message-----
> From: sork-bounces at lists.horde.org [mailto:sork-
> bounces at lists.horde.org] On Behalf Of Jan Schneider
> Sent: Thursday, April 29, 2010 11:42 AM
> 


> conf.php I
> > have:
> >
> > $conf[server][params][query_select]	SELECT ImpForward  FROM
> > MailAccounts WHERE  Username = \U;
> > $conf[server][params][query_set]		UPDATE MailAccounts SET
> ImpForward
> > = 1 WHERE Username  = \U;  UPDATE MailAccounts SET ForwardAdd = \T
> > WHERE  Username  = \U;
> > $conf[server][params][query_disable]	UPDATE MailAccounts SET
> > ImpForward = 0 WHERE Username = \U; UPDATE MailAccounts SET
> ForwardAdd
> > = \U; $conf[server][params][column_target]
> > $conf[server][params][column_keeplocal]
> >
> > I don't know what to use for the last two and there's nothing in
> the
> > horde db (which is what I assumed they were referencing).  I don't
> > mind adding these to my MailAccounts Table, but that will alter the
> > next question I have:
> 
> They reference column names from the query_select query.
> 
> > The first query seems to work, but Forwards reports forwarding as
> on
> > when the ImpForward is empty of equal to 0.  I would expect it to
> > report forwarding on when ImpForward is set to 1 - no?
> 
> Where do you actually store the forwarding target? The most important
> bit is missing in all your queries.

If by target you mean the address to forward to - that's the ForwardAdd column.
If you target you mean the location of the .forward file, then that's something I haven't gotten to yet.

> > The second and third only work when if I use one statement - so
> either
> > it updates the ImpForward column with the status, or changes the
> > ForwardAdd column with the status, but now both.  Please can you
> tell
> > me how I can do this - or if I'm doing something stupid here?
> 
> Why don't you set them in a single query? Only single queries are
> allowed in the configuration.
> 
> > My assumption is that
> >
> > Query-select should ask if forwarding is on or off and populate the
> > field with the forward_to address (if any).
> 
> Yes, if there was a target in your table at all.

Jan - I don't quite understand how there can only be one query.  Could you give an example of how you have this query as a guide?

Thanks.

Simon

 


More information about the sork mailing list