[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - Record filter use

Record filter use

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

Record filter use

Postby gardnc » Sun Feb 26, 2006 4:27 am

I have done no poco scripting before and would like to be able to record each time a filter has deleted an email so I can determine the effectivness of my spam filtering. I've searched through these forums but can not see anything related. I see in the filter I can call a script after the mail is deleted.

If poco can't store the information, is there a way the script can launch an executable outside poco that can record the data in a database? The script would need to pass on a reference as to which filter was calling the executable.

Is this possible, and can anyone point me in the right direction?

Thanks,

Larry
gardnc
New Arrival
 
Posts: 1
Joined: Sun Feb 26, 2006 4:19 am
Location: Sylva, NC

Postby Sandy » Sun Feb 26, 2006 12:00 pm

Poco scripts can write to a text file. YOu can store whatever you like there.
Sandy
 

Postby FieldDir121 » Tue Feb 28, 2006 1:58 pm

Larry,

Look at this topic, the 8th post. There is an example of writing to an external file to keep track of which filter is active.

Scott
FieldDir121
Resident Poster
 
Posts: 149
Joined: Mon Aug 02, 2004 5:18 pm

Postby Michael » Tue Feb 28, 2006 2:55 pm

I would suggest calling the script before you delete the message. Once a message has been deleted it is removed from the processing queue and I suspect the script wouldn't be called (I could be wrong on this).

This could also be addressed if there were an "OnDelete" event. There isn't but one has been requested.
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Postby FieldDir121 » Tue Feb 28, 2006 5:42 pm

Larry,

Why not have the filter put the messages in a special mailbox? You can then count them, delete them, etc. without having to write a script. I created a mailbox called SpamEntire that contains all messages trapped by my list of keywords using a "file within a filter".

The auto repeat on the delete key can get rid of 100 messages in a few seconds. It also provides a second chance during testing in case the filter gets rid of messages you might want.

Michael, If a filter deletes a message and then calls a script the script will still run (several of my filters do that), but the scripts will not have access to the message. Any number of scripts can be called as long as they are called from within that filter.

Scott
FieldDir121
Resident Poster
 
Posts: 149
Joined: Mon Aug 02, 2004 5:18 pm


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 1 guest

cron