We have exim4 set up on Debian as a smarthost to send mail via Google's mail servers. We use Google Apps for everything else, so this made sense. Problem is, the password for the smart host account was changed, causing exim to bounce the messages back and then freeze them. Now I have a large collection of unsent mail in /var/spool/exim4/[input|msglog]
.
I have tried running:
exim -d -M 1Mx6IS-0006bC-3h
but that causes the bounced message to be sent, not the original. I can see a copy of the original message in /var/spool/exim4/input/1Mx6IS-0006bC-3h-D
under the line
------ This is a copy of the message, including all the headers. ------
...but I have not figured out a way to take this frozen bounced message, and convert it back to the original message so it can be retried.
Any ideas?
Is this a final bounce? Or the one that says that another attempt to deliver will happen in some number of hours, if later, could it be that both messages are sent out, the original and bounce? Since both are in the queue, as I understand it from your question.
UNTESTED!
This is a python script that should do what you want. It is thoroughly untested, and is guarenteed not to work in all cases. If you don't know Python, then nevermind, it was a nice bit of practice for me.