This shows you the differences between two versions of the page.
Previous revision | |||
— | reference:lua_pop3_client_script [2023/08/16 08:48] (current) – paul | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======POP3 Client Lua Scripting====== | ||
+ | |||
+ | The POP3 Client [[http:// | ||
+ | |||
+ | VPOP3 will call the following Lua functions in the script at the following times: | ||
+ | * **Start()** - called when the POP3 session starts, before VPOP3 starts downloading any messages. | ||
+ | * **DownloadRules()** - called before each message is downloaded to determine how VPOP3 should handle the message. A scripted version of normal [[http:// | ||
+ | * **StartMessage()** - called just before VPOP3 starts downloading a message from the remote server. | ||
+ | * **MessageLineRaw()** - called when VPOP3 has downloaded a line of a message from the remote server. | ||
+ | * **MessageLine()** - called after VPOP3 has processed a line of a message from the remote server,just before it saves it. | ||
+ | * **EndMessage()** - called when VPOP3 has finished downloading a message from the remote server. | ||
+ | * **ProcessMessage()** - called after VPOP3 has downloaded a message from the remote server to determine if any special actions need to be performed on the message. | ||
+ | * **End()** - called at the end of the POP3 session. | ||
+ | |||
+ | |||
+ | =====ProcessMessage()===== | ||
+ | '' | ||
+ | |||
+ | This function is called by VPOP3 when a message has been received by the SMTP service. | ||
+ | |||
+ | * < | ||
+ | * < | ||
+ | * < | ||
+ | * <current actions> is a table with the following entries | ||
+ | * SendToOriginalRecipients boolean - should the message be sent to the originally specified recipients | ||
+ | * Delete boolean - should the message be deleted after retrieving | ||
+ | * Ignore boolean - should the message be ignored | ||
+ | * Reason string - text string to use if a reason is needed for the action | ||
+ | * Recipients table - table containing new/ | ||
+ | * HeaderModifiers table - list of message header modifications to make | ||
+ | * <message MIME structure> | ||
+ | * Path string - the IMAP style path to the message section | ||
+ | * ContentType string - the main content type (eg ' | ||
+ | * ContentSubtype string - the content subtype (eg ' | ||
+ | * ContentTypeFilename string - the filename from the ContentType header | ||
+ | * ContentDisposition string - usually ' | ||
+ | * ContentDispositionFilename string - the filename from the ContentDisposition header | ||
+ | * Start number - the offset from the start of the message where this section starts | ||
+ | * End number - the offset from the start of the message where this section ends | ||
+ | * <message size> is the size of the message in bytes | ||
+ | * < | ||
+ | * MIMESection number - the MIME section that this attachment occurred in | ||
+ | * Name string - the name of the attachment | ||
+ | * MIMEType string - the MIME type of the attachment | ||
+ | * Size number - the size of the attachment | ||
+ | * Type string - the type of attachment (MIME, UUE, BINHEX, MIMEUUE, MIMEBINHEX, TNEF) | ||
+ | |||
+ | This function should return <new actions table>, <results string> | ||
+ | |||
+ | In this function the [[lua_scripting# | ||