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.

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.

share|improve this question

migrated from superuser.com Jun 23 '10 at 21:29

This question came from our site for computer enthusiasts and power users.

    
What about /var/log/maillog ? –  Antoine Benkemoun Jun 23 '10 at 22:12
add comment

2 Answers 2

up vote 7 down vote accepted

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.

share|improve this answer
1  
In centos, and probably RHEL/fedora, it's in /var/log/exim_mainlog –  yitwail Apr 18 '13 at 23:02
add comment

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.

share|improve this answer
add comment

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.