User Tools

Site Tools


reference:archive_script

This is an old revision of the document!


Archive Script

(from VPOP3 v6 onwards)

Archive scripting lets you indicate whether full message content should be stored in the message archive. This could be used, for instance, for filtering out messages containing credit card details.

The message headers will still be archived, along with the explanation text returned by the script.

The Lua script is stored in a file called archive.lua in the VPOP3 directory. VPOP3 calls a function called ArchiveRules which should have the following prototype:

ArchiveRules(<return path>, <subject>, <time>, <type>, <sender email>, <authenticated sender>, <ip address>, <message-id>, <size>, <attachments>, <recipients>, <references>, <header>, <content>)

This function should return a string which sets the explanation of why the message should not be archived - this explanation is stored in the archived message. If there isn't a return value, or the returned string is blank, VPOP3 will archive the message as normal.

A simple example would be:

function ArchiveRules(retpath, subject, time, type, from, authsender, ipaddr, msgid, size, attch, recipients, references, header, content)

if (subject == "bibble") then
	return "BibbleTest";
end

end

If you need, we can produce a script for you, but there would be a cost for this - contact support@pscs.co.uk with a specification for a quote.

reference/archive_script.1335543281.txt.gz · Last modified: 2018/11/14 10:44 (external edit)