Jump to content
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble

Recommended Posts

To see the total number of mails in the mailing queue:

Exim count mail in queue

exim -bpc

 

Use the following to see which scripts are sending out mail (helps keeping an eye on mailsenders and possible malware):

List the scripts sending mails and count for each one

grep cwd /var/log/exim_mainlog | grep -v /var/spool | awk -F"cwd=" '{print $2}' | awk '{print $1}' | sort | uniq -c | sort -n

To clear the mailing queue:

Exim clear the mail queue

 

exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash

Or even better, a “cleaner” approach:

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

To clear the Exim mailing statistics:

Clear Exim Statistics

cd /var/log

rm -fr exim*.1

rm -fr exim*.2

rm -fr exim*.3

rm -fr exim*.4

rm -fr exim_mainlog ; touch exim_mainlog ; chown mailnull.mail exim_mainlog

rm -fr exim_paniclog ; touch exim_paniclog ; chown mailnull.mail exim_paniclog

rm -fr exim_rejectlog ; touch exim_rejectlog ; chown mailnull.mail exim_rejectlog

To clean the eximstats MySQL database, enter MySQL with:

Enter the SQL eximstats DB

mysql eximstats

SQL commands (to be used within “mysql>”)

SQL commands to empty the tables

delete from sends;

delete from smtp;

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×