User Tools

Site Tools


reference:attachment_extraction_script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
reference:attachment_extraction_script [2016/03/04 14:26] – created paulreference:attachment_extraction_script [2018/11/14 10:45] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ======Attachment Extraction Scripting====== ======Attachment Extraction Scripting======
 +
 +This is the 'extraction.lua' script.
  
 (Added in V6.17) (Added in V6.17)
Line 10: Line 12:
 For every message VPOP3 loads the script file, then for each (non-virus) attachment it calls  For every message VPOP3 loads the script file, then for each (non-virus) attachment it calls 
   Extract(attachmentname, sender, subject, copy, targetdirectory)   Extract(attachmentname, sender, subject, copy, targetdirectory)
-  +
   * attachmentname - the filename of the attachment in the message   * attachmentname - the filename of the attachment in the message
   * sender - the email address of the sender   * sender - the email address of the sender
Line 17: Line 19:
   * targetdirectory - the target directory determined by the VPOP3 settings   * targetdirectory - the target directory determined by the VPOP3 settings
      
-The functions return two values:+The functions return two values:
   - an 'operation' id : 0 = don't save the attachment to file, and leave it in the message, 1 = save the attachment and delete it from the message, 2 = save the attachment and leave it in the message   - an 'operation' id : 0 = don't save the attachment to file, and leave it in the message, 1 = save the attachment and delete it from the message, 2 = save the attachment and leave it in the message
-  - the directory to save the attachment to (if //operation// <> 0). This can just be 'targetdirectory' or something else.+  - the directory to save the attachment to (if //operation// <> 0). This can just be 'targetdirectory' or something else. (In v6.20 and later this can contain the standard expansions for the extraction directory)
  
 ===Example=== ===Example===
reference/attachment_extraction_script.1457101582.txt.gz · Last modified: 2018/11/14 10:44 (external edit)