How to : Exim Remove All messages From the Mail Queue


Cheap reseller Hosting


 

Exim is a mail transfer agent (MTA) used on Unix-like operating systems. It aims to be a general and flexible mailer with extensive facilities for checking incoming e-mail. For more information you can see Exim documentation.

Web

In this article i will show some commands to removing all messages from the Mail Queue. Please Follow the Steps. 

 

Step 1 :  To print a list of the messages in the queue, enter the following command :

# exim -bp

 

Step 2 :  To remove a message from the queue, enter the following command :

# exim -Mrm {message-id}

exim-vps

Step 3 :  To remove all messages from the queue, enter the following command :

# exim -bp | awk ‘/^ *[0-9]+[mhd]/{print “exim -Mrm ” $3}’ | bash

 

Step 4 :  Dallas Marlow, suggested following clean command:

# exim -bp | exiqgrep -i | xargs exim -Mrm

 

 

That’s it ! 🙂 🙂


Cheap web Hosting


Exim commands : To remove emails from mail queue for a specific Sender/Receiver


Cheap reseller Hosting


In this article i will show you how to remove emails from mail queue for a specific Sender/Receiver.

exim-vps

How to remove all emails from a particular user using exiqgrep?

Do follow this command:

# exiqgrep -i -f $user | xargs exim -Mrm

                                                 Or

 

How to remove all emails to a particular user using exiqgrep?

Do follow this command:

# exiqgrep -i -r $user | xargs exim -Mrm

 

That’s it 🙂 🙂

 

Exim related post

 


Cheap web Hosting


Exim Commands : Searching the queue with exiqgrep


Cheap reseller Hosting


Searching the queue with exiqgrep

Exim-Commands-Searching-the-queue-with-exiqgrep

 

In this article I am explaining the command usages for finding emails in Exim mail queue for particular sender or receiver.

Exim includes a utility that is quite nice for grepping through the queue, called exiqgrep. Learn it. Know it. Live it. If you’re not using this, and if you’re not familiar with the various flags it uses, you’re probably doing things the hard way, like piping `exim -bp` into awk, grep, cut, or `wc -l`. Don’t make life harder than it already is.

First, various flags that control what messages are matched. These can be combined to come up with a very particular search.

 

 

1) Use -f ( To search the queue for messages from a specific sender )

Command :

 

root@localhost# exiqgrep -f [luser]@domain

 

2) Use -r ( To search the queue for messages for a specific recipient/domain )

Command :

 

root@localhost# exiqgrep -r [luser]@domain

 

3) Use -o ( To print messages older than the specified number of seconds. For example, messages older than 1 day )

Command :

 

root@localhost# exiqgrep -o 86400 […]

 

4) Use -y ( To print messages that are younger than the specified number of seconds. For example, messages less than an hour old )

Command :

 

root@localhost# exiqgrep -y 3600 […]

 

5) Use -s ( To match the size of a message with a regex. For example, 700-799 bytes )

Command :

 

root@localhost# exiqgrep -s ‘^7..$’ […]

 

“^3$” –> 3bytes
“^3.$” –> 3-30bytes
“^3..$” –> 3-300bytes
“^3…$” –> 3-3000bytes
And so on..

 

6) Use -z ( To match only frozen messages )

 

7) Use -x ( To match only unfrozen messages )

 

There are also a few flags that control the display of the output.

 

8) Use -i ( To print just the message-id as a result of one of the above two searches )

Command :

 

root@localhost# exiqgrep -i [ -r | -f ] …

 

9) Use -c ( To print a count of messages matching one of the above searches )

Command :

 

root@localhost# exiqgrep -c …

 

10) Print just the message-id of the entire queue

Command :

 

root@localhost# exiqgrep -i

 

That’s it 🙂 🙂

 

Exim related post

 

 


Cheap web Hosting


Useful Exim Commands


Cheap reseller Hosting


Useful Exim Commands

 

Exim is a message transfer agent (MTA) for hosts that are highly comfortable and running in Unix or Linux Operating system. Exim server is developed at the University of Cambridge. We can easily manage and configure in server. In this article i will explain few executable commands as below.

 

1) Print a count of the messages in the queue, use the following command line : 

root@localhost# exim -bpc

 

2) Print a listing of the messages in the queue (time queued, size, message-id, sender, recipient), use the following command line : 

root@localhost# exim -bp

 

3) Print a summary of messages in the queue (count, volume, oldest, newest, domain, and totals), use the following command line : 

root@localhost# exim -bp | exiqsumm

 

4) Print what Exim is doing right now, use the following command line : 

root@localhost# exiwhat

 

5) Test how exim will route a given address, use the following command line : 

root@localhost# exim -bt test@ownmyserver.com
user@thishost.com
<– test@ownmyserver.com
router = localuser, transport = local_delivery
root@localhost# exim -bt user@thishost.com
user@thishost.com
router = localuser, transport = local_delivery
root@localhost# exim -bt user@remotehost.com
router = lookuphost, transport = remote_smtp
host mail.remotehost.com [1.2.3.4] MX=0

 

6) Run a pretend SMTP transaction from the command line, as if it were coming from the given IP address. This will display Exim’s checks, ACLs, and filters as they are applied. The message will NOT actually be delivered, use the following command line : 

root@localhost# exim -bh 192.168.11.22

 

7) Display all of Exim’s configuration settings, use the following command line : 

root@localhost# exim -bP

 

 

 

 

exim-vps


Cheap web Hosting