[MlMt] Saving any image within a smart mailbox to a local directory

Andrew Thornton andrew.thornton at thorntonindustries.com
Thu Jun 25 16:42:26 EDT 2020


Hi everyone,

I have been trying to make use of a bundle that I found online to save 
image attachments as they come in to a local folder. My version of the 
bundle script I have been trying to use can be found here:

https://github.com/ajt/bundles/tree/master/ATTACHSAVE.mmbundle

I have changed the python script that I am trying to use to download the 
image. It is here:

https://github.com/ajt/bundles/blob/master/ATTACHSAVE.mmbundle/Support/bin/cat.py

I would like to apply a rule to a smart mailbox that will run on any 
unread mail that comes into it. If it has one or more images within it, 
I would like to have this bundle run, and then mark the email as read.

I have tried creating rules that use this bundle with the following 
logic:

“Messsage is not Read”
+
“Content-Type” “is” ”image”

And I have also tried just:

“Attachment-Name” “exists”

I then use the action “Run Command” “ATTACHSAVE”

This is not working. When I attempt to run these rules in the smart 
mailbox, nothing happens, and no logs are generated. That makes me think 
that either my bundle can’t write to the log file, or the rule is not 
getting triggered.

Is there a way I can turn on debugging for this bundle, or for the 
rules, to see what is happening?

Does anyone see a problem with my bundle? I don’t know what the UUID 
or STRING should be in the configuration portions of the file. Is there 
a way to accomplish this automatically without using a bundle?

I appreciate any and all help.

Thanks,

Andrew


More information about the mailmate mailing list