Skip to main content

How to delete / clear queue of PowerMTA

To delete / clear queue of PowerMTA:

Use pmta delete

Syntax :

pmta delete [--dsn] [--queue=domain[/vmta] [--orig=addr] [--rcpt=addr]
[--jobId=id] [--envId=id] [--accounting]
Description :
Deletes recipients from the queue. Although "--queue"'s default is */*, the command
requires either --queue or --jobId to be entered explicitly, so that an accidental "pmta
delete" command doesn't delete the entire queue. Messages are marked in the accounting
file as deleted by administrator.

Options :
specifies that a DSN report should be sent. Using this option may slow the
deletion process. No entry is written to the accounting file unless the --accounting
flag is used as well.
specifies that deletion information should be written to the accounting file. Using
this option may slow the deletion process.
specifies which queue(s) to delete from, and defaults to all queues.
specifies that only recipients with the MAIL FROM address be deleted
specifies that only recipients with the RCPT TO address are to be deleted.
specifies that only recipients with the given Job ID are to be deleted
specifies that only recipients with the given Envelope ID are to be deleted.
Example :
$ pmta delete –*
$ pmta delete –

It is recommended to pause the queue, drink a cup of coffee, before you actually delete the queue:

pmta pause
Syntax :
pmta pause queue domain[/vmta]
Description :
Pause delivery of messages in the queue, and holds them from being delivered. May be
run prior to injecting mail into PowerMTA so that mail may be held for later delivery or before delete the queue.
Example :
$ pmta pause queue */i88mta
Post a Comment

Popular posts from this blog

How to reset password of Jenkins

Reset password of JenkinsPrefer way, No securities were harmedSee also:
What is Jenkins' initial admin password

To reset it without disabling security if you're using matrix permissions (probably easily adaptable to other login methods): In config.xml, set disableSignup to false.Restart Jenkins.Go to the Jenkins web page and sign up with a new user.In config.xml, duplicate one of the <permission>hudson.model.Hudson.Administer:username</permission> lines and replace username with the new user.If it's a private server, set disableSignup back to true in config.xml.Restart Jenkins.Go to the Jenkins web page and log in as the new user.Reset the password of the original user.Log in as the original user. Optional cleanup: Delete the new user.Delete the temporary <permission> line in config.xml. Alternative way:
ssh to the server, disable authentication, set the password via the Jenkins Web UI, then enable authentication.