procmail
[Top] [All Lists]

Re: #$%&@ e-mails in html

1998-02-16 23:39:07
-Date: Mon, 16 Feb 1998 21:44:13 -0600 (CST)
-From: Erik Dufek <dufeke(_at_)iscmed(_dot_)med(_dot_)ge(_dot_)com>
-Reply-To: erik(_dot_)dufek(_at_)med(_dot_)ge(_dot_)com
-Cc: procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de
-
-I'm in the same position.  I'm surrounded by RTF and HTML email users who
-occasionally attempt to communicate with fanciness rather than words.  I
-don't have an elegant procmail solution, but if it is just a small portion
-of users, maybe my workaround will help. 
        It seems that the number of users is growing, unfortunately... 

[...]
-So it's a pain, but for the occasional screwball, it effectively decodes 
-it.  I have my config set for MIME aware, but it doesn't appear to have 
-an affect on the incoming stuff.  If "reply with include text" doesn't 
-decode it for you, let me know and I'll send you more config info via 
-private reply.  If it does work, let the list know so others might 
-benefit.  
-
---
-erik(_dot_)dufek(_at_)med(_dot_)ge(_dot_)com
-
-On Sun, 8 Feb 1998, Michael Ghens wrote:
-
-> I am one of those pine text based email user. I have a few people sending
-> e-mail to me in mime-html <grrr>.
-> 
-> I need a procmail script to clean this up! (No, rejecting it or not
-> reading the messages is not an option)
-
        I just set up something recently that might also work for you,
depending on what sort of system setup you're running. 
        I got tired of getting 6000-10000 line attachments when some friend
who's a Windows user decided to send me a picture of their dog (I've gotten
two of those recently!) or something similar. I'm running a Linux system,
so I set up a second account that would be used for POP-mail fetching via
Netscape mail. (I normally use RMAIL from within Emacs, and at this perfect
moment, am working on a Wyse-30 terminal.)
        So I had a 2nd account, but still had to forward the huge
attachment files over, including the appropriate MIME headers so that it
didn't lose its MIME-magic and become 10000 lines of ASCII. This is where
Procmail came in handy. I set up this recipe:

:0 c                            # Any MIME-encoded stuff w/ both of these lines
* ^MIME-Version:
* ^Content-Type: 
!patpics                        # Forward to the patpics account
        :0 A                    # If last recipe was successful (logical AND)
        | /bin/mail -s "You have MIME-mail" salsbury < 
/home/salsbury/Mail/patpics.note

        So it scans for telltale MIME headers, forwards appropriate mail to
the appropriate account, and then sends me a simple ASCII message, to let
me know that there's something in the other account. (Since I don't check
it very often.) The patpics.note file is just a simple 3-liner that says:

                                  (Snip snip)
------------------------------------------------------------------------------
        You have a MIME-encoded mail in your patpics account. 

        (Ain't procmail cool? :-)  )
------------------------------------------------------------------------------

        I use that so I don't get any "null message body" messages from
sending a blank message in mail. 

        I'm sure there are probably more elegant ways to do it, but this
one works pretty well. And you can tailor that second line to catch just
specific types of "Content-type:" lines. I may do that, as I'm now catching
just TEXT/PLAIN messages with that recipe, like this one I'm responding
to. :-) 

        Hope this helps! 

Pat
           ___________________Think For Yourself____________________
                 Patrick G. Salsbury <salsbury(_at_)sculptors(_dot_)com>
                     http://www.sculptors.com/~salsbury/
                           -----------------------
       "Those who fail do so because they wait for things to happen...
           Those who succeed do so because they make things happen"
                                                ...author unknown

<Prev in Thread] Current Thread [Next in Thread>