Hi everyone,
here is a little script I have been testing. It will enable you to create a text file of e-mail address's which you would like to intercept and modify the to address.
function Start()
print("Lua SMTPSVR.LUA starting v2")
end
function ProcessMessage(MailFrom,Subject,RecipientList,Actions,Mime,MessageSize,Attachments)
local InterceptList
local FindPos
print "\nProcess Message"
print ("Subject = ", Subject)
print ("Mail From = ", MailFrom)
io.input("InterceptList.txt")
InterceptList = io.read("*all")
InterceptList = string.lower(InterceptList)
MailFrom = string.lower(MailFrom)
print ("Intercept List",InterceptList)
FindPos = string.find(InterceptList,MailFrom)
print ("FindPos = ",FindPos)
if FindPos == nil then
print "no match"
else
print "match"
Actions.SendToOriginalRecipients = false;
Actions.Recipients[1] = "sales"
return Actions, "250 Probs"
end
end
create a text file called "InterceptList.txt" and put it in the VPOP3 directory. If an e-mail arrives from an address in the list, it will be directed to another address, in this code its
sales@...Hope this is useful!
Jon