Difference between revisions of "Exim"
(→Logs) |
(→Logs) |
||
Line 51: | Line 51: | ||
Example: exim -Mvh 1ggpHd-00070u-96 > /home/user/message.txt; exim -Mvb 1ggpHd-00070u-96 >> /home/user/message.txt | Example: exim -Mvh 1ggpHd-00070u-96 > /home/user/message.txt; exim -Mvb 1ggpHd-00070u-96 >> /home/user/message.txt | ||
− | <strong>Search messages for a specific sender | + | <strong>Search messages for a specific sender <strong> |
exiqgrep -f [user]@domain | exiqgrep -f [user]@domain |
Revision as of 09:23, 8 January 2019
Exim is a mail transfer agent (MTA) used on Unix-like operating systems. Exim is free software distributed under the terms of the GNU General Public License, and it aims to be a general and flexible mailer with extensive facilities for checking incoming e-mail.
Exim has been ported to most Unix-like systems, as well as to Microsoft Windows using the Cygwin emulation layer. Exim 4 is currently the default MTA on Debian GNU/Linux systems.
A large number of Exim installations exist, especially within Internet service providers and universities in the UK. Exim is also widely used with the GNU Mailman mailing list manager, and cPanel.
In March 2017 in a study performed by E-Soft, Inc., approximately 57% of the publicly reachable mail-servers on the Internet ran Exim.
Logs
The main exim log location is
/var/log/exim_mainlog
This log governs sending and receiving of email.
The main log for email account access is
/var/log/maillog
Check exim for unique email sent out
sudo cat /var/log/exim_mainlog | grep "A\=dovecot_login" | awk -F"A=dovecot_login:" {'print $2'} | cut -f1 -d' ' | sort | uniq -c | sort -n | awk {'print $1, " unique emails sent by " , $2'} | grep EMAILADDRESS
What is exim doing?
exiwhat
Count messages in queue
exim -bpc
Check messages in queue
exim -bp
Check message Headers - message has to be in queue
exim -Mvh MESSAGE ID Example: exim -Mvh 1ggpHd-00070u-96
Check message body - message has to be in queue
exim -Mvb MESSAGE ID Example: exim -Mvb 1ggpHd-00070u-96
Save a Spam / message sample - message has to be in queue
exim -Mvh MESSAGE ID > message.txt; exim -Mvb MESSAGE ID >> message.txt Example: exim -Mvh 1ggpHd-00070u-96 > /home/user/message.txt; exim -Mvb 1ggpHd-00070u-96 >> /home/user/message.txt
Search messages for a specific sender
exiqgrep -f [user]@domain
Search for a specific recipent
exiqgrep -r [user]@domain
Freeze a message from queue
exim -Mf MESSAGE ID
Remove message from queue
exim -Mrm MESSAGE ID
Thaw message from queue
exim -Mt MESSAGE ID
Force exim queue to run
exim -q -v