Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I run a Linux server with a few friends using it to host a site or two. I want to monitor any emails the server sends out to watch for things like spam bots signing on on their sites or the sort.

I believe the only thing being used here for mail is mail/sendmail or the php mail. I know how to check the queue and the sort, but I'd also like to see something like a summary of emails sent out to/from and a subject, something like that.

What are my options?

I suppose I could always just watch /var/maillog ? Any decent tools to summarize the file?

share|improve this question

If you are running postfix, you can enable the always_bcc option in your That will save a copy of every outgoing mail. Set the always_bcc account to be a special new account on the server. Then use procmail on that account's incoming mail to summarize or categorize the incoming messages.

Similar mechanisms exist in other MTAs like sendmail or exim.

share|improve this answer

Out of the box, sendmail can be configured to log every message/every sender/every envelope recipient - there are probably lots of tools available for parsing these logs, AwStats, isoqlog and splunk spring to mind - try google for more.

If you want smarter analysis (e.g. running spamassassin against outgoing mail) then have a look at the some of the many milters available.

share|improve this answer

Your Answer


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.