THINK

that’s how i naturally know

Archive for the ‘Networking’ Category

PTR, rDNS, SPF, DKIM, DomainKeys and SMTP set up for sending emails

leave a comment

The DNS records related to sending emails has to be set correctly according to prevailing standards otherwise you will get into various non-delivery issues.

PTR and rDNS

When the sender server (S) email arrives at the recipient server (R), R will do a rDNS check and this sequence of events will happen:

  1. R will check the IP that S is connected on
  2. R will check the IP for a valid hostname by doing a DNS lookup for the PTR record for the IP. This PTR record is recorded in the ISP zone for S.
  3. S’s ISP will return a hostname to R.
  4. R will check the hostname for an IP by doing a DNS lookup for the A record for the hostname. This A record is recorded in the zone of the hostname’s domain.
  5. R will compare the IP in step 1 and 4 to make sure it is the same.

Additionally, R may require that the hostname in step 2 be the same as the sender email domain’s MX and be the same as the hostname in the HELO/EHLO command sent by S. Although this will be over doing it.

SPF

R may also check whether S implements the Sender Policy Framework (SPF) in the DNS by looking up the TXT record in the email domain zone. Typically, an SPF TXT looks like:

  • “v=spf1 mx a ~all”

This will tell R that emails originating from the MX server and the Web Server (specified at the A record for the domain) are allowed to send emails for the email domain.

DomainKeys, DKIM

S can also implement a “signature” protocol where every email sent out will be signed by the it. Then when R recieves the email, it will look up TXT record in the DNS zone of the email domain for the DomainKey and DKIM rules to parse and determine if the signature on the email is valid.

 

 

Written by Jake

December 1st, 2011 at 3:13 pm

Posted in Networking,Web

Connect to remote SQLEXPRESS server (2005 / 2008)

leave a comment

A few things to set up on the SQLEXPRESS before client can connect to it remotely.

Go to SQL Server Configuration Manager > Network Configuration > Protocols for SQLEXPRESS and enable TCP/IP. The default installation of SQLEXPRESS does not enable TCP/IP. If you are connecting via other protocols, enable those (obviously).

Go to the host machine’s services.msc and enable the SQL Server Browser service. You may want to change the startup to Automatic as well.

Additionally, you may need to configure SQL Express to use Mixed Mode Authentication. This is normally a one-time configuration during the installation of the server, however, it can be changed manually through the registry at HKLM\Software\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer and set LoginMode to 2 (decimal)

Then restart SQL Server (SQLEXPRESS) in services.msc to make it use the new settings.

If users are required, use Microsoft SQL Server Management Studio to add users that can log in with SQL authentication.

Written by Jake

November 25th, 2011 at 1:19 pm

Posted in Networking,Programming

Tagged with

Windows Host File

leave a comment

There is a forgotten file in Windows (Vista) known as a host file and resides in the depths of C Drive at c:\windows\system32\drivers\etc.

The host file has got no file extension but its an ascii file so you can open it in notepad and start editing it because it allows you to rewrite the IPs of hosts that will otherwise resolve correctly by your network connection’s DNS.

On MAC, apparently it’s harder to get there but you can try this (not tested):

Enter the Terminal (Applications / Utility). Type this:
sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts

With a little bit of imagination, this bit of information will become very useful. As to what use, I will not suggest here.

Written by Jake

April 15th, 2009 at 5:07 pm

Posted in Networking