[sork] Vacation and Forwards Configuration

Jan Schneider jan at horde.org
Thu Apr 29 15:41:49 UTC 2010


Zitat von Simon Brereton <simon.brereton at dada.net>:

> Hi
>
> I'm having quite a bit of trouble getting the various sork modules to work..
>
> I don't use accounts, and passwd is working now, but forward and  
> vacation are somewhat more troublesome.
>
> I have a straight forward Forwards question.  My mail DB is called  
> Mail and mail account details are stored in MailAccounts.  As of  
> yesterday, there is a new column called ImpForward.  In the 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.

> 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.

> Query_set should set forwarding to 1 or Y or true, and set the  
> forwarding address.
> Query_disable should set the set the forward to off/0/false and  
> reset the forwarding address (which for a litany of reasons in my  
> system needs to be the email address) even when forwarding is off..
>
> If these assumptions are not correct, please can you guide me to the  
> correct one?
>
>
> For Vacations, I have a rather larger issue - and I shold probably  
> solve the forwarding question first.  But basically, my MailAccounts  
> table has AutoResp, AutoRespSub and AutoRespTxt fields.  I would  
> like to reference and set those.  Can you tell me which file(s) I   
> would need to change to do that?
>
> Thanks
>
> Simon
>
>
>
>
> --
> Sork mailing list - Join the hunt: http://horde.org/bounties/#sork
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: sork-unsubscribe at lists.horde.org
>



Jan.

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



More information about the sork mailing list