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
Next revisionBoth sides next revision
reference:lua_smtp_server_script [2017/01/20 11:56] – [SMTP Server Global Variables] paulreference:lua_smtp_server_script [2019/06/05 11:05] – [SMTP Server Global Variables] paul
Line 1: Line 1:
 ======SMTP Server Lua Scripting====== ======SMTP Server Lua Scripting======
  
-The SMTP Server [[http://wiki.pscs.co.uk/reference;lua_scripting|Lua Script]] is called SMTPSVR.LUA and should be placed in the VPOP3 folder. This script is called whenever an instance of the VPOP3 SMTP server is launched - ie whenever someone opens a connection to port 25 on the VPOP3 server to send it a message, whether from a local user or an incoming SMTP message.+The SMTP Server [[http://wiki.pscs.co.uk/reference;lua_scripting|Lua Script]] is called SMTPSVR.LUA and can be edited from the Settings -> Scripts page in the VPOP3 settings. This script is called whenever an instance of the VPOP3 SMTP server is launched - ie whenever someone opens a connection to port 25 on the VPOP3 server to send it a message, whether from a local user or an incoming SMTP message.
  
 Each SMTP server instance has its own instance of the SMTPSVR.LUA script. No threading conflicts will occur. Each SMTP server instance has its own instance of the SMTPSVR.LUA script. No threading conflicts will occur.
Line 59: Line 59:
   * **ServerID** - (IN) - number - ID of SMTP Service in VPOP3   * **ServerID** - (IN) - number - ID of SMTP Service in VPOP3
   * **ServerName** - (IN) - string - name of SMTP Service in VPOP3   * **ServerName** - (IN) - string - name of SMTP Service in VPOP3
 +
 +===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)
 ====In VPOP3 Enterprise Only==== ====In VPOP3 Enterprise Only====
   * **CheckRBL**   * **CheckRBL**
Line 176: Line 180:
 The **<data>** is the raw data after the //MAIL FROM:// command\\ The **<data>** is the raw data after the //MAIL FROM:// command\\
 The **<mailfrom>** is the address after the //MAIL FROM:// command\\ The **<mailfrom>** is the address after the //MAIL FROM:// command\\
-The **<parameters>** is a table of parameters to the //MAIL FROM:// command (if any) with the table entry key being the parameter name and the table entry value being the parameter value+The **<parameters>** is a table of parameters to the //MAIL FROM:// command (if any) with the table entry key being the parameter name and the table entry value being the parameter value\\
 The **<SPF Result>** is the result (pass, fail, softfail, etc) of the SPF check (if any) on the connection (in v5 and later). The **<SPF Result>** is the result (pass, fail, softfail, etc) of the SPF check (if any) on the connection (in v5 and later).
  
Line 245: Line 249:
 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 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.txt · Last modified: 2024/05/01 14:12 by paul