This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| reference:attachment_processing_script [2018/06/28 09:04] – paul | reference:attachment_processing_script [2022/11/24 09:29] (current) – [IsLockNeeded] paul | ||
|---|---|---|---|
| Line 12: | Line 12: | ||
| ====NeedsRecode==== | ====NeedsRecode==== | ||
| - | function NeedsRecode(filtervariables, | + | |
| Called when VPOP3 is about to process a message | Called when VPOP3 is about to process a message | ||
| - | returns | + | * returns |
| ====NeedsRewrite==== | ====NeedsRewrite==== | ||
| - | function NeedsRewrite(attachmentname, | + | |
| Called when VPOP3 is about to process an attachment in a message (Only called if ' | Called when VPOP3 is about to process an attachment in a message (Only called if ' | ||
| - | returns | + | * returns |
| + | |||
| + | ====GetRename==== | ||
| + | function GetRename(type, | ||
| + | |||
| + | * type = MIME or UUENCODE | ||
| + | |||
| + | * returns two values, the first is the new filename, the second is the new MIME type (eg ' | ||
| + | |||
| + | ====GetContentDispositionLine==== | ||
| + | function GetContentDispositionLine(originalContentDispositionLine, | ||
| + | |||
| + | * type = MIME | ||
| + | * rewriteSection = true if the MIME section will be rewritten (eg because of ' | ||
| + | |||
| + | * returns new Content-Disposition MIME header line | ||
| + | |||
| + | ====IsLockNeeded==== | ||
| + | function IsLockNeeded(originalFileName, | ||
| + | |||
| + | * returns True if a critical section is required around the ' | ||
| + | |||
| + | ==RewriteAttachment==== | ||
| + | function RewriteAttachment(originalFileName, | ||
| + | |||
| + | Called to give the script a chance to rewrite the attachment. The original attachment is stored in the file ' | ||
| + | |||
| + | 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. ' | ||
| + | |||
| + | * returns True if the attachment has actually been rewritten. If not, the original one is used. | ||