Hi,
I have a client list which I have not sent out any
email to for about a year, and I sent an email last week.
Now my emails have an opt-out link which keeps the mysql
database clean, as far as “don’t-wanters” goes.
But, how do I clean out the the non-deliverables?
From my mail out ( of c.5000 emails), I got about 450 bounces.
Obviously I don’t want to keep sending out to emails to
non-existent addresses so I want to somehow access those addresses and
take them off of the clients table.
The reason that I know that I get the bounces is because I get
an email back to my sending email address saying that it was not
deliverable.
I noticed there are lots of options ın the Postfix Server Settings under
the WebMin menu, but I could not find anything there to help me.
Every retum email has the following subject:
“Undelivered Mail Returned to Sender”
and the sender is:
"Mail Delivery System MAILER-DAEMON@HEAVYHOSTER.COM
There seems to be header information like this:
Reporting-MTA: dns; heavyhoster.com
X-Postfix-Queue-ID: 98D5667E62B
X-Postfix-Sender: rfc822; user-group-admin@expert-world.com
Arrival-Date: Fri, 23 Oct 2009 19:00:15 -0700 (MST)
Final-Recipient: rfc822; webmaster@prabhas.com
Original-Recipient: rfc822;webmaster@prabhas.com
Action: failed
Status: 5.0.0
Remote-MTA: dns; sitemail.everyone.net
Diagnostic-Code: smtp; 550 Recipient Rejected: Account Inactive
At the moment I have over 450 emails in my inbox and I want to somehow strip out the
email address so that I can write to a CSV file or a mysql table.
I know a bit of php but I am not really sure of the best way to do this.
Are all these email in a file somewhere?
Is the file a normal ascci file ?
Would the best way be to open it up with file()
and then extract the lines with a regex ?
Would appreciate some guidance about which files to use and where to find them
Any more ideas how I should go about this ?
Thanks