Exim: Difference between revisions

From Halfface
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 22: Line 22:


=Stolen with pride from http://forum.likg.org.ua/server-side-actions/basical-exim-mta-commands-t23.html=
=Stolen with pride from http://forum.likg.org.ua/server-side-actions/basical-exim-mta-commands-t23.html=
  exim -qff => flush exim queue
Flush exim queue
  exim -qff
Flush mail queue in a verbose mode.
Flush mail queue in a verbose mode.
  sudo exim -d -qff -v 2>&1 | less -ISRM
  sudo exim -d -qff -v 2>&1 | less -ISRM
exim -M email-id => Force delivery of one message
Force delivery of one message
  exim -qf => Force another queue run
  exim -M email-id
  exim -qff => Force another queue run and attempt to flush the frozen message
Force another queue run
  exim -Mvl messageID => View the log for the message
  exim -qf
  exim -Mvb messageID => View the body of the message
Force another queue run and attempt to flush the frozen message
  exim -Mvh messageID => View the header of the message
  exim -qff
  exim -Mrm messageID => Remove message without sending any error message
View the log for the message
  exim -Mg messageID => Giveup and fail message to bounce the message to the Sender
  exim -Mvl messageID
  exim -bpr | grep "<" | wc -l => How many mails on the Queue
View the body of the message
  exim -bpr | grep frozen | wc -l => How many Frozen mails on the queue
  exim -Mvb messageID
  exim -bpr | grep frozen | awk {'print $3'} | xargs exim -Mrm => Deleteing Frozen Messages
View the header of the message
exim -bpc => find out, how many mails are there in the mail queue
  exim -Mvh messageID  
  exim -bp => check the mails in the queue <== exiqgrep  -- works faster
Remove message without sending any error message
  exim -bt email => trace message delivery
  exim -Mrm messageID
  exim -bp| exiqsumm => summary of the email queue
Giveup and fail message to bounce the message to the Sender
  exim -brt halfface.se # Retry rule for instance.
exim -Mg messageID
How many mails on the Queue
  exim -bpr | grep "<" | wc -l
How many Frozen mails on the queue
  exim -bpr | grep frozen | wc -l
Deleteing Frozen Messages
  exim -bpr | grep frozen | awk {'print $3'} | xargs exim -Mrm
Find out, how many mails are there in the mail queue
  exim -bpc
Check the mails in the queue <== exiqgrep  -- works faster
  exim -bp
Trace message delivery
  exim -bt email
Summary of the email queue
exim -bp| exiqsumm
Retry rule for domain.
  exim -brt halfface.se


=Exim stats=
=Exim stats=
Line 48: Line 65:
=remove mails from regex=
=remove mails from regex=
  exiqgrep -i -r reciever@somewhere.com | xargs exim -Mrm
  exiqgrep -i -r reciever@somewhere.com | xargs exim -Mrm
=count mails in queu=
exim -bpc
=View message header=
exim -Mvh <message-id>
=View message body=
exim -Mvb <message-id>
=View message logs=
exim -Mvl <message-id>
=troubleshoot send mail verbose=
Troubleshooting sending email.
$ exim -v andreas.bjorklund@ipsoft.com
From: andreas.bjorklund@ipsoft.com
Subject: 2019-08-22 15:29:20 Andreas Bjorklund
Text Text Text
Press Ctrl+d

Latest revision as of 09:13, 23 August 2019

copy all mails

Make a file called exim.filter in the /etc/exim directory with the following line:
unseen deliver <email adress of the admin>

and in the main part of the exim.conf
system_filter = /etc/exim/exim.filter
system_filter_user = exim

THE file /etc/exim/exim.filter has to be owned by exim.
ALL email that comes in and out comes with a copy to the admin.

To print a list of the messages in the queue, enter:

exim -bp

To remove a message from the queue, enter:

exim -Mrm {message-id}

To remove all messages from the queue, enter:

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

Remove frozen mails

exim -bp|grep frozen|awk '{print $3}' |xargs exim -Mrm

Stolen with pride from http://forum.likg.org.ua/server-side-actions/basical-exim-mta-commands-t23.html

Flush exim queue

exim -qff

Flush mail queue in a verbose mode.

sudo exim -d -qff -v 2>&1 | less -ISRM

Force delivery of one message

exim -M email-id

Force another queue run

exim -qf

Force another queue run and attempt to flush the frozen message

exim -qff

View the log for the message

exim -Mvl messageID

View the body of the message

exim -Mvb messageID

View the header of the message

exim -Mvh messageID 

Remove message without sending any error message

exim -Mrm messageID

Giveup and fail message to bounce the message to the Sender

exim -Mg messageID

How many mails on the Queue

exim -bpr | grep "<" | wc -l

How many Frozen mails on the queue

exim -bpr | grep frozen | wc -l

Deleteing Frozen Messages

exim -bpr | grep frozen | awk {'print $3'} | xargs exim -Mrm

Find out, how many mails are there in the mail queue

exim -bpc

Check the mails in the queue <== exiqgrep -- works faster

exim -bp

Trace message delivery

exim -bt email

Summary of the email queue

exim -bp| exiqsumm

Retry rule for domain.

exim -brt halfface.se

Exim stats

eximstats /var/log/exim/main.log

exiwhat

What are exim services doing.

remove mails from regex

exiqgrep -i -r reciever@somewhere.com | xargs exim -Mrm

count mails in queu

exim -bpc

View message header

exim -Mvh <message-id>

View message body

exim -Mvb <message-id>

View message logs

exim -Mvl <message-id>

troubleshoot send mail verbose

Troubleshooting sending email.

$ exim -v andreas.bjorklund@ipsoft.com
From: andreas.bjorklund@ipsoft.com
Subject: 2019-08-22 15:29:20 Andreas Bjorklund
Text Text Text
Press Ctrl+d