cancelmsg

Name

cancelmsg -- Cancel an E-mail message

Synopsis

cancelmsg {msgid} ["reason"]

DESCRIPTION

cancelmsg removes a message from the mail queue. There will be no more attempts to deliver this message. In most cases a non-delivery notice will be sent to the return address listed on the message. You can only cancel your own messages. The superuser can cancel anyone's message. Cancelling will not work if the message has already been sent (of course), or if a delivery attempt is currently in progress. Because a delivery attempt is usually started as soon as an E-mail message is sent, cancelling is only effective if the message cannot be immediately delivered for some reason at this time, or if the system is very busy and cannot attempt to deliver the message immediately. cancelmsg works by marking all pending recipients as undeliverable. A non-delivery report is then generated and sent according to normal procedures.

msgid is the message queue id that can be obtained from the mailq(1), command. reason is optional. The message does not disappear into a black void. The message will be returned as undeliverable, citing reason. A generic error message will be used if reason is not specified.

BUGS

A non-delivery report may not be sent immediately, but delayed until the message's turn comes up in the scheduling queue.

There is no immediate indication if the message cancellation worked. A subsequent non-delivery report is the only indication of a successful cancel. If it doesn't come, it means the message wasn't cancelled in time.

A non-delivery report will not be sent for recipients whose delivery status notification does not include the FAIL notice.

SEE ALSO

mailq(1), courier(8).