Catching Viruses

PureMessage is commonly used to protect an enterprise from viruses. Use the following code to create a rule that quarantines messages containing viruses and informs the recipients:

if pmx_virus {
    pmx_file "Virus";
    pmx_virus_clean "cantclean.tmpl";
    pmx_replace_header "Subject" "[PMX:VIRUS] %%SUBJECT%%";

Although this rule copies the message to PureMessage’s quarantine, it does not block delivery of the message. Instead, it attempts to clean the virus-laden message. If the message was successfully cleaned, the message continues on to its original recipients. If the virus cannot be cleaned, the infected part is replaced with the error template cantclean.tmpl. The Subject is marked so recipients can plainly see that PureMessage found a virus. The cantclean.tmpl is the default template. You can create your own template based on it.