Re: [exim] Dump message to stdout

Góra strony
Delete this message
Reply to this message
Autor: Christian Gregoire
Data:  
Dla: Michael Sprague, exim-users
Temat: Re: [exim] Dump message to stdout
>----- Original Message ----
>From: Michael Sprague <mfs@???>
>To: exim-users@???
>Sent: Thursday, August 16, 2007 3:05:19 PM
>Subject: Re: [exim] Dump message to stdout


>On Thu, Aug 16, 2007 at 05:45:19AM -0700, Christian Gregoire wrote:
>> Hello,
>>
>> Is there a way, with the Exim command line, to dump a message (header + body) to stdout, given its message ID ? I would use something like:
>> exim -Mvh <ID> > outfile
>> exim -Mvb <ID> >> outfile
>> but the header file would have first to be parsed to remove all the 'admin' lines and flags, which is not very handy.
>Are you refering to messages in the queue? If so, the attached script
>does just that. It'll spit out the body section, header section or the
>message section based on the args you give it. Just change the "spool"
>variable to match your spool and it should work; assuming you're using
>the split spool.



Thanks Michael, but actually, your script simply dumps the files with no processing, when I want all the unwanted lines and flags be removed from the header file, which looks like :

1ILeJk-0000aV-3i-H
exim 25 12
<>
1187266752 0
-active_hostname myserver.mail.com
-ident exim
-received_protocol local
-body_linecount 57
-allow_unqualified_recipient
-allow_unqualified_sender
-localerror
XX
1
xxxxx@xxxxx

128P Received: from exim by myserver.mail.com with local id 1ILeJk-0000aV-3i
        for xxxxx@xxxxx; Thu, 16 Aug 2007 14:19:12 +0200
045  X-Failed-Recipients: xxxxx@xxxxx
029  Auto-Submitted: auto-replied
061F From: Mail Delivery System xxxxx@xxxxx
022T To: xxxxx@xxxxx
059  Subject: Mail delivery failed: returning message to sender
050I Message-Id: <E1ILeJk-0000aV-3i@???>
038  Date: Thu, 16 Aug 2007 14:19:12 +0200


Philip Hazel replied that this feature will be implemented in Exim 4.68.

Christian



____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/