Skip to content

Send an email message from queue to a different email address.

How to send an email message from queue to a different email address.

One of my customers made a mistake and have sent one email to a wrong email address. I have seen the email message in queue and I have decided to send the email to the correct destination and remove the wrong email from queue.

My email server is configured with postfix.

This is the message:

root@smtp:~# mailq
76B045E02BA  6625997 Thu Aug 16 18:54:37  mycustomer@removed.de    
(connect to removed.de[a.b.c.d]:25: Connection timed out)
                                         destination@wrongdomain.de

I have saved the message from queue (by id) on message.eml file:

root@smtp:~# postcat -qbh 76B045E02BA > message.eml

I have removed the message from queue:

root@smtp:~# postsuper -d 76B045E02BA

I have sent the message to the correct email address:

root@smtp:~# sendmail -f mycustomer@removed.de destination@removed.de  <./message.eml
Published inMailservers