CANCELMSG(1)

πŸ“¦
version 2.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’Œ CANCELMSG(1) β€” the cancelmsg girlies know πŸ’…

okay bestie, we're in section 1 of the manual, and this one's by S. Varshavchik. it's giving "i need to un-send that email but for real" energy. let's get into it πŸ¦‹


✨ NAME ✨

cancelmsg β€” cancel an e-mail message, no cap πŸš«πŸ“§


πŸŽ€ SYNOPSIS πŸŽ€

cancelmsg {msgid} ["reason"]

that's it. two little slots. main character energy fr fr.


πŸ’– DESCRIPTION πŸ’–

so basically, cancelmsg removes a message from the mail queue. periodt. there will be no more attempts to deliver that message, and a standard delivery failure notice gets sent to the return address listed on the message. the way it just... notifies people? iconic.

now here's the tea, and it's important tea: you can only cancel your own messages. the superuser can cancel any message (of course they can, they have the keys to everything πŸ‘‘). but an attempt to cancel a message will fail if:

  • the message has already been sent (obviously bestie, you can't un-send it, that's not how any of this works 😭)
  • or if a delivery attempt is currently in progress

and because a delivery attempt is usually started the second an e-mail message is added to the mail queue, a cancellation attempt is only actually effective if the message cannot be immediately delivered for some reason β€” or if the system is very busy and is grinding through a mail backlog 🐌. lowkey the timing window is tiny. vibe check: don't count on it.

here's how it actually does the thing: cancelmsg works by marking all pending recipients as undeliverable. then a non-delivery report is generated and sent in the normal fashion. so it's not a smite from the heavens, it's just... marking. sneaky. we love a subtle queen ✨.

  • msgid β€” this is the message queue id, and you get it from the mailq(1) command πŸ’«
  • "reason" β€” totally optional! and listen, the message does not just disappear into a black void πŸ•³οΈ. it will be returned as undeliverable, citing reason. and if you don't give a reason? a generic error message gets used instead. close enough, still slayed.

πŸ’€ BUGS πŸ’€

ngl these are the parts where you go "okay so this is a little cursed." buckle up 🌈:

  • a non-delivery report may not be sent immediately. instead it can be delayed until the message's turn comes up in the scheduling queue. so it's not instant, it's queue girl behavior ⏳
  • there is no immediate indication if the message cancellation worked 😭. a subsequent non-delivery report is the only indication of a successful cancel. and if it doesn't come? it means the message wasn't cancelled in time. brutal. no confirmation dm, just silence πŸ’€
  • a non-delivery report will not be sent for recipients whose delivery status notification does not include the FAIL notice. so like, if they didn't ask for the FAIL notice, they don't get told. respect the preferences ig πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

iykyk, go read your friends too 🫢


🫢 AUTHOR 🫢

Sam Varshavchik Author

(go off king, thanks for the tool πŸ’œ)


πŸ“Ž NOTES πŸ“Ž

  1. mailq(1) https://www.courier-mta.org/mailq.html
  2. courier(8) https://www.courier-mta.org/courier.html

and that's the whole page bestie!! πŸŽ€ from the Courier Mail Server, dated 01/10/2026, and it's a CANCELMSG(1) situation forever and always πŸ’…βœ¨ no cap, go cancel something responsibly. mwah. πŸ¦‹πŸŒΈπŸ’–

πŸ“¦ where this page comes from
  • ubuntu stonking: courier-mta 2.0.6-1 Β· GPL-3+~with-OpenSSL-exception
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms