Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2012
    Brighton, United Kingdom

    Difficulty tracking email statuses with Postfix


    I've been trying to solve this problem for a few days now and I can't seem to get anywhere with it, does anyone have any thoughts...

    I'm trying to setup a newsletter service (running on centos with postfix and php) and I need to determine email statuses once they've been sent (delivered, bounced etc).

    So far I've tried using perl to parse the maillog file but this is taking up a lot of resources and seems like a slow way of doing things (especially once the maillog gets bigger). I've just started looking into using rsyslog to insert the maillog straight into mysql but I'm thinking this might knacker out the mysql database.

    Has anyone else had any success with efficiently tracking email statuses? Any help would be much appreciated

  2. #2
    Hi. I have the same issue and here's how I solved it. I take the /var/log/mail.log, and i grep '(250 ' | grep 'sent' to get all sent mail. I filter the file with python + regex to extract the sent emails. Using a select... not in (select...) I grab the mails who aren't sent. I also have a bash script with around 100 filters, to get the bounced / refused / not-existent domain / et caetera mails. Please write back if you want my python script and my bash script. I saw that in the last ubuntu, there's a postfix-mysql something, but now I don't have time to rebuild a new server and test it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts