zzz wrote:How can I check for duplicates?
Simplest way I could think would be to insert all of the e-mail addresses as array indexes after applying [man]strtolower/man (and giving each index some arbitrary value, like '1'). That way, if an e-mail is duplicated, it will only be recorded once since arrays can't have duplicate keys. Then, when you're done looping through every email address, use [man]array_keys/man on the array you built and there you go.
No idea if this is the most efficient way to do this - it's just what came to mind first.
zzz wrote:Also, is there a way to catch bounces when mailboxes do not exest any longer, so that they could be removed from the list?
This is a bit more complicated, but what apps like phplist do is set a message envelope header (can't remember what it is exactly) to an email box that a script can access (e.g. via POP).
The script would then download messages from that box and process any "MAILER DAEMON" messages reporting invalid e-mail addresses.
EDIT: And of course, I took too long to type all of that before dagon posted. :p