![]() |
| ||
| Bounced emails in mailing list? I am looking for a PHP script which analyzes all of the bounced emails in my inbox and generates a list of the email addresses which bounced. Any ideas? |
| ||
| Re: Bounced emails in mailing list? well... it depends on your mailbox format... on my server, an "inbox" is stored in a single file (every new message is appended to the end of that file). and each of my "official" inboxes has its own file... to make head and/or tail of that, i'd have to read the file, split out each individual message, and parse the headers... if your mailbox is different, the format of stored messages may be different. if your mailbox is "offshore", i.e. not on the server where you want to perform the check, you'll need to make a POP3 or similar connection to ge hold of the mail.. I know Perl offers handy modules for that purpose, for PHP... the same probably applies. here's an insightful snippet from my "root" inbox file (/home/fusion/mail/inbox) From MAILER-DAEMON Fri Dec 1 15:37:46 2006 have a poke around your server and look at the mail format... |
| ||
| Re: Bounced emails in mailing list? Thank you for your post. Unfortunately, I'm using qmail, and each message is its own file. I tried checking out the qmail log, but couldn't find a pattern to find the emails (some were wrapped in parentheses, others in brackets, others underscores, etc) so that didn't work :( I'm still trying! |
| ||
| Re: Bounced emails in mailing list? hmm.. it should in theory be easier in a one-file-per-message system: there's one less parse operation to perform, and that's replaced with reading in all the files in a given directory... http://www.qmail.org/man/man5/maildir.html http://www.qmail.org/man/man5/envelopes.html http://www.qmail.org/man/man5/qmail-log.html reading the qmail-log manual leads me to believe it's very volatile o_O, but it may provide a notification of a bounced message without waiting for a notification email from your mailserver. if you have a specified email address (or inbox) to forward, at delivery-level, all failed notifcations from your mail server to (they definately have common subject lines), it will make the job of working out what data is important easier. there is a PHP POP module, someone has written a wrapper for it aswell: http://www.phpclasses.org/browse/package/2.html but... if your message folder is local to your script, that does seem like uneccessary overhead. |
| All times are GMT -4. The time now is 11:18 pm. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC