Use clamXav shell script with Thunderbird?

I downloaded this program, and one applescript called "clamAVscan-1.0 which is supposed to filter e-mails.
That script seems to be a shell script. In all cases ivolving the Terminal the slightest misspelling can create serious problems, so I would rather not modify any part of it unless I can be sure that I am doing it right.

That script seems to be for the application “Mail” (which I think is the one that comes with Tiger) But I use Thunderbird. Can I simply replace the word “Mail” by “Thunderbird” , or “Mozilla Thunderbird”? or is there more to modify?
Also, I did not fully understand where the script should reside.

I copy below the full text of the script. If some Applescript veteran could be kind enough to check it and advise.

using terms from application "Mail"
	on perform mail action with messages theMessages for rule theRule
		tell application "Mail"
			repeat with thisMessage in theMessages
				set msgSource to source of thisMessage
				try
					do shell script "echo " & quoted form of msgSource & "| /usr/local/clamXav/bin/clamscan --quiet --stdout -"
				on error errMsg number exitCode
					if (exitCode = 1) then
						set currentSubject to subject of thisMessage
						set subject of thisMessage to "***INFECTED*** " & currentSubject
						set junk mail status of thisMessage to true
						set accountName to name of account of mailbox of thisMessage
						set mailbox of thisMessage to mailbox "Junk" of account accountName
					else
						display dialog "Something unexpected has happened to clamAV scan: Exit Code =  " & exitCode
						display dialog "Error Message:" & errMsg
					end if
				end try
			end repeat
		end tell
	end perform mail action with messages
end using terms from

I must point out that there is a typo in the introduction: “speed verus complexity” instead of “versus” That’s not a good omen!