Ticket #164 (new enhancement)

Opened 6 years ago

Last modified 3 years ago

Modified version of 'pipe.pl' which updates the message history

Reported by: brian Assigned to:
Priority: normal Milestone:
Component: Database Version: 1.1.1
Severity: normal Keywords:
Cc:

Description

The standard 'pipe.pl' utility script shipped with POPFile does not update the message history when the message is classified. However only a few simple changes to the script will make it update the message history which means the UI can be used to reclassify the message and update the corpus.

The attached 'pipe-history.pl' script was created by modifying the 'pipe.pl' script from the forthcoming POPFile 1.1.2 release. This 'pipe-history.pl' script will also work with the POPFile 1.1.1 release.

The 'pipe.pl-pipe-history.pl-changes.diff' file gives details of the changes which were made to create the new script.

Attachments

pipe-history.pl (3.1 kB) - added by brian on 08/20/11 18:13:39.
Modified version of 'pipe.pl' script from POPFile 1.1.2
pipe.pl-pipe-history.pl-changes.diff (0.9 kB) - added by brian on 08/20/11 18:14:48.
Diff file showing the changes made to 'pipe.pl' script to make 'pipe-history.pl'

Change History

08/20/11 18:13:39 changed by brian

  • attachment pipe-history.pl added.

Modified version of 'pipe.pl' script from POPFile 1.1.2

08/20/11 18:14:48 changed by brian

  • attachment pipe.pl-pipe-history.pl-changes.diff added.

Diff file showing the changes made to 'pipe.pl' script to make 'pipe-history.pl'

08/20/11 21:03:19 changed by brian

To download the attachments click the links above to display the appropriate page and use the "Original Format" link at the bottom of the page.

08/26/13 07:27:35 changed by texasfett

Does it make sense to merge this with regular pipe.pl and be accessable as a command line option (like pipe.pl --history)? Or include this file as is in the next release. Its not very useful here in the tracker if people don't know to look for it.

11/29/13 21:43:35 changed by brian

pipe-history.pl can be used without needing to run POPFile (for example it can be used without needing to run the command "perl popfile.pl").

If POPFile is running while pipe-history.pl is used to classify some email then none of the messages handled by pipe-history.pl will appear in the UI's HISTORY tab.

One way to make the UI's HISTORY tab display the messages handled by pipe-history.pl is to shutdown POPFile (e.g. via the 'Shutdown' link at the top of the UI page) and then restart POPFile. (Any new messages handled by pipe-history.pl after POPFile has restarted will not be shown in the UI.)

An easier way is to simply use the "Search" or "Filter" options on the HISTORY page (e.g. select "Filter by unclassified" then click the "Filter" button). When the results appear (either a list of messages found by the search/filter or the text "No matching messages") cancel the search/filter option by clicking the "Reset" button - this makes the HISTORY page include the messages handled by pipe-history.pl. (Any new messages handled by pipe-history.pl after "Reset" was clicked will not be shown in the UI.)

11/30/13 15:18:15 changed by brian

Forgot to mention that restarting POPFile makes the statistics on the BUCKETS tab include any messages handled by pipe-history.pl prior to the restart but the search/filter workaround does not update these statistics.

12/11/13 12:17:25 changed by brian

Messages handled by this script have an extra line of text (containing a full stop) added at the end of the message. The XML-RPC page in the manual refers to a similar problem when using the handle_message subroutine:

Note, there is a known issue with this call. It presently adds a . and 0x0d0a to the end of output file.