I have got a 3rd-party software configured on my server that automatically sends all bounced back emails delivered by one site hosted on my server to a location , say, /home/yourdomain/mail on my domain, where all emails come in.
Here's my 3-Step Plan:
1. redirect the incoming mail, especially bounced emails, from this email account to a php script (you got to check your mail server doc on how do this)
2. The php script will then be able to process the incoming email in whatever way I like, including to detect bounce mail message (use regexp search). But what I wanted to do, specifically, is to extract out the email address and then find from the whole database the usernames associated with this bounced email ids, and delete the user profiles of these members from my site.
3. Upon deletion, update mySQL table and an admin table at the backend of the site, to allow admin to immediately see which usernames and the associated bounced email ids have been deleted from the database of members. Instantaneous update needed.
(AND Note: NO CRON-JOB TO COMB THROUGH LARGE NUMBER OF RECORDS IN DATABASES ON A SCHEDULED BASIS is permitted as this would place enormous demand on the server's resources, not even if it is done on a scheduled 10-minute intervals.)
By the way, be careful not to modify other settings already properly set up on my dedicated server, as we went through a lot to make it stable.
(Rationale of 2 above: to ensure no more emails will be sent in future to the email addresses of these bounced email ids, so as to ensure no more hard bounces, soft bounces, etc. of emails sent out )
Please read through and see if you can handle this job.
Knowledge of php programming and server admin tasks is necessary.