GrowlMail makes unnecessary connections.

The Growl forums have moved to Google Groups, this forum is read only.
Locked
User avatar
Chris Cogdon
Harmless
Posts: 7
Joined: Tue Oct 13, 2009 11:44 pm

GrowlMail makes unnecessary connections.

Post by Chris Cogdon »

Hello!

I'm using LittleSnitch to inform me when any program tries to make unexpected outbound connections. It's informing me that Mail.app (likely actually growlmail) is attempting to contact external web sites to "load images" even though a) I've told Mail.app to not load images automatically, and b) growl messaging doesn't need to load images anyway.

If I disable growlmail, I don't get the alerts from Little Snitch, so I know it's growlmail, or whatever growlmail does to get the message, that's causing the attempted connection.

Know of anything I can do to prevent it making these unnecessary connections?

To me, this sounds like a by-product of whatever it is that growlmail does to get the mail content, and I hope there's a way it can be done without making those connections.



Ps: I know this is my first post: my apologies for "registering to complain" :)
User avatar
boredzo
Cocoaforge Admin
Posts: 796
Joined: Mon Dec 06, 2004 7:49 am
Contact:

Re: GrowlMail makes unnecessary connections.

Post by boredzo »

Chris Cogdon wrote:To me, this sounds like a by-product of whatever it is that growlmail does to get the mail content, …
Exactly correct.
… and I hope there's a way it can be done without making those connections.
Not that I know of. We'd love to hear of one, as we want to fix this.
User avatar
Chris Cogdon
Harmless
Posts: 7
Joined: Tue Oct 13, 2009 11:44 pm

Re: GrowlMail makes unnecessary connections.

Post by Chris Cogdon »

Great! I'm glad someone's interested in a solution too! (Much better experience than asking the Colloquy people to add a "confirm window close option" :) )

Downloading the source now, I'll see if I can suggest anything.
User avatar
Chris Cogdon
Harmless
Posts: 7
Joined: Tue Oct 13, 2009 11:44 pm

Re: GrowlMail makes unnecessary connections.

Post by Chris Cogdon »

Okay, this is probably not a good application to cut my OS/X programming teeth on; I'm completely lost :)

Can you point out which section of the code is fetching the message from Mail?
User avatar
boredzo
Cocoaforge Admin
Posts: 796
Joined: Mon Dec 06, 2004 7:49 am
Contact:

Re: GrowlMail makes unnecessary connections.

Post by boredzo »

Chris Cogdon wrote:Can you point out which section of the code is fetching the message from Mail?
-[Message(GrowlMail) GMShowNotificationPart1].

When I looked at the code just now, I saw one workaround: Remove the %body keyword from the notification format in GrowlMail's preferences.
User avatar
Chris Cogdon
Harmless
Posts: 7
Joined: Tue Oct 13, 2009 11:44 pm

Re: GrowlMail makes unnecessary connections.

Post by Chris Cogdon »

Curiously, I'm not using "%body". Just %account, %sender and %subject.
User avatar
boredzo
Cocoaforge Admin
Posts: 796
Joined: Mon Dec 06, 2004 7:49 am
Contact:

Re: GrowlMail makes unnecessary connections.

Post by boredzo »

Chris Cogdon wrote:Curiously, I'm not using "%body". Just %account, %sender and %subject.
Incorrect. Put the mouse cursor in the Description field, then press the down arrow. You'll see the second line, with the %body keyword, come into view.

(Yes, this is a problem with the current UI.)
User avatar
Chris Cogdon
Harmless
Posts: 7
Joined: Tue Oct 13, 2009 11:44 pm

Re: GrowlMail makes unnecessary connections.

Post by Chris Cogdon »

Oh! And Lo! I was using %body.

Okay, thank you kindly for that trick! I'll stop looking to see where "self messageBody" might have inadvertently been called.

Now, why that causes the api to go fetch subobjects, I don't know. Do you suspect it might be doing some kind of "fasterfox-style" prefetch on anything the message might be referring to? If so, there may be an attribute somewhere to turn that off.
User avatar
boredzo
Cocoaforge Admin
Posts: 796
Joined: Mon Dec 06, 2004 7:49 am
Contact:

Re: GrowlMail makes unnecessary connections.

Post by boredzo »

Chris Cogdon wrote:Now, why that causes the api to go fetch subobjects, I don't know.
It's because we ask the MessageBody object for the message contents as an attributed string, so it goes and gets all the images to put them into the attributed string as “text attachments” (not necessarily related to email attachments).

A solution would be a way to get plain text, not an attributed string, for the message.
User avatar
Chris Cogdon
Harmless
Posts: 7
Joined: Tue Oct 13, 2009 11:44 pm

Re: GrowlMail makes unnecessary connections.

Post by Chris Cogdon »

deleted my previous response, because it was the dumb :)

Yeah, I can see why you'd want attributedString... helps you strip out all the formatting and mime encoding crap that might be in the message, and get to the meat. Side effect = fetches external images.

The $10,000 question is: what does Mail.App do when "load images" is turned off ? I suspect it just passes the html portion to WebKit and there's some option there to not load external images.

Does an Attributed String give you the option about which multipart/alternative to use?
User avatar
boredzo
Cocoaforge Admin
Posts: 796
Joined: Mon Dec 06, 2004 7:49 am
Contact:

Re: GrowlMail makes unnecessary connections.

Post by boredzo »

Chris Cogdon wrote:Yeah, I can see why you'd want attributedString... helps you strip out all the formatting and mime encoding crap that might be in the message, and get to the meat.
What we want is the string already stripped.
Does an Attributed String give you the option about which multipart/alternative to use?
It's already used, because Mail used it to create the attributed string. Once that string exists, it's too late to choose which alternative Mail used to create it.
User avatar
Chris Cogdon
Harmless
Posts: 7
Joined: Tue Oct 13, 2009 11:44 pm

Re: GrowlMail makes unnecessary connections.

Post by Chris Cogdon »

Sounds like the "ideal" would be to have some control in attributedString to create just the parts you need. That control is, clearly, lacking!

Only thing I can see is to use a general-purpose mime-parsing utility and have it generate the parts you need from (id)rawBody. Not really sure what's available in rawBody, but I'll bet $10.61 it doesn't cause images to be loaded.
User avatar
boredzo
Cocoaforge Admin
Posts: 796
Joined: Mon Dec 06, 2004 7:49 am
Contact:

Re: GrowlMail makes unnecessary connections.

Post by boredzo »

Chris Cogdon wrote:Sounds like the "ideal" would be to have some control in attributedString to create just the parts you need.
No, the ideal would be a way to get just the plain text.

I may have found one. I'm testing it now.
User avatar
boredzo
Cocoaforge Admin
Posts: 796
Joined: Mon Dec 06, 2004 7:49 am
Contact:

Re: GrowlMail makes unnecessary connections.

Post by boredzo »

boredzo wrote:I may have found one. I'm testing it now.
Nope. I figured it was higher-level, not lower-level, and I was right. So that won't work.
Locked