Hardware Reference
In-Depth Information
Figure 9-24
Permissions for the pwds.php file. Make sure that no one
can read from and write to it—besides you.
NOTE: If you're using a graphic SFTP or FTP client, your
settings for this file will look like Figure 9-24. This protection
will deter anyone who doesn't have access to your account
from getting your account info. It isn't an ideal security
solution, but it serves for demonstration purposes and can
be made more secure by changing your password frequently.
You'll need to make sure you have at least one
unread mail message on your server for that
code to work. When you do, you should get
something like this when you open the script in a browser:
There's a lot of useful information in this header. Though
the mail says it's from cat@catmail.com , it's actually
from a server that's run by myhost.com . It's common to
put an alias on the from: address, to assign a different
reply-to: address than the from: address, or both. It allows
sending from a script such as the cat script in Chapter 3,
yet the reply goes to a real person who can answer it. It's
important to keep this in mind if you're writing scripts that
reply to each other. If you're using email to communicate
between networked devices, the program for each device
must be able to tell the from: address from the reply-to:
address—otherwise, they might not get each other's
messages.
number of messages: 85
Delivered-To: tom.igoe@gmail.com
Received: by 10.52.188.138 with SMTP id ga10cs129118vdc;
Sat, 28 May 2011
12:32:30 -0700 (PDT)
Received: by 10.42.176.136 with SMTP id
be8mr4324248icb.15.1306611150331; Sat,
28 May 2011 12:32:30 -0700 (PDT)
Return-Path: <tigoe@algenib.myhost.com>
Received: from myhost.com (crusty.g.myhost.
com [67.225.8.42]) by mx.google.com with ESMTP id
f8si10612848icy.106.2011.05.28.12.32.29; Sat, 28 May 2011
12:32:29 -0700 (PDT)
Received-SPF: pass (google.com: domain of tigoe@algenib.
myhost.com designates 67.225.8.42 as permitted sender)
client-ip=67.225.8.42;
Authentication-Results: mx.google.com; spf=pass (google.com:
domain of tigoe@algenib.myhost.com designates 67.225.8.42 as
permitted sender) smtp.mail=tigoe@algenib.myhost.com
Received: from algenib.myhost.com (algenib.myhost.com
[173.236.170.37]) by crusty.g.myhost.com (Postfix) with
ESMTP id 6EAC3BE813 for <tom.igoe@gmail.com>; Sat, 28 May
2011 12:31:15 -0700 (PDT)
Received: by algenib.myhost.com (Postfix, from userid
1774740) id 00AD1156BB6; Sat, 28 May 2011 12:32:09 -0700
(PDT)
To: tom.igoe@gmail.com
Subject: Hello world!
From: cat@catmail.com
Message-Id: <20110528193210.00AD1156BB6@algenib.myhost.com>
Date: Sat, 28 May 2011 12:32:10 -0700 (PDT)
This particular message doesn't have a field called
X-Mailer: , though many do. X-Mailer tells you which
program sent the mail. For example, Apple Mail messages
always show up with an X-mailer of Apple Mail , followed by
a version number such as (2.752.3) . Like the HTTP User
Agent, the X-Mailer field can help you decide how to format
mail messages. You could use it in a similar fashion, to tell
something about the device that's mailing you, so you can
format messages appropriately when mailing back.
 
Search WWH ::




Custom Search