After some server changes our PHP configuration got nuked, which caused a client's large mailing list to time out partially through about 4,000 addresses or more. We want to avoid sending a duplicate mail as much as possible, and we have the original mailing list.

The mail was sent using PHP's mail() function, which uses sendmail, which says it's using Exim. I've seen the command:

sendmail -bp

Which gives me a list of mail that appears was sent. This list isn't very big, and could be accurate (meaning the script timed out after sending only a hundred or so e-mails)

Is sendmail -bp the best way to get this listing?

EDIT: I can't find any mail.log file in /var/log/mail.log or via locate mail.log, but WHM seems to have some information on this.


3 Answers 3


On Debian-based systems exim logs data in /var/log/exim4/mainlog.

You might find the eximstats tool useful for parsing and culling useful information out of that log file.

  • 1
    In centos, and probably RHEL/fedora, it's in /var/log/exim_mainlog
    – yitwail
    Apr 18, 2013 at 23:02

sendmail -bp (and mailq) only lists the mail queue: messages queued but not yet sent. It will not include those messages which were delivered successfully.

You should check /var/log/mail.log (and other logfiles) - they almost always have records of every transfer.


php 5.3.0 added 2 settings that makes tracking down rogue scripts easy:



You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .