Online VPOP3 Help File
PSCS Knowledgebase
Main > VPOP3 & VPOP3 Enterprise
Minimize Text   Default    Enlarge Text

Having different VPOP3 signatures depending on the email address of the sender

In VPOP3 2.4 and later, you can use a piece of simple scripting to have VPOP3 generate different signatures based on the sender's email address.

Whenever a local user sends a message, VPOP3 tries to load a file 'signature.lua' in the VPOP3 directory. This file should contain a short program in the Lua programming language.

VPOP3 calls a function in the signature.lua file called 'GetSignature' which should have the following prototype:

GetSignature(<format>, <authenticated sender>, <sender email address>)

(where '<format>' is either "HTML" or "PLAIN")

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).

A simple example would be:

function GetSignature(Type, AuthSender, Sender)

 if string.find(Sender, "@domain1%.com$") then

  if Type == "PLAIN" then
   return "This is the signature for domain1"
  else
   return "<p>This is the HTML signature for domain1</p>"
  end

 elseif string.find(Sender, "@domain2%.com$") then

  if Type == "PLAIN" then
   return "This is the signature for domain2"
  else
   return "<p>This is the HTML signature for domain2</p>"
  end
 end
end

If you need, we can produce a script for you, but there would be a cost for this - contact support@pscs.co.uk with a specification for a quote. (The price is usually £50 + VAT for a simple case with 2 or 3 signatures which are fixed depending on the sender. If you want signatures which vary (eg contain the date/time) or more different signatures, or reading signatures from a file, then we would need to know the exact specification to be able to give you a quote.




Related Articles
Adding a disclaimer to the footer of outgoing messages
In VPOP3 2.2 and later If you want to add a fixed disclaimer to the bottom of every outgoing messag
Example spam filter script to redirect messages
The VPOP3 spam filter scripting language (in VPOP3 2.2.0 or later) can be used for many tasks as wel
SMTP Error 554
As of the time of writing, VPOP3 never generates an SMTP error 554. If you are getting an error mess