1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

OpenSource email list Cleaning script

Discussion in 'Products & Tools' started by webdevoman, Jul 31, 2014.

  1. #1
    If this is not the correct forum for this please pardon me.
    SEMrush
    I have an email list from a forum community I own and I am looking to clear the list of old addresses that are no longer valid, etc. I see many expensive options for doing this but is there anything open source available?

    Thanks,
    Rich
     
    webdevoman, Jul 31, 2014 IP
    SEMrush
  2. sarahk

    sarahk iTamer Staff

    Messages:
    24,100
    Likes Received:
    3,250
    Best Answers:
    92
    Trophy Points:
    615
    #2
    I haven't done anything like that in years but the simplest way is just to write a quick php script that runs down the list and checks the mx records to see if it would be deliverable.

    Something like this is a step along the way

    <?php
    function domain_exists($email, $record = 'MX'){
    list($user, $domain) = explode('@', $email);
    return checkdnsrr($domain, $record);
    }
    if(domain_exists('sarah@somedomainifound.com')) {
    echo('This MX records exists; I will accept this email as valid.');
    }
    else {
    echo('No MX record exists; Invalid email.');
    }
    Code (markup):
     
    sarahk, Jul 31, 2014 IP
  3. webdevoman

    webdevoman Active Member

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #3
    That is a great idea. Thanks!
     
    webdevoman, Jul 31, 2014 IP
  4. melbek

    melbek Member

    Messages:
    49
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #4
    I would also check that the MX server will accept email for the domain, e.g. RCPT TO:
     
    melbek, Aug 25, 2014 IP
  5. Mayank Chaudhary

    Mayank Chaudhary Greenhorn

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #5
    Mayank Chaudhary, Feb 26, 2015 IP