Re: [exim] Reinject Email

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Heiko Schlittermann
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Reinject Email
Exim <exim@???> (Fr 05 Feb 2010 05:37:02 CET):
> I need to be able to reinject email from the /var/spool/mail/{user} file
> back into exim for delivery to the original recipient. Last week I had to
> put my server in place as a backup for another client while their hardware
> was repaired. Now that their email server is running again, they want me to
> take the contents of their mail file on my server, and send it to their
> server.
>
> I know I could forward the messages, but then the "FROM" and original date
> and time will be lost.


Depending on the number of account you can use mutt and it's „bounce“
function:

    as user:
    mutt


    as root:
    mutt -f /var/spool/mail/$USER


    … then tag all messages     T.*<ENTER>
    … then bounce all messages   ;b<NEW ADDRESS><ENTER>



Or have a look for „formail“, this can execute any command on the mails
of an mbox, so you could resend them using exim directly. The envelope
sender will change probably, but this should not be a problem. The
delivery date will change too, but this you can't avoid. The Date-Header
should remain.

    exim <NEW ADDRESS> < message



    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 -