procmail
[Top] [All Lists]

Re: procmail and file attachements

1999-01-14 09:08:59
* Wed 1999-01-13 Thomi Hug <tom(_at_)nine(_dot_)ch> 
| 
| i tried to find something about procmail and
| mail-file-attachements in the howtos... but nothing found.
| 
| is there a possibility to get a file (ex. test.gif) out of
| an incoming mail with procmail?

If the incoming message contains only ONE mime part, then it can be saved
to file. Other that that, it's not a job for procmail. MIME is too complex
and better handled by dedicated tools like perl.

have you looked at this yet, maybe it sheds a light...

            ftp://cs.uta.fi/pub/ssjaaa/pm-tips.html -- Procmail tips
            ftp://cs.uta.fi/pub/ssjaaa/pm-code.html -- Procmail modules

The latest version is in the File Server (see x-info), the cs.uta.fi version
may be some weeks old:

    4.6 Procmail module list

       Where to get the modules

        The UBE stop procmail modules are not listed here. See pointers in
        "procmail code" section later.

        o   All pm-ja*.rc modules are in Jari's pm-code.shar procmail kit.
            You can get it by sending message

                To: <jari(_dot_)aalto(_at_)poboxes(_dot_)com>
                Subject: send help              (or "sedn pm-code.shar")

        o   Other modules are by Alan Stbbens http://reality.sgi.com/aks/
        o   1998-12-08 Eli the Bearded <*(_at_)qz(_dot_)to> announced in 
comp.mail.misc
            that he had put his own procmail modules to visible at
            http://www.qz.to/eli/src/procmail/. You may find interesting 
procmail
            code there but the modules itself are not general purpose *plug-in*
            modules that you could use right away. Some functionality included:

                Inline decoding of MIME text attachments        (rc.mime-decode)
                Cleansing of obscure "Re:" formats in subject   (rc.pre-list)
                Nifty autoresponder                             (rc.qz-2)
                Sophisticated dupicate email catching           (rc.dupes)
                Example of using my mail bouncer                (rc.lists-out)
                Detection of some classes of autoreplies        (rc.daemon)
                Various junk mail filtering                     (rc.filter)
                Daily log files                                 (rc.vars)
 ...

       File Servers

        o   *pm-jasrv.rc* -- A Mime Procmail file server (MPFS) It contains
            all the instructions and supports several MIME encoding types:
            text/plain and gzip. The keyword SEND is configurable. You
            can set up as many files servers as you need to different
            directories by changing the SEND keyword. MPFS supports
            password for file access.
        o   *commands.rc* -- From Alan's procmail-lib, check for commands
            in the subject line. Handles commands (send|get)
            [help|info|procmail info|procmail lib|procmailrc] and few
            others.

       Mime modules

        o   *pm-jamime.rc* -- Subroutine to read MIME headers and put the
            mime version, boundary string, content-type information to
            variables.
        o   *pm-jamime-decode.rc* -- recipe to decode quoted-printable
            or base64 encoding in the body.
        o   *pm-jamime-kill.rc* -- Recipe for attachment killing: wipes out the
            extra mime cruft leaving only the plain text. Applications for
            killing: ms-tnef attachement (MS Explorer 7k),
            html attachements (netscape, MS Express) vcard (Netscape),
            PCX attachement (Lotus Notes).
        o   *pm-jamime-save.rc* -- Recipe for saving simple file attachement.
            When you receive _ONE_ file attachement in a message, this
            recipe can save it to separate directory. The content is
            also decoded (base64,qp) while saving to file.

See also:

        14.0 Procmail, MIME and HTML
            14.1 Mime Bibliography
            14.2 Mime notes
            14.3 Software to deal with mime or html
            14.4 Mime content type application/ms-tnef
            14.5 Trapping html mime messages
            14.6 Complaining about html messages
            14.7 Converting HTML body to plain text
            14.8 Getting rid of unwanted mime attachements (html, vcard)
            14.9 Sending contents of a html page in plain text to someone

jari

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