There are a number of problems with your idea: the first one being that spammers regularly forge From: addresses.

SMTP does support VRFY (verify) and EXPN (expand) commands to check that a given account exists on a machine, however this has long since been disabled by most administrators (myself included) ever since spammers started abusing the system to identify and harvest valid accounts. Have a read of RFC2821 - SMTP

An alternative would be to try and send a test message to the accounts, but you'd be effectively spamming too.

Even if you could verify the existence of an address, would you really want to delete all messages from an email address that no longer exists?
I've got emails going back quite a few years, many of which were sent from email addresses I know are defunct after friends have changed ISP or webmail providers and so on.

Spam Assassin does a pretty good job of filtering spam - I'd recommend using that (or an alternative tool), rather than your fairly coarse criteria.

Cheers,

BazB


If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.


In reply to Re: Just Another Discussion of Spam by BazB
in thread Just Another Discussion of Spam by CloneArmyCommander

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.