Exim
Jump to navigation
Jump to search
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