Kevin D. Clark | 1 Apr 01:06 2006

Re: Pruning e-mail attachments.


Ken D'Ambrosio writes:

> Hello, all -- first and foremost, I'm pleased to announce the birth of
> Isabella Francesca D'Ambrosio -- for those with places in their hearts
> for baby pics, have at: http://flyingtoasters.net/gallery/album26?page=4
> .  Now that the birth done with, I hope to be able to make impending
> meetings again (what with all my new-found spare time </sarcasm>).

[congratulations email sent seperately  (-: ]

> And now for the actual on-topic stuff: I've got a Blackberry user who
> gets inbound e-mail bounced from time to time because of large
> attachments.  Since I route all his e-mail both to his IMAP account and
> the Blackberry, there's no reason I couldn't strip off the attachments
> -- *IF* I knew what it was that designated the start of an attachment. 
> Upon looking at the raw text of a message, I remain somewhat ignorant. 
> While I'm somewhat tempted to delve into the RFC's, if there's a
> quick-n-dirty way to find out where to start stripping off text, I'd
> appreciate being told about it.

Download the Perl MIME::Tools library.

Look in the examples directory.  There's a little program here called
"mimeexplode".

Run the specified email through mimeexplode.  If any of the
attachments that are dumped out are >N, where N is the max size of
messages that don't get bounced, then cobble together a new message
from the smaller attachments and send this instead, adding a note to
(Continue reading)

Ben Scott | 1 Apr 01:13 2006
Picon

Re: Pruning e-mail attachments.

On 3/31/06, Ken D'Ambrosio <ken@...> wrote:
> Hello, all -- first and foremost, I'm pleased to announce the birth of
> Isabella Francesca D'Ambrosio

  Congratulamations!

> Now that the birth done with, I hope to be able to make impending
> meetings again (what with all my new-found spare time </sarcasm>).

  BWAAHAHAHAHAAH!!!

> Since I route all his e-mail both to his IMAP account and
> the Blackberry, there's no reason I couldn't strip off the attachments
> -- *IF* I knew what it was that designated the start of an attachment.

  Google for MIMEdefang.

-- Ben
Brian | 1 Apr 02:54 2006
Picon

RE: Pruning e-mail attachments.

Congratulations on increasing the local population density just a bit in
favor of the smart people :)

As for the attachments, ISTR when I was mucking around with something mildly
related a few years back you could grep for something like "multipart
boundary" in the headers.  This identifies a random-ish string that
separates the text part of the message from the non-text (HTML and/or
attachments).  Not sure if you want to strip HTML as well, but I think if
you look around in that fashion you could write a quick and dirty attachment
stripper.  Just make sure to stuff a dollar it the g-string if it works... 

> -----Original Message-----
> Hello, all -- first and foremost, I'm pleased to announce the 
> birth of Isabella Francesca D'Ambrosio -- for those with 
> places in their hearts for baby pics, have at: 
> http://flyingtoasters.net/gallery/album26?page=4
> .  Now that the birth done with, I hope to be able to make 
> impending meetings again (what with all my new-found spare 
> time </sarcasm>).
> 
> And now for the actual on-topic stuff: I've got a Blackberry 
> user who gets inbound e-mail bounced from time to time 
> because of large attachments.  Since I route all his e-mail 
> both to his IMAP account and the Blackberry, there's no 
> reason I couldn't strip off the attachments
> -- *IF* I knew what it was that designated the start of an 
> attachment. 
> Upon looking at the raw text of a message, I remain somewhat 
> ignorant. 
> While I'm somewhat tempted to delve into the RFC's, if 
(Continue reading)

Ben Scott | 1 Apr 03:32 2006
Picon

Re: Pruning e-mail attachments.

On 3/31/06, Brian <gnhlug@...> wrote:
> As for the attachments, ISTR when I was mucking around with something mildly
> related a few years back you could grep for something like "multipart
> boundary" in the headers.

  Be warned that MIME, like a lot of Internet standards, has a number
of features that don't always get invoked.  A quick-and-dirty hack
based on looking at a couple of messages may cause grief when it
encounters mail from someone else's mailer.  Finagle's Law says that
message will be a really important one.

-- Ben
Jason Stephenson | 1 Apr 04:00 2006

Re: perl and network addresses

Stephen Ryan wrote:

>>Can anyone think of a better way to blit an arbitrary number of bits 
>>from 0 to 1?
> 
> 
> Well, let's see....
> 
> Taking advantage of the fact that all of the '1' bits are at the end of
> the hostmask, you've actually almost gotten it already.
> 
> hostmask = (1 << (32 - n)) - 1
> netmask = ~ hostmask

Doh! That's so obvious, so obviously, I overlooked it. ;)

> 
> 1 << (32 - n) in binary is (n-1) '0' bits, a '1', then (32 - n) '0'
> bits.  Subtracting 1 from that gives n '0' bits followed by (32 - n) '1'
> bits.  The 'not' operator flips all the bits for the netmask.
> 
> This works for /1 through /32 networks, even though some of those are
> nonsensical.  A /0 might break this because of overflow (1 << (32 -n)
> overflows a 32-bit integer); theoretically, it should work even for /0
> so long as 1 << (32-n) returns 0 (32-bit gcc 4.0 on my Athlon64 desktop
> computes this correctly, but complains 'warning: left shift count >=
> width of type' while compiling.  Anyway, if you're running a /0, you've
> got other, bigger problems.

Using gcc 3.4.4 on a 32-bit Pentium III, I get no warnings when 
(Continue reading)

Brian | 1 Apr 04:03 2006
Picon

RE: Pruning e-mail attachments.

Brian's Law says someone will always get paranoid about something clearly
presented as a use-at-your-own risk solution.

LOL. 

> -----Original Message-----
>   Be warned that MIME, like a lot of Internet standards, has 
> a number of features that don't always get invoked.  A 
> quick-and-dirty hack based on looking at a couple of messages 
> may cause grief when it encounters mail from someone else's 
> mailer.  Finagle's Law says that message will be a really 
> important one.
> 
Stephen Ryan | 1 Apr 04:46 2006

Re: perl and network addresses

On Fri, 2006-03-31 at 21:00 -0500, Jason Stephenson wrote:
> Stephen Ryan wrote:
> > hostmask = (1 << (32 - n)) - 1
> > netmask = ~ hostmask
> 
> Doh! That's so obvious, so obviously, I overlooked it. ;)

Well, yes, of course :-)

> > 
> > 1 << (32 - n) in binary is (n-1) '0' bits, a '1', then (32 - n) '0'
> > bits.  Subtracting 1 from that gives n '0' bits followed by (32 - n) '1'
> > bits.  The 'not' operator flips all the bits for the netmask.
> > 
> > This works for /1 through /32 networks, even though some of those are
> > nonsensical.  A /0 might break this because of overflow (1 << (32 -n)
> > overflows a 32-bit integer); theoretically, it should work even for /0
> > so long as 1 << (32-n) returns 0 (32-bit gcc 4.0 on my Athlon64 desktop
> > computes this correctly, but complains 'warning: left shift count >=
> > width of type' while compiling.  Anyway, if you're running a /0, you've
> > got other, bigger problems.
> 
> Using gcc 3.4.4 on a 32-bit Pentium III, I get no warnings when 
> compiling your test program, even with -Wall. When it runs, 0 gives the 
> same result as 32, so it overflows (silently) on my machine.

Ooh, here's something interesting.  I first tried a test with constants,
and got the warning: left shift count >= width of type" out of gcc.
Then I rewrote the thing to use a loop, and I got correct results out of
it.  (This is all on an Athlon64X2.)
(Continue reading)

Ted Roche | 1 Apr 21:30 2006

Re: Reminder: LinuxWorld next week

Peter Mui of the USENIX Association replied:

I saw your posting to GNHLUG: could you please mention to the mailing  
list that USENIX will be at Booth 937 at LinuxWorld next week?  We'll  
have a prize wheel for people to spin to win lots of great (well,  
fair) prizes.

Tell 'em Peter sent you: also: we're having our Annual Technical  
Conference in Boston May 30- June 2: pick up some full-color flyers  
at our booth to distribute at your next meeting.

Cheers, -Peter

Peter Mui
USENIX Association
Steven W. Orr | 2 Apr 05:03 2006
Picon

Anyone know anything about tvcentral?

Every so often I screw up and miss a show that I wanted to tape. I found 
something called tvcentral that allows you to download any tv show for 
annual fee. Anyone have any experience with it and whether it's usable 
with linux?

I missed smallville last week :-(

TIA

--

-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net
Neil Joseph Schelly | 2 Apr 05:12 2006

Re: Anyone know anything about tvcentral?

If I miss a show for one reason or another, I find it on a BitTorrent site.  
Search for the episode title and the word bittorrent in Google and you'll 
find it.  It's not often Myth misses a show, but I've had it record at least 
a few times a show I really want to see that comes on after a sports event or 
something that ran over.  The show starts 15 minutes late and naturally my 
recording ends before the end of the show.

Anyway, it's always worked for me.
-N

On Saturday 01 April 2006 10:03 pm, Steven W. Orr wrote:
> Every so often I screw up and miss a show that I wanted to tape. I found
> something called tvcentral that allows you to download any tv show for
> annual fee. Anyone have any experience with it and whether it's usable
> with linux?
>
> I missed smallville last week :-(
>
> TIA

Gmane