This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
reference:archive_script [2018/11/14 10:45] – external edit 127.0.0.1 | reference:archive_script [2023/03/25 23:33] (current) – paul | ||
---|---|---|---|
Line 6: | Line 6: | ||
The message headers will still be archived, along with the explanation text returned by the script. | 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: | + | The Lua script is stored in a file called **archive.lua** |
+ | |||
+ | VPOP3 calls a function called **ArchiveRules** which should have the following prototype: | ||
ArchiveRules(< | ArchiveRules(< | ||
Line 24: | Line 26: | ||
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. | 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. | ||
+ | |||
+ | =====Custom Archive Store functions===== | ||
+ | (from VPOP3 v8.4 onwards) | ||
+ | |||
+ | These functions allow the archive to be stored on a non-standard file store - eg an FTP server, or Amazon S3-like system, etc. The functions can perform things like encryption, compression etc, as long as they can reverse the process correctly. | ||
+ | |||
+ | There are a set of functions which perform uploads, downloads, check for presence of message file, etc. | ||
+ | |||
+ | ====CustomStore_Check==== | ||
+ | |||
+ | CustomStore_Check() | ||
+ | | ||
+ | * Returns an empty string if the custom store is accessible, or an error response (which is logged) if it is inaccessible | ||
+ | |||
+ | ====CustomStore_Upload==== | ||
+ | |||
+ | CustomStore_Upload(local_filename, | ||
+ | | ||
+ | Uploads ' | ||
+ | |||
+ | * Returns two values | ||
+ | - Upload succeeded (true/ | ||
+ | - Want a local store as well (true/ | ||
+ | |||
+ | ==== CustomStore_Get==== | ||
+ | |||
+ | CustomStore_Get(archive_filename, | ||
+ | | ||
+ | Downloads ' | ||
+ | |||
+ | ==== CustomStore_CheckGet==== | ||
+ | |||
+ | CustomStore_CheckGet(archive_filename) | ||
+ | | ||
+ | Checks if ' | ||
+ | |||
+ | * Returns true if the file is available | ||
+ | |||
+ |