Re: [exim] Reinject Email

Top Page
Delete this message
Reply to this message
Author: Kirill Miazine
Date:  
To: Exim
CC: exim-users
Subject: Re: [exim] Reinject Email
* Exim [2010-02-04 22:37]:
> 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.


You could just re-send the mail. I.e. you take one message from
/var/spool/mail/{user}, extract *envelope* sender and re-send it using
e.g. exim -f '<sender address>' '<recipient>' for each message.

> I do not have the option of moving the email file to the new server, as
> the formats are different.


What is the format on your side and what is the format on remote side? I
assume mails are stored in mbox format on your server.

> Does anyone have a suggestion how I can accomplish this?


There is more than one way to do it. The best is probably just convert
from one format to another and then transfer to the other server.

Here's some tools that should convert mbox to maildir:

http://untroubled.org/mbox2maildir
http://batleth.sapienti-sat.org/projects/mb2md/

-- Kirill