(Added in v7.6)
This script has functions to allow message attachments to be altered:
function NeedsRecode(filtervariables, attachments_array, mime_structure)
Called when VPOP3 is about to process a message
function NeedsRewrite(attachmentname, MIMEtype, filtervariables)
Called when VPOP3 is about to process an attachment in a message (Only called if 'NeedsRecode' returned true, or there is some other reason for VPOP3 to process attachments, eg to remove/rename an attachment due to Attachment Filtering)
function GetRename(type, attachmentName, MIMEtype, filterVariables)
function GetContentDispositionLine(originalContentDispositionLine, type, attachmentName, rewriteSection, MIMEtype, filterVariables)
function IsLockNeeded(originalFileName, newFileName, originalAttachmentName, MIMEtype)
function RewriteAttachment(originalFileName, newFileName, originalAttachmentName, MIMEtype, filterVariables)
Called to give the script a chance to rewrite the attachment. The original attachment is stored in the file 'originalFileName'. The script should write the new attachment to 'newFileName'.
Note that whether or not this function alters the attachment, the attachment data in the message is rewritten using Base64 encoding, so if the original attachment was stored using a different encoding (eg Quoted-Printable) then the message will be changed. 'NeedsRewrite' should return False if you want the message to stay unaltered.