User Tools

Site Tools


reference:lua_pop3_client_script

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
reference:lua_pop3_client_script [2018/11/14 10:45] – external edit 127.0.0.1reference:lua_pop3_client_script [2023/08/16 08:48] (current) paul
Line 12: Line 12:
   * **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.   * **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.   * **End()** - called at the end of the POP3 session.
 +
 +
 +=====ProcessMessage()=====
 +''ProcessMessage("<mailfrom>", "<subject>", <recipient list>, <current actions>, <message MIME structure>, <message size>, <attachments>)''
 +
 +This function is called by VPOP3 when a message has been received by the SMTP service.
 +
 +  * <mailfrom> is the SMTP 'MAIL FROM' address
 +  * <subject> is the message subject line
 +  * <recipient list> is a table containing a list of the recipient email addresses (from the RCPT TO envelope)
 +  * <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/replacement recipients for the message
 +    * HeaderModifiers table - list of message header modifications to make
 +  * <message MIME structure> is a table with one or more of the following entries
 +    * Path string - the IMAP style path to the message section
 +    * ContentType string - the main content type (eg 'text', 'image' etc)
 +    * ContentSubtype string - the content subtype (eg 'html', 'plain', 'gif', etc)
 +    * ContentTypeFilename string - the filename from the ContentType header
 +    * ContentDisposition string - usually 'inline' or 'attachment' or blank
 +    * 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
 +  * <attachments> is a table with zero or more of the following entries, referring to the attachments in the message
 +    * 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#only_in_pop3cltlua_and_smtpsvrlua_processmessage_function|VPOP3 ProcessMessage helper functions]] can be used.
  
reference/lua_pop3_client_script.1542192349.txt.gz · Last modified: 2018/11/14 10:45 by 127.0.0.1