Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am new to exim mail server. Now i need to findout the number of sent, deferred , bounced emails through logs. Since in postfix I will do things through grepping. Is there any way to find in exim through grep command.

Your help is greatly appreciated. Thanks in advance.

Best Regards, Karthick

share|improve this question

2 Answers 2

Exim comes with a tool called eximstats that will generates such statistics for you instead of grepping

Just run it from the command line with the log file to be examined as a parameter like:

eximstats /var/log/exim4/mainlog
share|improve this answer

Exim provides a log grepping perl script which will find and group all related log lines for whatever you search for. This tool is called exigrep and it can look for many different things, and can use regular expressions to do the matching. Examples:

# to find all emails to or from an email address
exigrep user@example.com /var/log/exim/main.log

# to find all delivered emails to an email address
exigrep '=>.*user@example.com' /var/log/exim/main.log

# if you know the specific mail queue id
exigrep 1UF3vP-0003M7-TY /var/log/exim/main.log

# to find a specific virus matches
exigrep Heuristics.Phishing.Email.SpoofedDomain /var/log/exim/main.log

It is a very powerful tool, but one caveat is that it searches the entire file from beginning to end. This will be slow or cause high load if you have very large mail logfiles or a very busy machine.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.