Skip to main content

mail stuck in queue, can it be modified

Comments

5 comments

  • Infopro
    There is no way to edit an email in transit that I'm aware of.
    0
  • sparek-3
    (Not for the faint of heart) If the message is stuck in the queue you can try modifying the files directly at: /var/spool/exim/input/%alphanumeric%/%messageid%-D /var/spool/exim/input/%alphanumeric%/%messageid%-H You will need to know the message ID of the specific message, and probably the easiest way to find these files is to use grep: grep -lr %messageid% /var/spool/exim/input The -H file is referring to the headers of the message. The -D file is referring to the message contents or body. (The %alphanumeric% code is going to be the last alphanumeric character before the first dash in the message id) I cannot vouch for this method and I don't really recommend it. But it would seem to be possible to do. Although I think there may be a checksum some where in this, so the message knows how big it's suppose to be. This means you can't remove 1 character and add 2 characters. It has to be a 1:1 change. Although I'm not entirely sure if that's correct.
    0
  • cPanelLauren
    I tested the method mentioned by @sparek-3 on my own server and found that it does indeed work. I modified the header of a message stuck in queue to change the recipient address. I should also point out that this method is not something that is supported by cPanel but I do hope it answers your question. I did grep -r MessageID /var/spool/exim/input
    to find the message and used vi to modify the header portion. Thanks!
    0
  • keat63
    I also tried this and it appeared to work. In my case the email address was missing a letter from the domain name, I added the missing letter and the mail went from the queue. So when I say it worked, it's no longer stuck in the queue, so I assume it did, however, i don't see it in mailscanner. I found the message ID from the mail queue, so no need to grep. I have CSF explorer installed, so it was pretty easy to not only navigate and identify the header, but also modify and save it. This is one that I will have to test a little more and document for future.
    0
  • cPanelLauren
    Hi @keat63 I'm glad it worked for you, I wouldn't recommend using it often but it's good to know it's an option when something like this occurs. Thanks!
    0

Please sign in to leave a comment.