Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th April 2007, 12:27
Isterklister Isterklister is offline
Junior Member
 
Join Date: Feb 2007
Location: Sweden, Frsn
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
Exclamation Auto respond - Yaa and time limited

Hello,
I have installed by "Autoresponders to accompany Virtual Users and Domains with Postfix, Courier and MySQL " and I wrote my own php script to let the user edit there autoreply.

Now to my problem: This does'n take notise about tstart and tfinish. How can I enable that?

Pelle
Reply With Quote
Sponsored Links
  #2  
Old 12th April 2007, 16:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,702 Times in 2,545 Posts
Default

What exactly have you done, and what's in your PHP script?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 12th April 2007, 17:41
Isterklister Isterklister is offline
Junior Member
 
Join Date: Feb 2007
Location: Sweden, Frsn
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I have installed Ubuntu 6.10
"The Perfect Setup - Ubuntu 6.10 Server (Edgy Eft)",
"Virtual Users And Domains With Postfix, Courier And MySQL (Ubuntu 6.10 Edgy Eft)" and
"Autoresponders to accompany Virtual Users and Domains with Postfix, Courier and MySQL" and on top of that eGroupware.

In the php-script you log in and you get a form with all options in table "autoresponder" the users should change. Time are converted to Unix Timestamp (the user see a small java-calender).

I have tried to change the post "autoresponder" directly in database and thrue my script but it is something in comunication between postfix and yaa I think.
In yaa.conf one line are
'sql_select' => "select active,message,subject,charset,forward from autoresponder where address = %m and active='1'",

It does'n read the lines with tstart and tfinish. How could I send tfinsish and tstart to yaa?

Could it be as simple as:
'sql_select' => "select active,message,subject,charset,forward,tstart,tfin ish from autoresponder where address = %m and active='1'",?

or (I see now) should I change the SQL query to test time to?
where address = %m and active='1'" and - [time are between tstart and tfinish] in some way? How to write such a query?

Last edited by Isterklister; 12th April 2007 at 17:50.
Reply With Quote
  #4  
Old 13th April 2007, 15:30
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,702 Times in 2,545 Posts
Default

Quote:
Originally Posted by Isterklister
or (I see now) should I change the SQL query to test time to?
where address = %m and active='1'" and - [time are between tstart and tfinish] in some way? How to write such a query?
I'd try something like this:

'sql_select' => "select active,message,subject,charset,forward,tstart,tfin ish from autoresponder where address = %m and active='1' and tstart < [current_time] and t_finish > [current_time]"

But I'm not sure if there's a variable available in yaa.conf that holds the current time.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
Isterklister (14th April 2007)
  #5  
Old 14th April 2007, 11:11
Isterklister Isterklister is offline
Junior Member
 
Join Date: Feb 2007
Location: Sweden, Frsn
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
 
Thumbs up Solved tstart and tfinish

Ia used this line in yaa.conf
'sql_select' => "select active,message,subject,charset,forward from autoresponder where address = %m and active='1' and tstart < unix_timestamp() and tfinish > unix_timestamp()",

It is working excelent! Now yaa doesn't have to take care of tstart and tfinish because the query solves that.

Thank you!
__________________
__________________
Pelle

Last edited by Isterklister; 16th April 2007 at 11:25.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:00.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.