User Tools

Site Tools


reference:lua_smtp_mx_control

This is an old revision of the document!


Lua SMTP MX Control

Every time VPOP3 is going to send messages using direct MX sending, it runs a script called mxout.lua in the VPOP3 directory.

Messages to be sent

For every message which is to be sent VPOP3 calls a function in that script called CheckFile.

The function signature is: CheckFile(Filename, Actions, Size, CreationTime, Retries, LastTryTime, ReturnPath, Recipients, HeaderData, HeaderLines)

  • Filename - the filename on disk
  • Actions - An object containing the values: ForceLastTry, SkipSend, Reason, Priority - see below
  • Size - The size of the message on disk
  • CreationTime - The time the message was put in the outgoing queue - as YYYYMMDDHHMMSS
  • Retries - The number of times VPOP3 has tried to send the message so far
  • LastTryTime - The time the message was last attempted - as YYYYMMDDHHMMSS
  • ReturnPath - The message sender/return path value
  • Recipients - A table containing a list of recipients
  • HeaderData - The header information as an associative table - eg HeaderData['Subject'] = <message subject>
  • HeaderLines - A list of the message header lines in raw form

The function returns an Actions object saying what to do with the message. If nothing else, the function should return the Actions parameter.

The Actions object contain four values:

  • ForceLastTry - if this is true, then this attempt of the message will be the last time. If false, then the retry scheme will progress as normal. 'SkipSend' must be false for this to take effect.
  • SkipSend - if this is true then the message won't be sent this time. If 'false', then the message will be sent as normal.
  • Priority - this indicates what order the messages should be sent in. 50 is the default. Priority 100 go first, priority 1 go last.
  • Reason - this is logged as the reason if the SkipSend value is true.
reference/lua_smtp_mx_control.1402396253.txt.gz · Last modified: 2018/11/14 10:44 (external edit)