Skip to main content

How to delete queue of PowerMTA

How to delete  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 :
--dsn
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.
--accounting
specifies that deletion information should be written to the accounting file. Using
this option may slow the deletion process.
--queue
specifies which queue(s) to delete from, and defaults to all queues.
--orig
specifies that only recipients with the MAIL FROM address be deleted
--rcpt
specifies that only recipients with the RCPT TO address are to be deleted.
--jobId
specifies that only recipients with the given Job ID are to be deleted
--envId
specifies that only recipients with the given Envelope ID are to be deleted.
Example :
pmta delete –queue=gmail.com/*
pmta delete –queue=gmail.com/vmta1
pmta delete –queue=*/*
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 */vmta1

Comments

Popular posts from this blog

How to balance outgoing emails via multiple IP addresses with postfix

Postfix how to balance outgoing emails via multiple IP addresses The solution is depending on postfix`s TCP_TABLES and a perl script. In my example I`m using 7 different IP address to route outgoing mails, make sure you`ve already the IP addresses you are going to use have been configured on your box. First get a recent postfix rpm from here http://ftp.wl0.org/official/2.9/RPMS-rhel5-x86_64/. This one is built for rhel5/centos5 however should be working without much hassle on rhel6/centos5. Install the package: # rpm -Uvh postfix-2.9.1-1.rhel5.x86_64.rpm Make sure its built with tcp tables support: # postconf -m btree cidr environ fail hash internal ldap memcache nis proxy regexp static tcp texthash unix Install the perl module  List::util::WeightedRoundRobin: cpan install /List::util::WeightedRoundRobin/ Create the following perl script and make it executable: vi /etc/postfix/postfix.pl #!/usr/bin/perl -w # author: ...

How To Block Removable drive in linux

For Block Removable disk like pen drive you have to run only one following command - Open terminal -      #sudo chmod 700 /media For unblock -     # sudo chmod 755 /media   

how to take mails backup in outlook 2007

How to take backup of mails in outlook 2007. there is a very simple way to taking backup of mails 1.Opne outlook 2007 > tools >account > data files >open folder then close all other windows and copy outlook.pst file in a safe location To restore backup 1.Opne outlook 2007 > tools >account > data files > add > and give the location of outlook.pst file.