0

After running postqueue -p I noticed a lot of email that is stuck in queue to a entity that recently changed there domain.

Is there a way to change all the recipients of the mail stuck in queue addressed to *@entity.be to Banana@foo.com

So I can easily check which mails are important and need to be resent and which emails can be deleted.

I know I can manualy do all mails one by one with the solution proposed here but is are simply to many to do that.

Dr. Banana
  • 103
  • 1

1 Answers1

1

First thing to notice is that requeued messages are subject to address rewriting. So the simplest thing is to release and reque those e-mails and have the proper address rewriting enabled in postfix.

Like this:

recipient_canonical_maps = regexp:/etc/postfix/recipient_canonical.pcre
With this content:
/^(.*@)entity.be$/ Banana@foo.com

Then release and requeue with

postsuper -HALL
postsuper -rALL

debe
  • 26
  • 2