powermail-discuss Digest #2623 - Tuesday, May 1, 2007

  Re: Applescript not triggering, WAS Attachment link failing
          by "cheshirekat" <[EMAIL PROTECTED]>
  Re: Applescript not triggering, WAS Attachment link failing
          by "Rick Lecoat" <[EMAIL PROTECTED]>
  Re: Applescript not triggering, WAS Attachment link failing
          by "PowerMail Engineering" <[EMAIL PROTECTED]>
  Re: Applescript not triggering, WAS Attachment link failing
          by "Rick Lecoat" <[EMAIL PROTECTED]>


----------------------------------------------------------------------

Subject: Re: Applescript not triggering, WAS Attachment link failing
From: "cheshirekat" <[EMAIL PROTECTED]>
Date: Mon, 30 Apr 2007 12:16:27 -0600

On Mon, Apr 30, 20074:26 PM, the following words from Rick Lecoat
[EMAIL PROTECTED], emerged from a plethora of SPAM ...

>It's a puzzler, no doubt about it.
>I've tried both my earlier script and the one you kindly supplied,
>putting each at the top of the filter list with the settings that you
>specified. I also tried each one with the following:
>
>Act on: Incoming mail
>Condition = attachment size > 0k
>Action = execute Applescript
>[DO pass this message to subsequent filters].
>
>Act on: Incoming mail
>Condition = Always
>Action = execute Applescript
>[DO pass this message to subsequent filters].
>
>(Actually I had never noticed the Applescript option as a filter
>*condition* before. How does that work? I mean, how is 'Applescript' a
>true or false condition?)
>
>In each case, I got the same result: if I *deactivated* the filters
>further down the list that move the attachment into a folder other than
>the default attachment folder, then both the scripts would run fine. But
>if any filters further down the list *did* move the attachment then the
>scripts would fail (silently).
>
>CheshireKat, did any of your subsequent filters *move* the attachments
>that the script was acting upon? If they did and the script still runs
>okay then there may be something specific to my setup.
>
>I think that some clarification from CTM would be useful here, because
>it would appear that we (the users) are misunderstanding the way
>Applescript and PM interact in this instance.
>
>Rick
>--
>G5 2GHz x2  ::  2GB RAM  ::  10.4.7  ::  PM 5.5.2  ::  3 pane mode
>
>--
>Original message:
>Received from cheshirekat on 27/4/07 at 05:07
>
>>I don't know what else to suggest to you. I have been testing the script
>>I sent for several days. I haven't had any problems and the few files I
>>have received have the appropriate text in the comments. The other
>>filters continue to work on messages that have attachments.
>>
>>I placed the filter at the very top of my filter lists - before all
>>other filters with the below criteria.
>>    Condition - AppleScript/Mark Attachment Comments
>>    Filter incoming messages - checked
>>    Actions - no action
>>    Don't apply subsequent filters to this message - UNchecked
>>
>>I'm using PowerMail version 5.5.3 build 4480 English (intel)
>
Well, are you really using PM version 5.5.2 instead of 5.5.3? (I don't
know that would cause problems for scripts in filters, but you never
know.) Is there a reason you haven't upgraded?

Do your filters that move attachments, move the attachments to a
different volume, drive or external drive? My scripts that act on
attachments always move the attached files. If it's spam, it is moved to
the trash. If it's attached from a mailing list, it goes in the trash,
if it's from certain people who like to continually forward garbage, it
goes in the trash. But the ones that get moved to another folder, same
volume/drive instead of the trash aren't bothered by the script either.
I haven't tried to move them to another volume/drive because I can see a
potential for a problem with slower drives. I would not attempt it on my
slow PowerBook with USB 1.1 and 4500 rpm nearly full drives, unless I
wanted email retrievals to be nearly an all day event.

Your G5 should process the scripts quickly so I wouldn't imagine there
would be a bottleneck in timing conflicts with the filters. It isn't a
very lengthy script after all. PowerMail is so fast retrieving email
that it almost seems that it couldn't possibly be filtering the messages
(I have many many filters!) but I'd have major troubles with my email if
filters weren't working. At least on my new Mac Pro - the old PowerBook
was a different story. But I did check each time that my attachment
script worked and that attachments were moved by other filters. I even
sent attachments to myself from other email accounts when testing.

Both scripts, as far as I can tell, tested for the existence of
attachments for each message, so there would be no need for a filter
that calls the AppleScript to test for the existence of attachments as
well.  At least, that makes sense to me, but I don't know anything
absolute when it comes to scripts in PM's filters. Actually, I only
skimmed the other script because I knew I had one similar.

How often do you check your email? Are you having to filter a ton of
messages at once, or frequent checks, so there are only a few messages
retrieved with each check?

Do you have any other scripts running in filters? Are you using SpamSieve?

What about permissions? Did you check permissions on the folders your
attachments get moved to? No. that couldn't be the problem, else the
attachments wouldn't get moved whether or not the script was used. Where
in the hierarchy did you place the script in the script folder? I put
mine in a subfolder within the "Apply To Selected Messages" folder.

We have a home network. I can try the script on my PowerBook, assuming I
don't have to shut down my Mac Pro because of licensing with two copies
of PowerMail. I've had problems with other apps that don't like the same
serial number on more than one computer on the network, so I avoid using
my PB for anything internet related. (I try to abide by license
agreements, but it takes a while to make sure everything transfers okay
moving to a new computer.) But, I'm curious, so I might shut things down
later and see what happens with the script on the PB.

Well, my husband just brought me a beer, so I probably won't make sense
shortly and I can't think of anything else to suggest or ponder. We've
been fighting a nasty flu for several weeks so I'm in the mood for a
beer, even though I don't normally drink beer. (Tastes horrible if it
isn't a hearty stout.) It's not yet noon here, but hopefully the beer
will last long enough for me to play one of the games I bought to enjoy
the fast new Mac with. Well, it wasn't yet noon when I started drinking. ;-)

--
Music, like religion, unconditionally brings in its train all the moral
virtues to the heart it enters, even though that heart is not in the
least worthy.
-  Jean Baptiste Montegut

* MAC PRO 2 GHz Quad Xeon * OS X 10.4.9 * 3 GB RAM *


----------------------------------------------------------------------

Subject: Re: Applescript not triggering, WAS Attachment link failing
From: "Rick Lecoat" <[EMAIL PROTECTED]>
Date: Mon, 30 Apr 2007 22:30:34 +0100

>Well, are you really using PM version 5.5.2 instead of 5.5.3? (I don't
>know that would cause problems for scripts in filters, but you never
>know.) Is there a reason you haven't upgraded?

Laziness combined with no pressing need. I might update PM just to see
if it makes a difference with this script issue but I don't see that it would.

To answer some of your questions, then...

1. Attachments that get moved remain on the same volume -- just a couple
of folders away from the default attachment folder.

2. Mail is checked frequently, about every 5 minutes, so the build-up is
never huge, even on very spammy days.

3. I guess I use a condition to check for the presence of an attachment
because if that determination is left to the Applescript then the script
has to run for EVERY mail received, which seems like waste of processor
overheads. PM can probably do that part of the process more efficiently
internally than by calling a 3rd party script, and only involve the
script if there is something for it to work on.

4. Yes I'm using Spamsieve, but I have no other Applescripts running via
filters.

5. The script is in the Custom Scripts folder, which has no child
folders. But the script location presumably is not a problem since it
runs okay as long as no *other* filters move the attachment. That is the
key factor.

6. I did in fact check permissions on all my attachment folders (default
and client-specific). Permissions looked okay to me.

I agree that my Mac should be more than speedy enough for this humble
task, so I think some factor other than speed or bottlenecks must be in
play. At this point I've got nothing more to add to the enigma, however.

Hope the beer was good.
Rick

--
G5 2GHz x2  ::  2GB RAM  ::  10.4.7  ::  PM 5.5.2  ::  3 pane mode

--
Original message:
Received from cheshirekat on 30/4/07 at 19:16

>Do your filters that move attachments, move the attachments to a
>different volume, drive or external drive? My scripts that act on
>attachments always move the attached files. If it's spam, it is moved to
>the trash. If it's attached from a mailing list, it goes in the trash,
>if it's from certain people who like to continually forward garbage, it
>goes in the trash. But the ones that get moved to another folder, same
>volume/drive instead of the trash aren't bothered by the script either.
>I haven't tried to move them to another volume/drive because I can see a
>potential for a problem with slower drives. I would not attempt it on my
>slow PowerBook with USB 1.1 and 4500 rpm nearly full drives, unless I
>wanted email retrievals to be nearly an all day event.
>
>Your G5 should process the scripts quickly so I wouldn't imagine there
>would be a bottleneck in timing conflicts with the filters. It isn't a
>very lengthy script after all. PowerMail is so fast retrieving email
>that it almost seems that it couldn't possibly be filtering the messages
>(I have many many filters!) but I'd have major troubles with my email if
>filters weren't working. At least on my new Mac Pro - the old PowerBook
>was a different story. But I did check each time that my attachment
>script worked and that attachments were moved by other filters. I even
>sent attachments to myself from other email accounts when testing.
>
>Both scripts, as far as I can tell, tested for the existence of
>attachments for each message, so there would be no need for a filter
>that calls the AppleScript to test for the existence of attachments as
>well.  At least, that makes sense to me, but I don't know anything
>absolute when it comes to scripts in PM's filters. Actually, I only
>skimmed the other script because I knew I had one similar.
>
>How often do you check your email? Are you having to filter a ton of
>messages at once, or frequent checks, so there are only a few messages
>retrieved with each check?
>
>Do you have any other scripts running in filters? Are you using SpamSieve?
>
>What about permissions? Did you check permissions on the folders your
>attachments get moved to? No. that couldn't be the problem, else the
>attachments wouldn't get moved whether or not the script was used. Where
>in the hierarchy did you place the script in the script folder? I put
>mine in a subfolder within the "Apply To Selected Messages" folder.
>
>We have a home network. I can try the script on my PowerBook, assuming I
>don't have to shut down my Mac Pro because of licensing with two copies
>of PowerMail. I've had problems with other apps that don't like the same
>serial number on more than one computer on the network, so I avoid using
>my PB for anything internet related. (I try to abide by license
>agreements, but it takes a while to make sure everything transfers okay
>moving to a new computer.) But, I'm curious, so I might shut things down
>later and see what happens with the script on the PB.
>
>Well, my husband just brought me a beer, so I probably won't make sense
>shortly and I can't think of anything else to suggest or ponder. We've
>been fighting a nasty flu for several weeks so I'm in the mood for a
>beer, even though I don't normally drink beer. (Tastes horrible if it
>isn't a hearty stout.) It's not yet noon here, but hopefully the beer
>will last long enough for me to play one of the games I bought to enjoy
>the fast new Mac with. Well, it wasn't yet noon when I started drinking. ;-)
>
>--
>Music, like religion, unconditionally brings in its train all the moral
>virtues to the heart it enters, even though that heart is not in the
>least worthy.
>-  Jean Baptiste Montegut


----------------------------------------------------------------------

Subject: Re: Applescript not triggering, WAS Attachment link failing
From: "PowerMail Engineering" <[EMAIL PROTECTED]>
Date: Tue, 1 May 2007 12:23:58 +0200

Rick Lecoat wrote:

>(Actually I had never noticed the Applescript option as a filter
>*condition* before. How does that work? I mean, how is 'Applescript' a
>true or false condition?)

"set filter criterion result to true" will set the result of the
AppleScript condition.

>In each case, I got the same result: if I *deactivated* the filters
>further down the list that move the attachment into a folder other than
>the default attachment folder, then both the scripts would run fine. But
>if any filters further down the list *did* move the attachment then the
>scripts would fail (silently).

The "Move attachment" filter action erases the Finder comments (it seems
to be a Mac OS bug).
And if a filter moves the attachments, the following filters will have
trouble to find them to add Finder comments (this one is a PowerMail bug
that I will try to fix).

A probable workaround would be to use an AppleScript, in place of the
built-in filter action, to move the attachments to another folder; and
to execute this filter *after* the filter that sets the Finder comments.


Jérôme - CTM Engineering


---------------------------------------------------------------------
   "FoxTrot is enormously superior to Spotlight. (...) Much more efficient
    than Spotlight in narrowing down search results to highlight just the
    ones you want. (...) Absolutely first class product."
  FoxTrot Personal Search user comment on www.versiontracker.com


         Download a demo version from www.foxtrot.ch
---------------------------------------------------------------------


----------------------------------------------------------------------

Subject: Re: Applescript not triggering, WAS Attachment link failing
From: "Rick Lecoat" <[EMAIL PROTECTED]>
Date: Tue, 1 May 2007 15:00:24 +0100

Original message:
Received from PowerMail Engineering on 1/5/07 at 11:23

>"set filter criterion result to true" will set the result of the
>AppleScript condition.

"set filter criterion result to true" being a line in the Applescript,
presumably? (Sorry if that's really stupid-sounding, but I don't know my
Applescript from my elbow).

>The "Move attachment" filter action erases the Finder comments (it seems
>to be a Mac OS bug).
>And if a filter moves the attachments, the following filters will have
>trouble to find them to add Finder comments (this one is a PowerMail bug
>that I will try to fix).
>
>A probable workaround would be to use an AppleScript, in place of the
>built-in filter action, to move the attachments to another folder; and
>to execute this filter *after* the filter that sets the Finder comments.

A-ha, now THAT'S the kind of hard and fast information that I was
looking for. Of course, I need to know how to write an Applescript to
move a message to a specific folder, which I don't. (See my
parenthesised comment above). Any volunteers?

The Mac OS bug is particularly annoying, though, because it implies
that, even if the PM bug is fixed, the Tag with Comments script-filter
will need to come *below* the filters that move the attachment to the
required folder. Whereas of course the Tagging filter should really come
as high up the filter list as practical so as to act on ALL attachments.
The further down the list it comes, the more chance there is for a
higher-up filter to stop the filter cascade (if that's the right term)
with a 'Do not apply subsequent filters...' action.

But here's a thought (one which may be complete nonsense, for which I
again draw your attention to my disclaimer re. my scripting skills):Can
a script be set as a folder action and still link to PM via the PM
Applescript dictionary? In other words, could the attachment be moved
via a regular (non-script) PM filter and the *destination folder* be set
up with a tagging Folder Action script that adds the info into the
comments field?

Or is the link to PM broken if the script is not run from *within* PM?

Am I way off base here?
Rick

--
G5 2GHz x2  ::  2GB RAM  ::  10.4.7  ::  PM 5.5.2  ::  3 pane mode

--

>
>
>Jérôme - CTM Engineering


----------------------------------------------------------------------
End of powermail-discuss Digest

  • powermail-discuss Digest #2623 - 05/01/07 PowerMail discussions

Reply via email to