6.0.0-beta1
7/8/25

[#7543] Driver for Postfix in virtual SQL setup
Summary Driver for Postfix in virtual SQL setup
Queue Vacation
Queue Version 3.0.1
Type Enhancement
State Rejected
Priority 2. Medium
Owners Horde Developers (at)
Requester ralph (at) rsrc (dot) de
Created 10/23/2008 (6102 days ago)
Due
Updated 01/19/2015 (3823 days ago)
Assigned 12/15/2008 (6049 days ago)
Resolved 01/19/2015 (3823 days ago)
Milestone
Patch Yes

History
01/19/2015 03:16:17 PM Ralf Lang Comment #21
State ⇒ Rejected
Reply to this comment
All versions of vacations H3 are out of maint. and vacations has been 
absorbed by ingo.
03/31/2009 04:29:35 PM carlos (dot) protasi (at) gmail (dot) com Comment #20 Reply to this comment
Attached is a driver for vacation massages with Postfix in a virtual
SQL users setup.
Modified Driver:
Some cleanup, some SQL query escaping for reliability
I which directories i have to put these files???


12/15/2008 02:43:41 AM Chuck Hagenbuch State ⇒ Assigned
Assigned to Horde DevelopersHorde Developers
 
11/10/2008 12:54:11 PM ralph (at) rsrc (dot) de Comment #19
New Attachment: customsql.tar.gz Download
Reply to this comment
Patch attached.
conf.xml patch was tainted. Correct patch attached.
11/06/2008 04:19:27 PM ralph (at) rsrc (dot) de Comment #18
New Attachment: customsql.zip Download
Reply to this comment
Patch attached.

Adds optional 2nd query to set and unset vacation.

Adds \R expansion for domain name.

FIXME:

domain name retrival and storage in $this->_domain probably not correct.

Alas, I'm no PHP coder.
11/06/2008 02:11:00 PM ralph (at) rsrc (dot) de Comment #17 Reply to this comment
Yes, but afaict the Driver loading infrastructure therefore had to be
extended too in order to load the module within module code and
config data.
That sounds a bit over complicated to me. If you write both drivers,
I'll try and find the time to consolidate code between them as much
as possible.
I've just begun to work on it.
11/06/2008 02:30:38 AM Chuck Hagenbuch Comment #16 Reply to this comment
Yes, but afaict the Driver loading infrastructure therefore had to be
extended too in order to load the module within module code and
config data.
That sounds a bit over complicated to me. If you write both drivers, 
I'll try and find the time to consolidate code between them as much as 
possible.
10/26/2008 01:34:43 PM ralph (at) rsrc (dot) de Comment #15 Reply to this comment
...but if our existing driver is extended to allow multiple queries
in a generic fashion, wouldn't your driver only have to provide the
postfix/whatever specific queries?
Yes, but afaict the Driver loading infrastructure therefore had to be 
extended too in order to load the module within module code and config 
data.

As said: my intention was to have a gui for my driver where the user 
can enter table/field names not just raw sql queries.



Imo it would be nice to have both:

a customsql driver which could to more than one sql querie and a 
dedicated postfixsql driver.
10/25/2008 02:41:06 PM Michael Rubinsky Comment #14 Reply to this comment
...but if our existing driver is extended to allow multiple queries in 
a generic fashion, wouldn't your driver only have to provide the 
postfix/whatever specific queries? Why would it have to duplicate the 
same query code?
10/25/2008 08:56:12 AM ralph (at) rsrc (dot) de Comment #13 Reply to this comment
Is it possible to have the postfix-specific driver extend the custom
sql driver, and thereby avoid most code duplication?
Even if it was possible it wouldn' be feasible. The only method that's 
unchanged is connect. Therefore not much code dulpication would be 
avoided.


10/25/2008 12:36:49 AM Chuck Hagenbuch Comment #12
State ⇒ Feedback
Reply to this comment
Is it possible to have the postfix-specific driver extend the custom 
sql driver, and thereby avoid most code duplication? I'm a bit out of 
the loop on virtual mail user setups, but if postfix + sql is one of 
the most common ones, then I agree making it easy to set up would be 
good, especially if it doesn't introduce a ton of duplicate code.
10/24/2008 06:11:59 PM ralph (at) rsrc (dot) de Comment #11 Reply to this comment
Sorry if it's too much asked from you to provide a patch instead.
That's not the point. The point is: suppose both solutions existed: my 
postfixsql driver and an enhanced customsql driver that could issue 
two sql queries.

If I were a Postfix admin and could choose between

a) easily configure my postfixsql driver via the config web interface 
by just entering table and field names or

b) drill down naked sql queries

...I'd choose a) hands down. Even if I were capable of doing b). And 
consider: some aren't.



Anyhow: I'll write that enhancement for the customsql driver next 
week. Then why not let the users decide?




10/24/2008 05:06:56 PM Jan Schneider Comment #10
State ⇒ Rejected
Reply to this comment
Sorry if it's too much asked from you to provide a patch instead.
10/24/2008 03:32:12 PM ralph (at) rsrc (dot) de Comment #9 Reply to this comment
10/24/2008 11:38:06 AM ralph (at) rsrc (dot) de Comment #8 Reply to this comment
Code duplication
Additional functionality.


10/24/2008 11:00:57 AM Jan Schneider Comment #7 Reply to this comment
Code duplication
10/24/2008 10:51:48 AM ralph (at) rsrc (dot) de Comment #6 Reply to this comment
Then provide a patch for that driver to allow more than one query.
When I began to work on a solution yesterday, thats exactly what I 
began with at first.

But providing a dedicated solution for one of the most widely deployed 
mail setups around was a obvious choice. Whats your argument against 
providing that?



-Ralph
10/24/2008 10:43:49 AM ralph (at) rsrc (dot) de Comment #5
New Attachment: Horde-Vacation-Postfix-virtual-SQL-Driver.tgz Download
Reply to this comment
Attached is a driver for vacation massages with Postfix in a virtual
SQL users setup.
Modified Driver:

Some cleanup, some SQL query escaping for reliability.
10/24/2008 10:40:38 AM Jan Schneider Comment #4
State ⇒ Feedback
Reply to this comment
Then provide a patch for that driver to allow more than one query.
10/24/2008 10:37:34 AM ralph (at) rsrc (dot) de Comment #3 Reply to this comment
There already is an SQL driver for custom queries in CVS.
That one doesn't help here as said: ie it only supports _one_ SQL 
querie to activate vacation but for a Postfix virtual user setup you 
need _two_.

Your customsql driver is _not_ capable of supporting a Postfix setup 
with virtual users.



-Ralph
10/24/2008 10:31:52 AM Jan Schneider Comment #2
State ⇒ Rejected
Reply to this comment
There already is an SQL driver for custom queries in CVS.
10/23/2008 01:26:33 PM ralph (at) rsrc (dot) de Comment #1
Priority ⇒ 2. Medium
State ⇒ New
New Attachment: patch-postfix-virtual-SQL.tgz Download
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Vacation
Summary ⇒ Driver for Postfix in virtual SQL setup
Type ⇒ Enhancement
Reply to this comment
Attached is a driver for vacation massages with Postfix in a virtual 
SQL users setup. It's agains FRAMEWORK_3 from CVS.

I started with customsql from CVS, but as said here:

http://thread.gmane.org/gmane.comp.horde.sork/2531

...for a Postfix autoreply setup the activation/deactivation must 
execute two SQL statements.

This drivers now takes all necessary SQL tables and fields from the 
Horde vacation online config and does build its SQL queries accordingly.

What do you think?

Saved Queries