Extracting Attachments

Ken A ka at pacific.net
Wed Feb 18 15:00:53 GMT 2009

Mark Wold wrote:
> This looks like I may be able to use this to get at my attachments.
> Can anyone tell me this... Are the functions that are in the perl scripts in
> /usr/lib/MailScanner/MailScanner, available to any custom function that I
> place in /usr/lib/MailScanner/MailScanner/CustomFunctions?

No. The Message object is available. It's attributes are listed at the 
top of Message.pm. That said, I'm not an expert on the inner workings of 
MailScanner, so you may have to wait for Julian to get a more complete 


> Thanks again,
> Mark
>  >Mark Wold wrote:
>>> I have a client that wants to email me PDF files so that I can convert
> them
>>> to TIFF images and then forward them along. They want the process to work
>>> 24/7. So instead of having a user who's job it is to grab the attachments
>>> and perform the work, I would like to see if I can get MailScanner to
> watch
>>> for emails coming into a specific user, extract and store the attachments
> to
>>> a predefined directory in the system, and then move on to other messages.
> I
>>> can easily then takes the PDF and perform the conversions and forward it
> on.
>>> Does anyone know if I can do this extracting with MailScanner?
>>> Thanks,
>>> Mark
>> You can do this with a Custom Function.
>> See /usr/lib/MailScanner/>MailScanner/CustomFunctions
>> and see /usr/lib/MailScanner/MailScanner/Message.pm (location on my
>> system may be different than yours)
>> MailScanner does this currently with word docs for example:
>> Message.pm: my @docfiles =
>> MailScanner::Antiword::FindDocFiles($this->{entity});
>> So it should be doable!
>> Ken

More information about the MailScanner mailing list