Re: pgm pour décortiquer un mail

Top Page

Reply to this message
Author: Patrice Karatchentzeff
Date:  
CC: guilde
Subject: Re: pgm pour décortiquer un mail
Le 15/05/06, anne aublanc<anne.aublanc@???> a écrit :
> bonjour,
>
> Je suis à la recherche d'un pgm (perl de préférence) pour décortiquer un
> mail entrant.
>
> J'ai trouvé un pgm perl sans pièce jointe qui fonctionne mais avec pièce
> jointe marche pas et je n'arrive pas à récupérer la pièce jointe!
>
> Si vous avez un petit pgm... j'accepte avec joie


Il y a près de 10 000 modules Perl pour le CPAN et pas moins de 1402
qui répondent à « mail » comme critère de recherche :

http://search.cpan.org/search?query=mail&mode=all

Tu as cherché là-bas ?

Enfin, en deux secondes d'une recherche dans la bien nommée Foire Aux
Questions de Perl, on trouve :

% perldoc -q mail

---->oo<-----

Found in /usr/share/perl/5.8/pod/perlfaq9.pod
       How do I parse a mail header?


       For a quick-and-dirty solution, try this solution derived from
"split" in perlfunc:


           $/ = '';
           $header = <MSG>;
           $header =~ s/\n\s+/ /g;      # merge continuation lines
           %head = ( UNIX_FROM_LINE, split /^([-\w]+):\s*/m, $header );


       That solution doesn't do well if, for example, you're trying to
maintain all the Received lines.  A more complete approach is to use
the Mail::Header module from CPAN (part of the  MailTools package).


---->oo<----

(il y a deux cents lignes sur la question...)

et enfin :

% apt-cache search perl mail module
libemail-find-perl - Perl module to find RFC 822 email addresses in
arbitrary text
libemail-simple-perl - Simple parsing of RFC2822 message format and headers
libmail-imapclient-perl - a perl library for manipulating IMAP mail stores
libmail-mbox-messageparser-perl - fast and simple mbox folder reader for perl
libmail-mboxparser-perl - Perl5 module for fast, object-oriented UNIX
mailbox reading
libmail-milter-perl - Perl extension modules for mail filtering via milter
libmail-pop3client-perl - POP3 client module for perl
libmail-sender-perl - Perl Module for sending mails with attachments
libmime-explode-perl - perl MIME::Explode - Perl extension for explode
MIME messages
libmime-lite-perl - Perl5 module for convenient generation of MIME messages
libmodule-versions-report-perl - Report versions of all modules in memory
libpalm-perl - Perl 5 modules for manipulating pdb and prc database files
libroxen-webmail - Webmail module for the Roxen Challenger web server
libsendmail-milter-perl - Interface to Sendmail's Mail Filter API

(extrait limité)

PK

-- 
      |\      _,,,---,,_       Patrice KARATCHENTZEFF
ZZZzz /,`.-'`'    -.  ;-;;,_   mailto:p.karatchentzeff@free.fr
     |,4-  ) )-,_. ,\ (  `'-'  http://p.karatchentzeff.free.fr
    '---''(_/--'  `-'\_)