User Tools

Site Tools


reference:lua_smtp_server_script

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
reference:lua_smtp_server_script [2018/09/19 12:33] paulreference:lua_smtp_server_script [2025/05/08 09:23] (current) – [SMTP Server Lua Scripting] paul
Line 10: Line 10:
   * **Start()** - called when the SMTP service session starts up, before the welcome message is sent to the SMTP client   * **Start()** - called when the SMTP service session starts up, before the welcome message is sent to the SMTP client
   * **RBLResults()** - (VPOP3 Enterprise Only) - called after the RBL checks have been performed   * **RBLResults()** - (VPOP3 Enterprise Only) - called after the RBL checks have been performed
 +  * **LoadLimits()** - (v8.7+ Enterprise Only) - called at connection to be able to dynamically alter service load limits
   * **GetMaxMessageSize()** - called at startup, and when the HELO and EHLO commands are received   * **GetMaxMessageSize()** - called at startup, and when the HELO and EHLO commands are received
   * **GetEHLOCapabilities()** - called when the EHLO command is received   * **GetEHLOCapabilities()** - called when the EHLO command is received
Line 67: Line 68:
   * **RBLRejectMessage**   * **RBLRejectMessage**
   * **RBLHeader**   * **RBLHeader**
 +
 +===V7.10 and later===
 +  * **Encryption** - (IN) - boolean - Is the session encrypted
 +  * **EncryptionDetails** - (IN) - string - SSL/TLS version and SSL/TLS cipher being used (if encrypted)
 =====SMTP Server "Start()"===== =====SMTP Server "Start()"=====
 ''Start()'' ''Start()''
Line 223: Line 228:
     * Reason string - text string to use if a reason is needed for the action     * Reason string - text string to use if a reason is needed for the action
     * Recipients table - table containing new/replacement recipients for the message     * Recipients table - table containing new/replacement recipients for the message
-    * HeaderModifiers table - list of message header modifications to make+    * HeaderModifiers table - list of message header modifications to make - each entry is the full header line (eg "From: <user@company.com>")
   * <message MIME structure> is a table with one or more of the following entries   * <message MIME structure> is a table with one or more of the following entries
     * Path string - the IMAP style path to the message section     * Path string - the IMAP style path to the message section
Line 245: Line 250:
 This function should return <new actions table>, <results string> This function should return <new actions table>, <results string>
  
-In this function the VPOP3 ProcessMessage helper functions can be used.+(In version 7.0 and later, the returned 'results string' is ignored) 
 + 
 +In this function the [[lua_scripting#only_in_pop3cltlua_and_smtpsvrlua_processmessage_function|VPOP3 ProcessMessage helper functions]] can be used.
 =====CheckRecipients()===== =====CheckRecipients()=====
 ''CheckRecipients(<Recipient List>, <To Recipients>, <Cc Recipients>, <Bcc Recipients>, "<Sender IP Address>", "<Authenticated Sender>", "<Sender Address>", "Subject", <locally sent>, <message size>'' ''CheckRecipients(<Recipient List>, <To Recipients>, <Cc Recipients>, <Bcc Recipients>, "<Sender IP Address>", "<Authenticated Sender>", "<Sender Address>", "Subject", <locally sent>, <message size>''
reference/lua_smtp_server_script.1537356815.txt.gz · Last modified: 2018/11/14 10:44 (external edit)