UnderHost Networks Ltd


If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.



Reply
  #1 (permalink)  
Old 06-14-2009, 06:46 AM
UnderHost's Avatar
UnderHost Management
 
Join Date: Jul 2008
Posts: 588
Default A few notes on Exim Commands

It may be useful to someone, sometimes the queded mail list gets gigantic because of some spammer and other emails that aren't spam could get deleted when using cPanel to control it.

Code:
==== REMOVE MAILS BY ID ====

/usr/sbin/exim -v -Mrm (MAIL ID HERE)

==== LIST QUEDED MAILS ====

/usr/sbin/exim -bp

==== OUTPUT NUMBER OF QUEDED MAILS ====

/usr/sbin/exim -bpc

==== DELETE FROZEN MAILS ====

/usr/sbin/exim -bp | awk '$6~"frozen" { print $3 }' | xargs exim -Mrm

==== DELIVER FORCEFULLY EMAILS ====

/usr/sbin/exim -qff -v -C /etc/exim.conf &

==== FREEZE MAILS FROM SENDER ====

/usr/sbin/exiqgrep -i -f (MAIL ADDRESS HERE) | xargs exim -Mf

==== REMOVE MAILS FROM SENDER ====

/usr/sbin/exiqgrep -i -f (MAIL ADDRESS HERE) | xargs exim -Mrm
Code:
To view the message header

#exim -Mvh <Message ID>

To view the content of the message

#exim -Mvb <Message ID>
Exim commands to remove messages from mail queue.


Code:
# cd /var/spool/exim/input
# grep -rl "ident mailnull" . | cut -d / -f 3 | cut -d '-' -f 1,2,3 | xargs -n1 exim -Mrm

To Clean-up messages without headers

# cd /var/spool/exim/input
# for i in `find -name "*-D"`; do header=`echo $i |cut -d '-' -f1,2,3`; id=`echo $header | cut -d / -f3`; if [ ! -e $header-H ]; then exim -Mrm $id; fi; done

Remove frozen mails

# exim -bpr | grep frozen | awk {'print $3'} | xargs exim -Mrm
Check exim configuration in one command

Code:
exim -bP
Check the summary of messages:

Code:
exim -bp | exiqsumm
__________________

UnderHostProviding Affordable and Quality Web Hosting & Offshore Hosting
24/7 Fast Support / 99.9% Uptime Guarantee
UHVPSVirtual Private Servers & Premium Offshore VPS
Hong Kong - Singapore - USA - Canada - Netherlands - United Kingdom - Germany
Reply With Quote
underhost.us
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Loading...


All times are GMT -4. The time now is 04:27 PM.
Copyright © 2009 UnderHost Networks Ltd