Re: [exim] convert exim4 spool files (-H -D files) to MailD…

Góra strony
Delete this message
Reply to this message
Autor: Heiko Schlittermann
Data:  
Dla: exim-users
Temat: Re: [exim] convert exim4 spool files (-H -D files) to MailDir
Heiner <Sengoku@???> (Fr 17 Jul 2009 10:30:50 CEST):
> HiHo,
>
> know this sounds a little strange but nonetheless:
>
> I need to put a complete set of exim4 spool files (the *-D stuff) to one specific Mailbox (using Courier POP3). Is there any way to do it without delivering the mails using the exim daemon ?
>


As stated by Nigel and Dave, the spool files should be touched by exim
only. Anything else might produce results you didn't expect.

But if you're sure about the things your're doing (avoiding concurrent
access, ...), you could do something like this:

    for id in $(exipick -i); do
        echo "From - `date`"
        exim4 -Mvc $id 
    done > mbox


Of course, the delivery date will be wrong. And the above snipped
expects the mailbox in MBOX format, I'm not sure if this is true
for qourier.


> there are several scripts to convert MBox to Mdir...but i want to convert spoolfiles to one specific Mdir for debugging purposes.


Ah - here you're talking about MDIR.

    exipick -i | xargs -i -n1 sh -c "exim -Mvc {} >/tmp/mail/new/{}"


At least mutt accepts this as valid mdir (used mutt -f /tmp/mail).

"exim -Mvc" will refuse to "cat" the mail if an other exim process is
using it.

    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann HS12-RIPE -----------------------------------------
 gnupg encrypted messages are welcome - key ID: 48D0359B ---------------
 gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2  7E92 EE4E AC98 48D0 359B -