User Tools

Site Tools


reference:signature_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:signature_script [2014/05/07 15:06] paulreference:signature_script [2018/11/14 10:45] (current) – external edit 127.0.0.1
Line 3: Line 3:
 If you want more complex signatures on outgoing emails, rather than the static text/HTML you can define within VPOP3, then you can use a simple Lua script to define the signature. If you want more complex signatures on outgoing emails, rather than the static text/HTML you can define within VPOP3, then you can use a simple Lua script to define the signature.
  
-The Lua script is stored in a file called **signature.lua** in the VPOP3 directory. VPOP3 calls a function called **GetSignature** which should have the following prototype:+The Lua script is stored in a file called **signature.lua** in the VPOP3 directory in VPOP3 v6.6 and earlier, or managed through the Settings → Scripts page in VPOP3 v6.7 and later. 
 + 
 +VPOP3 calls a function called **GetSignature** which should have the following prototype:
  
   GetSignature(<format>, <authenticated sender>, <sender email address>)   GetSignature(<format>, <authenticated sender>, <sender email address>)
Line 17: Line 19:
   GetSignature(<format>, <authenticated sender>, <sender email address>, <subject>, <LDAP Data>)   GetSignature(<format>, <authenticated sender>, <sender email address>, <subject>, <LDAP Data>)
  
-The LDAP data table is a table of tables which consists of a table where the index is the LDAP attribute name (in upper case), and the data is a table with numeric indices starting from 1, where the data is the LDAP attribute value, so you could have, for instance, LDAP["CN"][1] = "Fred Bloggs". This is because it is allowed to have duplicate LDAP attributes, so all the CN attributes are put into a single table, etc.+The LDAP data table is a table of tables which consists of a table where the index is the LDAP attribute name (in upper case), and the data is a table with numeric indices starting from 1, where the data is the LDAP attribute value, so you could have, for instance, %%LDAP["CN"][1] = "Fred Bloggs"%%. This is because it is allowed to have duplicate LDAP attributes, so all the CN attributes are put into a single table, etc.
  
 This function should return a string which tells VPOP3 which signature to use (if there isn't a return value, VPOP3 will use the signature configured in VPOP3). This function should return a string which tells VPOP3 which signature to use (if there isn't a return value, VPOP3 will use the signature configured in VPOP3).
reference/signature_script.1399471607.txt.gz · Last modified: 2018/11/14 10:44 (external edit)