Stevie Haston a écrit :
> Hello
> 
> I have a query and thought hopefully someone can answer. This is a postfix 
> and dovecot related question so I thought this would be a good place to start.
> 
> I have postfix + dovecot (maildir storage) setup working good. I have some 
> recipient canonical mapping and some virtual based forwarding taking place. 
> What I'd like to do is have postfix reprocess a specific email that is stored 
> in the /etc/spool/mail directory tree under a IMAP folder structure, perhaps 
> by altering the file in some way and copying it to 
> /etc/spool/postfix/maildrop or hold.
> 
> By reprocess I mean acting upon a stored email as though it was entering the 
> system for the first time, retaining the original from and to. I think this 
> boils down to understanding the different in the formats of the stored email 
> files in /etc/spool/mail and those that postfix itself uses in 
> /etc/spool/postfix
> 
> Any advice greatly appreciated.
> Stevie
> 

in the stored message,

- look at the top most "Delivered-To". it should contain the "recipient"
address. save this address. remove this Delivered-To header (or better
yet, change it to X-Delivered-To: ....) to avoid postfix thinkking there
is a loop.

- look ate the Return-Path header. it should contain the "sender" address.

- now, just run
sendmail  -f $sender $recipient < $file

Reply via email to