On 6/25/2014 5:10 PM, Robert Fantini wrote:
> Hello 
> 
> due to a bug in some other software we have mail occasionally get
> stuck in the queue.
> 
> I've tried editing /var/spool/postfix/defer/1/176CD2193E   to fix
> the address, but after running 'postfix flush'  , that files reverts
> to its original recipient.  I could not find another file to edit..
> This is a centos system, version 5 I think.
> 
> So is there a way to change the recipient? 
> 
> 
> 
> Version     : 2.6.6
> Release     : 2.2.el6_1
> 
> 
> best regards. rob
> 
> 


Please don't ever edit the queue file directly for any reason. That
is not supported and can give unpredictable results.

To rewrite a bad recipient, use a virtual_alias_maps entry, then
requeue the bad message with "postsuper -r QUEUEID". The domain does
*not* need to be defined in virtual_alias_domains.


# main.cf
virtual_alias_maps = hash:/etc/postfix/virtual_aliases

# virtual_aliases
b...@example.com   g...@example.org

# postmap virtual_aliases

(and if you changed main.cf)
# postfix reload

# postsuper -r QUEUEID




  -- Noel Jones

Reply via email to