How to convert a queue file to eml ou mbox?
Webmaster Boucinhas & Campos
webmaster at boucinhas.com.br
Mon Mar 19 14:39:39 CET 2007
Thank very much,
I am using postfix in my MTA.
To generate the MBOX file I write the shell script below
postcat -v QUEUE_FILE 2>/dev/null | grep "regular_text:" | grep
"regular_text: " | sed "s/regular_text: //g" > MAIL.mbox
Regards,
Rodrigo
----- Original Message -----
From: "Glenn Steen" <glenn.steen at gmail.com>
To: "MailScanner discussion" <mailscanner at lists.mailscanner.info>
Sent: Saturday, March 17, 2007 7:37 AM
Subject: Re: How to convert a queue file to eml ou mbox?
> On 16/03/07, Webmaster Boucinhas & Campos <webmaster at boucinhas.com.br>
> wrote:
>>
>> Thanks for you information but I would like run a cron job like this
>>
>> ###############
>> cd /var/spool/MailScanner/archive/
>>
>> for i in `ls -1`
>> do
>> convert_raw_to_eml ${i} > ${i}.eml
>> convert_raw_to_mbox ${i} > ${i}.eml
>> convert_raw_to_html ${i} > ${i}.eml
>> done
>> ###########
>>
>> In the directory exist one directory per day and one file per message
>>
>> 20070315/D34085010F.A7559
>>
>> is easy to identify the message, the filename is the mail ID, in a single
>> mbox file is very hard to identify the mail
>>
> Yes I know this. Why you'd want to do it like that .... Oh well.
> There is no generic tool for doing the conversion, you need do that
> yourself.
> It would need be tailored to your MTA, since the queue files you are
> seeing is simply the raw queue files.
> If this is Postfix, you would create your "convert_from_raw" script
> around postcat...
>
> Cheers
> --
> -- Glenn
> email: glenn < dot > steen < at > gmail < dot > com
> work: glenn < dot > steen < at > ap1 < dot > se
> --
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>
> Before posting, read http://wiki.mailscanner.info/posting
>
> Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list