HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   Sieve & autoresponder dates (http://www.howtoforge.com/forums/showthread.php?t=53987)

wyrie 31st August 2011 13:14

Sieve & autoresponder dates
 
Hi

Has anyone used the auto responder dates with sieve as the filtering backend?

till 31st August 2011 13:30

As far as I know, there is no evaluation function for dates available in sieve filtering language. So the date functions will work only on courier systems.

wyrie 31st August 2011 13:35

Perhaps it would be better to move the date evaluation away from the filtering language and to the monitoring module, for example.

That way ISPC would control the function regardless of the backend, OS etc.

till 31st August 2011 13:39

Currently there is no api / action hook in ispconfig to control actions based on a specific date or run actions out of order. But we might implement such a api in future. The monitoring module is for monitoring only, I think we should not add email functions to it.

wyrie 31st August 2011 13:54

the monitoring module runs time based actions, which is why I mentioned it - but only as an example:

--------------------------------------------------------------------
public function onLoad() {
global $app;

/*
* Do the monitor every n minutes and write the result to the db
*/
$min = @date('i');
if (($min % $this->interval) == 0) {
$this->_doMonitor();
}
}

Executed by the server cron job that runs every minute we have all that would be needed. The hook could be places in the mail_module onLoad() and as the autoresponder dates controls allow the user to define times down to 5 minute intervals it would be accurate.

till 31st August 2011 15:27

The mail module is only loaded if there is a change in one of the database tables as it is not a core module. So it is not loaded or available when the monitor cronjob runs. I dont think that it is a good idea to add this into the monitor as this would make the software unmaintainable over the long time. I think a clean integration of a API for time based jobs is a better choice.


All times are GMT +2. The time now is 17:36.

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