--------------------------------------------------------------------------------
[Press Enter key]
...first three mails omitted...
Received: (qmail 30325 invoked from network); 6 May 2010 14:33:45 −0000
Received: from unknown (HELO p3pismtp01-004.prod.phx3.secureserver.net) ([10.6.1
(envelope-sender <[email protected]>)
by p3plsmtp06-03.prod.phx3.secureserver.net (qmail-1.03) with SMTP
for <[email protected]>; 6 May 2010 14:33:45 −0000
...more deleted...
Received: from [66.194.109.3] by smtp.mailmt.com (ArGoSoft Mail Server .NET v.1.
for <[email protected]>; Thu, 06 May 2010 10:33:16 −0400
From: [email protected]
Date: Thu, 06 May 2010 14:32:32 −0000
Subject: a b c d e f g
To: [email protected]
Message-ID: <66koqg66e0q1c8hl06052010103316@SMTP>
X-FromIP: 66.194.109.3
X-Nonspam: None
Spam; Spam and eggs; Spam, spam, and spam.
--------------------------------------------------------------------------------
Bye.
Once again, though, don’t do this unless you have good cause. This demonstration is
intended only to help you understand how mail headers factor into email processing.
To write an automatic spam filter that deletes incoming junk mail, for instance, you
need to know some of the telltale signs to look for in a message’s text. Spamming
techniques have grown much more sophisticated than simply forging sender and re-
cipient names, of course (you’ll find much more on the subject on the Web at large and
in the SpamBayes mail filter written in Python), but it’s one common trick.
On the other hand, such To address juggling may also be useful in the context of le-
gitimate mailing lists—the name of the list appears in the “To:” header when the mes-
sage is viewed, not the potentially many individual recipients named in the send-mail
call. As the next section’s example demonstrates, a mail client can simply send a mail
to all on the list but insert the general list name in the “To:” header.
But in other contexts, sending email with bogus “From:” and “To:” lines is equivalent
to making anonymous phone calls. Most mailers won’t even let you change the From
line, and they don’t distinguish between the To address and header line. When you
program mail scripts of your own, though, SMTP is wide open in this regard. So be
good out there, OK?
918 | Chapter 13: Client-Side Scripting