I'm adding a new field to the Postfix queue file that says if a
message was forcibly expired. The field is set with the postsuper
command, using syntax that is similar to other postsuper commands.
The new option behaves like 'delete' except of course that it sets
a flag in a file instead of deleting it.
-e queue_id
Expire one message with the named queue ID in the named mail
queue(s) (default: hold, incoming, active and deferred).
This only marks the message as expired. The message will be
returned to the sender when the queue manager opens it for
delivery (but mail in the hold queue stays in that queue).
Deferred messages are returned with the actual reason for the
delay; other messages are returned with the reason "5.7.0 mes-
sage is administratively expired".
To expire multiple files, specify the -e option multiple times,
or specify a queue_id of - to read queue IDs from standard input
(see the -d option for an example).
As implemented, this does not release a file from 'hold'. It only
sets a flag in a queue file. That is the purist approach. However
I suspect that some people would not want to have to say
To delete one file:
postsuper -e queueid -H queueid
To delete a bunch of files:
postqueue -pj | script | postsuper -e -
postqueue -pj | script | postsuper -H -
If the intent of expiration is to make messages 'go away' then it
makes sense that '-e' automagically un-holds a message, so that the
queue manager can return it as undeliverable.
Wietse