R-Ts NetWorks

Server the Best

exim


exim -v -Rff redneckacres.com

-manually push queued up mail

exim -bpru |awk ‘{print $3}’ | xargs -n 1 -P 40 exim -v -M

-finds and sorts queued recipients

exim -bp | exiqsumm | sort -nk1

-how many mails in queue

exim -bpc
exim -bp | exiqsumm | less

-freeze all mail from

exiqgrep -i -f luser@example.tld | xargs exim -Mf

– REMOVE all mails from q (skip freeze)

exiqgrep -i -f nobody@ | xargs exim -Mrm

 

(note that the -f in examples above indicates “from”, specify -r for recipient) 

 

-remove frozen messages

exiqgrep -z -i | xargs exim -Mrm

-read msg header

exim -Mhv msgid-id

-will force those messages out of the queue and should reset the retry time

exim -qff

– search apache running for php/suspicious mailers

check_apache –status | grep php

grep -lr ‘a certain string’ /var/spool/exim/input/ | sed -e ‘s/^.*/([a-zA-Z0-9-]*)-[DH]$/1/g’ | xargs exim -Mrm

read a message body or headers

exim -Mvh ID reads a message header

or
exim -Mvb ID reads a message body contents 

tidy up the queue:

exim_tidydb -t 10m /var/spool/exim retry
exim_tidydb -t 10m /var/spool/exim wait-remote_smtp

SEE WHATS HAPPENING NOW:

exiwhat !?!

Alternative ways to force exim queue delivery:

# exim -bpru | exiqsumm | sed ’1,4d;$d;s/^.* (.[^ ]*$)/1/’ | xargs -P 10 -n 1 exim -v -qqR
# mailq | grep ‘^..[dhm]‘ | awk ‘{print $3}’ | xargs -P 4 -n 1 exim -M

Sometime exiqgrep exit with error Line mismatch when you try to remove emails with the -Mrm option

#exiqgrep -o 604800
Line mismatch: 170d 1IGLxw-0004Tw-Ne
You can remove the particular entry that errors out as follows.

# exim -bpru | grep “170d” | awk ‘{print $2}’

1IGLxw-0004Tw-Ne
1IGTFn-0000VM-UI

#exim -bpru | grep “170d” | awk ‘{print $2}’ | xargs -n 1 -P 20 exim -Mrm

 

You will see something like,

Spool data file for 1IGLxw-0004Tw-Ne does not exist
Spool data file for 1IGTFn-0000VM-UI does not exist
Continuing, to ensure all files removed
Continuing, to ensure all files removed
Message 1IGTFn-0000VM-UI has been removed or did not exist
Message 1IGLxw-0004Tw-Ne has been removed or did not exist

Advertisements

August 15, 2012 - Posted by | Linux

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: