[sork] Setting up Vacation with custom SQL driver

Sebastian Feltel feltel at rahn-schulen.de
Sun Nov 28 15:33:42 UTC 2010


Hello Jan

Am 28.11.2010 14:49, schrieb Jan Schneider:

> \U is *not* the email address, it's the full user name. If your user 
> names don't contain a domain part, \u and \U are the same, and \D is 
> empty.

Okay, so I must construct the needed values with a bunch of mysql
queries. Am I able to execute two or more statements at once while
enabling or disabling the vacation? Like this:


DELETE FROM system.vacation WHERE vacation.email = (SELECT email FROM
system.postfix_users WHERE username LIKE \u) AND vacation.active = '1';
DELECT FROM system.postfix_virtual WHERE email LIKE (SELECT email FROM
system.postfix_users WHERE username LIKE \u);


Setting the queries this way leads to an MySQL error in the horde log.


>> Any help or hint is highly appreciated. :-)
> 
> Use CONCAT():
> INSERT into TABLE (username, email, foo, bar) VALUES (\U, CONCAT(\U, 
> '@domain'), fooval, barvar);


Thanks for the hint. :-)

Regards,
Sebastian


More information about the sork mailing list