postfix-users October 2010 archive
Main Archive Page > Month Archives  > postfix-users archives
postfix-users: Re: Resend emails from a Maildir

Re: Resend emails from a Maildir

From: mouss <mouss_at_nospam>
Date: Mon Oct 18 2010 - 21:37:18 GMT
To: postfix users <postfix-users@postfix.org>

  Le 18/10/2010 11:56, Patric Falinder a écrit :
> Hi,
>
> I'm not really sure if this has to do with Postifx so just tell me if
> I'm wrong.
>
> Is it possible to resend emails that are in a Maildir already?
> The reason for this is that a user changed server so I had to change
> the transport for that domain and there are something like 50 mails in
> the old Maildir that I need to "resend" to the new server.
>
> Is that possible?

if it's maildir at both sides, the simple thing is to copy the files
(cp, scp, rync, ... etc.)

if you believe smtp is the right transport, then:
- you'll need to make sure the "Delivered-To" header does not match the
next destination address (otherwise, Mr postfix will "think" this is a loop)
- get the MAIL FROM address from the "Return-Path" header. with this you
can do: sendmail -f $returnpath yourdestinationemail